public class TreeModelNode extends Object
TreeNode
plays for
DefaultTreeModel
, but also takes care of
some of the duties related to asynhronous expansion of the node.
You should generally synchronize on a TreeModelNode when accessing it in a way which might modify it or be sensitive to modification of it.
To create a TreeModelNode, use the
DataNodeTreeModel.makeModelNode(uk.ac.starlink.datanode.nodes.DataNode, uk.ac.starlink.datanode.tree.TreeModelNode)
method of DataNodeTreeModel.
Modifier and Type | Method and Description |
---|---|
List |
getChildren()
Returns the list which contains the children.
|
DataNode |
getDataNode()
Returns the DataNode managed by this TreeModelNode.
|
NodeExpander |
getExpander()
Returns the object which is currently in charge of locating this
nodes children.
|
TreeModelNode |
getParent()
Returns the parent of this node.
|
void |
setExpander(NodeExpander expander)
Installs a NodeExpander object to take charge of
locating this node's children.
|
public List getChildren()
public TreeModelNode getParent()
public DataNode getDataNode()
public void setExpander(NodeExpander expander)
It is the responsibility of the calling code to ensure that the new expander starts doing its expansion work.
expander
- new node expanderpublic NodeExpander getExpander()
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.