Module swing.tree.component.main
Class DefaultMutableTreeNodeExtensions
java.lang.Object
io.github.astrapi69.swing.tree.extension.DefaultMutableTreeNodeExtensions
The class
DefaultMutableTreeNodeExtensions
provides methods for copy of
DefaultMutableTreeNode
objects-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends DefaultMutableTreeNode>
Tcopy
(T source, T target) Copies the given sourceDefaultMutableTreeNode
object to the given targetDefaultMutableTreeNode
objectstatic <T> void
copyOf
(DefaultMutableTreeNode selectedDefaultMutableTreeNode, T copyOfUserObject) Makes a exact copy of the givenDefaultMutableTreeNode
object with the copy of the given user object and all descendantsDefaultMutableTreeNode
objects
-
Constructor Details
-
DefaultMutableTreeNodeExtensions
public DefaultMutableTreeNodeExtensions()
-
-
Method Details
-
copyOf
public static <T> void copyOf(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
Copies the given sourceDefaultMutableTreeNode
object to the given targetDefaultMutableTreeNode
object- Type Parameters:
T
- the generic type- Parameters:
source
- the sourceDefaultMutableTreeNode
objecttarget
- the targetDefaultMutableTreeNode
object- Returns:
- the copied target
DefaultMutableTreeNode
object
-