Class TreeVertex
Extends LayoutVertex. This holds TreeLayout-specific information about Nodes.
This class inherits from LayoutVertex.
Constructor Summary Details
Name | Description |
---|---|
TreeVertex()
|
|
Properties Summary Details
Name, Value Type | Description |
---|---|
alignment
{EnumValue}
|
Gets or sets how this parent node should be aligned relative to its children.More... The default value is TreeLayout.AlignmentCenterChildren. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
angle
{number}
|
Gets or sets the absolute angle at which this subtree should grow from this vertex.More... The default value is zero, meaning that general tree growth should proceed rightwards along the X axis. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. By default this is the same as the Angle of the parent TreeVertex. However, after the initial propagation of property values, perhaps in an override of TreeLayout.assignTreeVertexValues, you could just set this property to specify the angle at which this node grows its subtrees. |
breadthLimit
{number}
|
Gets or sets how broad a node and its descendants should be.More... By default this is zero. A value of zero imposes no limit; a positive value will specify a limit for the total width of this subtree. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
childPortSpot
{Spot}
|
Gets or sets the spot that children nodes' ports get as their ToSpot, if setsChildPortSpot is true and the node has only a single port.More... The default value is Spot.Default. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. A value of Spot.Default will cause the TreeLayout to assign a ToSpot based on the parent node's TreeVertex.angle. If the value is other than NoSpot, it is just assigned. When TreeLayout.path is TreeLayout.PathSource, the port's FromSpot is set instead of the ToSpot. |
children
{Array.
|
Gets or sets the logical children for this node.More... The default value is an empty array. This structural property is computed in TreeLayout.doLayout when building the tree structures. You should probably not be setting this property. |
childrenCount
{number}
|
This read-only property returns the number of immediate children this node has.More... The default value is zero. |
commentMargin
{number}
|
Gets or sets the space to leave between the node and the comments.More... The default value is 20. Negative values may cause comments to overlap with the node. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
comments
{Array.
|
Gets or sets an array of Nodes that will be positioned near this node.More... The default value is null. These objects should not have their own TreeVertexes to be laid out. Typically these will be Nodes whose Category is "Comment". This array should be allocated and initialized in TreeLayout.addComments. |
commentSpacing
{number}
|
Gets or sets the space to leave between consecutive comments.More... The default value is 10. Negative values may cause comments to overlap. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
compaction
{EnumValue}
|
Gets or sets how the children of this node should be packed together.More... The default value is TreeLayout.CompactionBlock. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
comparer
{function(TreeVertex, TreeVertex):number}
|
Gets or sets how the children should be sorted.More... This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
descendantCount
{number}
|
Gets or sets the number of descendants this node has.More... For a leaf node, this will be zero. This informational property is computed as part of the TreeLayout.initializeTreeVertexValues pass. You should probably not be setting this property. |
initialized
{boolean}
|
Gets or sets whether this node has been initialized as part of TreeLayout.doLayout when building the tree structures.More... The default value is false. |
layerSpacing
{number}
|
Gets or sets the distance between this node and its children.More... The default value is 50. Negative values may cause children to overlap with the parent. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
layerSpacingParentOverlap
{number}
|
Gets or sets the fraction of this node's depth that may overlap with the children's layer.More... The default value is 0.0 -- there is overlap only if layerSpacing is negative. Values must range from 0.0 to 1.0, where 1.0 means the full depth of this node. When this value is greater than 0.0, there might not be overlap if layerSpacing is larger than the depth of this node times this fraction. Even when this value is 0.0, there may be overlap when layerSpacing is negative. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
level
{number}
|
Gets or sets the number of single-parent ancestors this node has.More... This could also be interpreted as which layer this node is in. A root node will have a value of zero. This informational property is computed in TreeLayout.doLayout when building the tree structures. You should probably not be setting this property. |
maxChildrenCount
{number}
|
Gets or sets the maximum number of children of any descendant of this node.More... For a leaf node, this will be zero. This informational property is computed as part of the TreeLayout.initializeTreeVertexValues pass. You should probably not be setting this property. |
maxGenerationCount
{number}
|
Gets or sets the maximum depth of the subtrees below this node.More... For a leaf node, this will be zero. This informational property is computed as part of the TreeLayout.initializeTreeVertexValues pass. You should probably not be setting this value. |
nodeIndent
{number}
|
Gets or sets the distance the first child should be indented.More... The default value is zero. The value should be non-negative. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. This property is only sensible when the alignment is TreeLayout.AlignmentStart or TreeLayout.AlignmentEnd. |
nodeIndentPastParent
{number}
|
Gets or sets whether the first child should be indented past the parent node's breadth.More... The default value is 0.0 -- the only start or end spacing is provided by nodeIndent. Values must range from 0.0 to 1.0, where 1.0 means the full breadth of this node. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. This property is only sensible when the alignment is TreeLayout.AlignmentStart or TreeLayout.AlignmentEnd. |
nodeSpacing
{number}
|
Gets or sets the distance between child nodes.More... The default value is 20. A negative value will cause sibling nodes to overlap. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
parent
|
Gets or sets the logical parent for this node.More... The default value is null. This structural property is computed in TreeLayout.doLayout when building the tree structures. You should probably not be setting this property. |
portSpot
{Spot}
|
Gets or sets the spot that this node's port gets as its FromSpot, if setsPortSpot is true and the node has only a single port.More... The default value is Spot.Default. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. A value of Spot.Default will cause the TreeLayout to assign a FromSpot based on the parent node's TreeVertex.angle. If the value is other than NoSpot, it is just assigned. When TreeLayout.path is TreeLayout.PathSource, the port's ToSpot is set instead of the FromSpot. |
relativePosition
{Point}
|
Gets or sets the position of this node relative to its parent node.More... This informational property is computed during TreeLayout.doLayout. You should probably not be setting this property. |
rowIndent
{number}
|
Gets or sets the distance the first child of each row should be indented.More... The default value is 10. The value should be non-negative. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. This property is only used when the breadthLimit is positive, and some initial space needs to be reserved in each row of nodes for the links that are routed around those rows. |
rowSpacing
{number}
|
Gets or sets the distance between rows within one layer, all sharing the same parent.More... The default value is 25. Negative values may cause nodes to overlap. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
setsChildPortSpot
{boolean}
|
Gets or sets whether the TreeLayout should set the ToSpot for each child node port.More... The default value is true -- this may modify the spots of the ports of the children nodes, if the node has only a single port. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. The spot used depends on the value of childPortSpot. |
setsPortSpot
{boolean}
|
Gets or sets whether the TreeLayout should set the FromSpot for this parent node port.More... The default value is true -- this may modify the spot of the port of this node, the parent, if the node has only a single port. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. The spot used depends on the value of portSpot. |
sorting
{EnumValue}
|
Gets or sets whether and in what order the children should be sorted.More... The default value is TreeLayout.SortingForwards. This inherited property is initialized in the TreeLayout.initializeTreeVertexValues pass. |
subtreeOffset
{Point}
|
Gets or sets the offset of this parent node relative to its whole subtree.More... This informational property is computed during TreeLayout.doLayout. Of course if there are no children, this is just (0, 0). You should probably not be setting this property. |
subtreeSize
{Size}
|
Gets or sets the size of the subtree (including all descendants) parented by this node.More... This informational property is computed during TreeLayout.doLayout. Of course if there are no children, this is just the same as Size. You should probably not be setting this property. |
- Properties borrowed from class LayoutVertex:
- bounds, centerX, centerY, data, destinationEdges, destinationVertexes, edges, edgesCount, focus, focusX, focusY, height, network, node, sourceEdges, sourceVertexes, vertexes, width, x, y
Method Summary Details
Name, Return Type | Description |
---|---|
copyInheritedPropertiesFrom(copy)
|
Copy inherited properties from another TreeVertex to this one.More...
|
- Methods borrowed from class LayoutVertex:
- addDestinationEdge, addSourceEdge, commit, deleteDestinationEdge, deleteSourceEdge