java.lang.Object
com.dlsc.gemsfx.treeview.TreeNode<T>
-
Property Summary
Properties -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.BooleanPropertyintgetDepth()Get the depth of the node in the tree.doubleGets the value of the property height.intgetLevel()getName()Gets the value of the property parent.getValue()Gets the value of the property value.doublegetWidth()Gets the value of the property width.javafx.beans.property.DoublePropertybooleanbooleanGets the value of the property expanded.booleanbooleanbooleanisLeaf()booleanisRoot()If there is no parent node, it is the root nodevoidsetExpanded(boolean expanded) Sets the value of the property expanded.voidsetHeight(double height) Sets the value of the property height.voidprotected voidSets the value of the property parent.voidsetSize(double width, double height) voidSets the value of the property value.voidsetWidth(double width) Sets the value of the property width.stream()Convenient for traversing tree nodes.toString()javafx.beans.property.ObjectProperty<T>javafx.beans.property.DoubleProperty
-
Property Details
-
parent
- See Also:
-
expanded
public javafx.beans.property.BooleanProperty expandedProperty- See Also:
-
value
- See Also:
-
width
public javafx.beans.property.DoubleProperty widthProperty- See Also:
-
height
public javafx.beans.property.DoubleProperty heightProperty- See Also:
-
-
Field Details
-
USE_TREE_CELL_SIZE
public static final double USE_TREE_CELL_SIZE- See Also:
-
-
Constructor Details
-
TreeNode
public TreeNode() -
TreeNode
-
-
Method Details
-
getName
-
setName
-
parentProperty
- See Also:
-
setParent
Sets the value of the property parent.- Property description:
-
getParent
Gets the value of the property parent.- Property description:
-
getChildren
-
getLinkedNodes
-
isExpanded
public boolean isExpanded()Gets the value of the property expanded.- Property description:
-
expandedProperty
public javafx.beans.property.BooleanProperty expandedProperty()- See Also:
-
setExpanded
public void setExpanded(boolean expanded) Sets the value of the property expanded.- Property description:
-
getValue
Gets the value of the property value.- Property description:
-
valueProperty
- See Also:
-
setValue
Sets the value of the property value.- Property description:
-
getWidth
public double getWidth()Gets the value of the property width.- Property description:
-
widthProperty
public javafx.beans.property.DoubleProperty widthProperty()- See Also:
-
setWidth
public void setWidth(double width) Sets the value of the property width.- Property description:
-
getHeight
public double getHeight()Gets the value of the property height.- Property description:
-
heightProperty
public javafx.beans.property.DoubleProperty heightProperty()- See Also:
-
setHeight
public void setHeight(double height) Sets the value of the property height.- Property description:
-
setSize
public void setSize(double width, double height) -
isLeaf
public boolean isLeaf()- Returns:
- true: if the node is a leaf node
-
getDepth
public int getDepth()Get the depth of the node in the tree. The depth of the root node is 0.- Returns:
- the depth of the node in the tree
-
getLevel
public int getLevel() -
isRoot
public boolean isRoot()If there is no parent node, it is the root node- Returns:
- true if the node is the root node of the tree
-
getLastChild
- Returns:
- The last node in the child node list.
-
isLastChild
public boolean isLastChild()- Returns:
- true: if this node is the last node of the parent
-
isFirstChild
public boolean isFirstChild()- Returns:
- true: if this node is the first node of the parent
-
getFirstChild
- Returns:
- The first node in the child node list.
-
isAncestorCollapsed
public boolean isAncestorCollapsed()- Returns:
- true if the node is parent is collapsed
-
stream
Convenient for traversing tree nodes. -
toString
-