Class DefaultMutableTreeNodeExtensions
- java.lang.Object
-
- io.github.astrapi69.swing.tree.factory.DefaultMutableTreeNodeExtensions
-
public class DefaultMutableTreeNodeExtensions extends java.lang.Object
The classDefaultMutableTreeNodeExtensions
provides methods for copy ofDefaultMutableTreeNode
objects
-
-
Constructor Summary
Constructors Constructor Description DefaultMutableTreeNodeExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends javax.swing.tree.DefaultMutableTreeNode>
Tcopy(T source, T target)
Copies the given sourceDefaultMutableTreeNode
object to the given targetDefaultMutableTreeNode
objectstatic <T> void
copyOf(javax.swing.tree.DefaultMutableTreeNode selectedDefaultMutableTreeNode, T copyOfUserObject)
Makes a exact copy of the givenDefaultMutableTreeNode
object with the copy of the given user object and all descendantsDefaultMutableTreeNode
objects
-
-
-
Method Detail
-
copyOf
public static <T> void copyOf(javax.swing.tree.DefaultMutableTreeNode selectedDefaultMutableTreeNode, T copyOfUserObject)
Makes a exact copy of the givenDefaultMutableTreeNode
object with the copy of the given user object and all descendantsDefaultMutableTreeNode
objects- Type Parameters:
T
- the generic type of the given user object- Parameters:
selectedDefaultMutableTreeNode
- theDefaultMutableTreeNode
object to copycopyOfUserObject
- a copy of the user object
-
copy
public static <T extends javax.swing.tree.DefaultMutableTreeNode> T copy(T source, T target)
Copies the given sourceDefaultMutableTreeNode
object to the given targetDefaultMutableTreeNode
object- Parameters:
source
- the sourceDefaultMutableTreeNode
objecttarget
- the targetDefaultMutableTreeNode
object- Returns:
- the copied target
DefaultMutableTreeNode
object
-
-