Class DefaultMutableTreeNodeExtensions


  • public class DefaultMutableTreeNodeExtensions
    extends java.lang.Object
    The class DefaultMutableTreeNodeExtensions provides methods for copy of DefaultMutableTreeNode objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends javax.swing.tree.DefaultMutableTreeNode>
      T
      copy​(T source, T target)
      Copies the given source DefaultMutableTreeNode object to the given target DefaultMutableTreeNode object
      static <T> void copyOf​(javax.swing.tree.DefaultMutableTreeNode selectedDefaultMutableTreeNode, T copyOfUserObject)
      Makes a exact copy of the given DefaultMutableTreeNode object with the copy of the given user object and all descendants DefaultMutableTreeNode objects
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultMutableTreeNodeExtensions

        public DefaultMutableTreeNodeExtensions()
    • Method Detail

      • copyOf

        public static <T> void copyOf​(javax.swing.tree.DefaultMutableTreeNode selectedDefaultMutableTreeNode,
                                      T copyOfUserObject)
        Makes a exact copy of the given DefaultMutableTreeNode object with the copy of the given user object and all descendants DefaultMutableTreeNode objects
        Type Parameters:
        T - the generic type of the given user object
        Parameters:
        selectedDefaultMutableTreeNode - the DefaultMutableTreeNode object to copy
        copyOfUserObject - a copy of the user object
      • copy

        public static <T extends javax.swing.tree.DefaultMutableTreeNode> T copy​(T source,
                                                                                 T target)
        Copies the given source DefaultMutableTreeNode object to the given target DefaultMutableTreeNode object
        Parameters:
        source - the source DefaultMutableTreeNode object
        target - the target DefaultMutableTreeNode object
        Returns:
        the copied target DefaultMutableTreeNode object