|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.fuzzyTree.DisplayNode
Encapsulates a node displayed by a FuzzyTree
Field Summary | |
java.util.ArrayList |
children
A list of DisplayNode s that are the children of this node in the display tree. |
DataNode |
dataNode
The DataNode that is being displayed. |
int |
numMissingChildren
The number of nodes that are the child of the current node, but are not its child in the display tree. |
DisplayNode |
parent
The DisplayNode that is this node's parent |
Constructor Summary | |
DisplayNode(DataNode node)
Creates a DisplayNode that references node |
Method Summary | |
void |
addUnderParent(DisplayNode p)
Adds this node under parent p , in the correct position
(based on preorder index). |
boolean |
isOrphan()
Returns true if this node's actual parent is not its display parent. |
void |
removeFromParent()
Removes this node from its parent's children list and sets the
parent reference to null . |
java.lang.String |
toString()
Returns a string representation of this node, which can then be displayed in the FuzzyTree . |
Methods inherited from class java.lang.Object |
|
Field Detail |
public DataNode dataNode
DataNode
that is being displayed. Is never null
.public java.util.ArrayList children
DisplayNode
s that are the children of this node in the display tree.
This may not be the node's actual children.isOrphan()
public DisplayNode parent
DisplayNode
that is this node's parentpublic int numMissingChildren
isOrphan()
,
children
Constructor Detail |
public DisplayNode(DataNode node)
node
Method Detail |
public java.lang.String toString()
FuzzyTree
.
If not debugging, only the node's label and data are included;
otherwise, its preorderIndex and score may also be included.toString
in class java.lang.Object
public void addUnderParent(DisplayNode p)
p
, in the correct position
(based on preorder index). Node is removed from the children
list of its
previous parent, if it had one.p
- new display node parent for this node; must be non-nullpublic void removeFromParent()
children
list and sets the
parent
reference to null
.public boolean isOrphan()
FuzzyTreeModel.isOrphan(java.lang.Object)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |