public interface MyTreeNode
Modifier and Type | Method and Description |
---|---|
MyTreeNode |
getChild(int index)
Get the child with the given index number, from the direct children of this node
|
MyTreeNode |
getChild(String name)
Get the child with the name, from the direct children of this node.
|
int |
getChildCount()
Returns the number of direct children for this node
|
List<MyTreeNode> |
getChildren()
Returns the list of direct children for this node
|
MyTreeNode |
getParent()
Returns the parent for this node.
|
int |
getTotalChildCount()
Returns the number of children (direct children children of children...) for this node
|
TreePath |
getTreePath()
Get the
TreePath for this node, in the hierarchy. |
boolean |
isLeaf()
Indicates whether this node has children or not ('terminal' node)
|
void |
removeChild(MyTreeNode child)
Removes a child from the children of this node.
|
void |
setFlatModel(FilePanelFlatDataModel2 model)
Sets the flat model for the current node.
|
void |
setParent(MyTreeNode parent)
Sets the parent for this node.
|
void |
setTreeModel(TreeModel model)
Sets the tree model for the current node.
|
List<MyTreeNode> getChildren()
int getChildCount()
int getTotalChildCount()
MyTreeNode getChild(int index)
index
- MyTreeNode getChild(String name)
name
- The name of the item we're looking for. For a file, it's the filename, not the absolute path.MyTreeNode getParent()
void setParent(MyTreeNode parent)
void setTreeModel(TreeModel model)
TreeModelEvent
.model
- The model in which this node is, and to which TreeModelEvent
must be sent.void setFlatModel(FilePanelFlatDataModel2 model)
model
- The model, which must be kept synchronized.void removeChild(MyTreeNode child)
child
- The child to removeIllegalArgumentException
- If child is not an actual child of the current FolderNode
.boolean isLeaf()
Copyright © 2015. All rights reserved.