NodeType
- Each node in the tree is of this typepublic interface TypedTreeModel<NodeType>
TreeModel
Modifier and Type | Method and Description |
---|---|
void |
addTreeModelListener(TypedTreeModelListener<NodeType> l)
Adds a listener for the TreeModelEvent posted after the tree changes.
|
NodeType |
getChild(NodeType parent,
int index)
Returns the child of parent at index 'index' in the parent's child array.
|
int |
getChildCount(NodeType parent)
Returns the number of children of parent.
|
int |
getIndexOfChild(NodeType parent,
NodeType child)
Returns the index of child in parent.
|
NodeType |
getRoot()
Returns the root of the tree.
|
boolean |
isLeaf(NodeType node)
Returns true if node is a leaf.
|
void |
removeTreeModelListener(TypedTreeModelListener<NodeType> l)
Removes a listener previously added with addTreeModelListener.
|
void |
valueForPathChanged(TreePath path,
Object newValue)
Messaged when the user has altered the value for the item identified by
path to newValue.
|
void addTreeModelListener(TypedTreeModelListener<NodeType> l)
NodeType getChild(NodeType parent, int index)
parent
- parent instance of typed node typeindex
- index within parentint getChildCount(NodeType parent)
parent
- node to count children forint getIndexOfChild(NodeType parent, NodeType child)
parent
- a node in the tree, obtained from this data sourcechild
- the node we are interested inNodeType getRoot()
boolean isLeaf(NodeType node)
node
- a node in the tree, obtained from this data sourcevoid removeTreeModelListener(TypedTreeModelListener<NodeType> l)
l
- typed tree model listener to removevoid valueForPathChanged(TreePath path, Object newValue)
path
- path to the node that the user has alterednewValue
- the new value from the TreeCellEditorCopyright © 2015–2016 The Apache Software Foundation. All rights reserved.