Package docking.dnd

Class DragDropNode

All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode

public abstract class DragDropNode extends DefaultMutableTreeNode
Defines a node that is in the DragDropTree.
See Also:
  • Field Details

  • Constructor Details

    • DragDropNode

      public DragDropNode(String name)
      Constructs a new DragDropNode with the given name.
      Parameters:
      name - the name to associate with this node.
  • Method Details

    • getIcon

      public abstract Icon getIcon(boolean expanded, boolean leaf)
      Get the appropriate icon for this node's state; called by the tree cell renderer.
      Parameters:
      expanded - true if the node is expanded
      leaf - true if the node is a leaf node
    • isDropAllowed

      public abstract boolean isDropAllowed(DragDropNode dropNode, int dropAction)
      Return true if this node can be a drop target.
      Parameters:
      dropNode - node being dragged and dropped; could be null if the drag was initiated outside of the tree
      dropAction - DnDConstants value for copy or move
    • getToolTipText

      public String getToolTipText()
      Get the tool tip for this node.
    • getTreePath

      public TreePath getTreePath()
      Get the tree path for this node.
      Returns:
      TreePath
    • setName

      public void setName(String name)
      Set the name for this node.
      Parameters:
      name - the name to set on this node.
    • getName

      public String getName()
      Get the name of this node.