Package docking.dnd
Class DragDropNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
docking.dnd.DragDropNode
- All Implemented Interfaces:
Serializable
,Cloneable
,MutableTreeNode
,TreeNode
Defines a node that is in the DragDropTree.
- See Also:
-
Field Summary
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
-
Constructor Summary
ConstructorDescriptionDragDropNode
(String name) Constructs a new DragDropNode with the given name. -
Method Summary
Modifier and TypeMethodDescriptionabstract Icon
getIcon
(boolean expanded, boolean leaf) Get the appropriate icon for this node's state; called by the tree cell renderer.getName()
Get the name of this node.Get the tool tip for this node.Get the tree path for this node.abstract boolean
isDropAllowed
(DragDropNode dropNode, int dropAction) Return true if this node can be a drop target.void
Set the name for this node.Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
-
Field Details
-
treePath
-
name
-
-
Constructor Details
-
DragDropNode
Constructs a new DragDropNode with the given name.- Parameters:
name
- the name to associate with this node.
-
-
Method Details
-
getIcon
Get the appropriate icon for this node's state; called by the tree cell renderer.- Parameters:
expanded
- true if the node is expandedleaf
- true if the node is a leaf node
-
isDropAllowed
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 treedropAction
- DnDConstants value for copy or move
-
getToolTipText
Get the tool tip for this node. -
getTreePath
Get the tree path for this node.- Returns:
- TreePath
-
setName
Set the name for this node.- Parameters:
name
- the name to set on this node.
-
getName
Get the name of this node.
-