java.lang.Object
org.jhotdraw8.fxbase.tree.SimpleTreeNode<V>
- All Implemented Interfaces:
TreeNode<SimpleTreeNode<V>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
TreeNode.AncestorIterator<T extends TreeNode<T>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(SimpleTreeNode<V> child) Returns the children of the tree node.@Nullable SimpleTreeNode<V> Returns the parent of the tree node.getValue()voidremoveChild(SimpleTreeNode<V> child) voidsetParent(@Nullable SimpleTreeNode<V> newValue) Sets the parent of the tree.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxbase.tree.TreeNode
ancestorIterable, breadthFirstIterable, depthFirstIterable, dumpTree, dumpTree, getAncestor, getChild, getDepth, getFirstChild, getLastChild, getMaxDepth, getPath, isSuitableChild, isSuitableParent, postorderIterable, preorderIterable, preorderSpliterator
-
Constructor Details
-
SimpleTreeNode
public SimpleTreeNode() -
SimpleTreeNode
-
-
Method Details
-
addChild
-
removeChild
-
getChildren
Description copied from interface:TreeNodeReturns the children of the tree node.In order to keep the tree structure consistent, implementations of this interface must implement the following behavior:
- A child can only be added if the child is a suitable child for
this node, and this node is a suitable parent for the child.
See
TreeNode.isSuitableChild(TreeNode),TreeNode.isSuitableParent(TreeNode). - If a child is added to this list, then this tree node removes it from its former parent, and this tree node then sets itself as the parent of the* child.
- If a child is removed from this tree node, then this tree node sets the parent of the child to null.
- Specified by:
getChildrenin interfaceTreeNode<V>- Returns:
- the children
- A child can only be added if the child is a suitable child for
this node, and this node is a suitable parent for the child.
See
-
getParent
Description copied from interface:TreeNodeReturns the parent of the tree node.Note that - by convention - the parent property is changed only by a parent tree node.
-
setParent
Description copied from interface:TreeNodeSets the parent of the tree.Note that - by convention - the parent property is changed only by a parent tree node.
-
getValue
-
setValue
-