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()
null
for the
root.public DataNode getDataNode()
public void setExpander(NodeExpander expander)
NodeExpander
s behave in
such a way that such uninstallation will (at least may) cause
them to stop expanding,
so an expander should not be deinstalled and installed again later.
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()
null
, no node expansion has been
attempted on this node.Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.