Package org.basex.gui.layout
Class ResourceNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
org.basex.gui.layout.ResourceNode
- All Implemented Interfaces:
Serializable,Cloneable,EventListener,TreeWillExpandListener,MutableTreeNode,TreeNode
- Direct Known Subclasses:
ResourceFolder,ResourceLeaf
JTree node for representing database content (raw files / documents).
- Author:
- BaseX Team 2005-21, BSD License, Lukas Kircher
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringpath()Returns the complete path (path + name) of this node as a string.static byte[]preparePath(byte[] path) Prepares the given path to be used as a tree node.toString()voidvoidMethods 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
-
Field Details
-
name
public final byte[] nameNode name.
-
-
Method Details
-
preparePath
public static byte[] preparePath(byte[] path) Prepares the given path to be used as a tree node. The returned path looks the following:- The path is relative to the database root directory
- It has one leading slash
- It has no trailing slashes, no matter if it represents a folder or file
- Parameters:
path- path to be prepared- Returns:
- path
-
path
Returns the complete path (path + name) of this node as a string.- Returns:
- path string
-
treeWillExpand
- Specified by:
treeWillExpandin interfaceTreeWillExpandListener
-
treeWillCollapse
- Specified by:
treeWillCollapsein interfaceTreeWillExpandListener
-
toString
- Overrides:
toStringin classDefaultMutableTreeNode
-