com.nwoods.jgo.layout
Class JGoTreeAutoLayout
java.lang.Object
com.nwoods.jgo.layout.JGoAutoLayout
com.nwoods.jgo.layout.JGoTreeAutoLayout
- public class JGoTreeAutoLayout
- extends JGoAutoLayout
Position nodes in a tree-like arrangement.
|
Method Summary |
protected void |
ArrangeTrees()
Position each separate tree. |
protected void |
AssignTreeNodeValues(JGoTreeNetworkNode n)
Assign final property values for a JGoTreeNetworkNode. |
protected void |
CreateTrees()
This method is responsible for initializing all of the JGoTreeNetworkNodes,
setting JGoTreeNetworkNode Initialized, JGoTreeNetworkNode Leve,
JGoTreeNetworkNode Parent, and JGoTreeNetworkNode Children, and making
sure Roots has at least one suitable JGoObject in it. |
void |
FindRoots()
This method is responsible for finding all the root nodes. |
int |
getAlignment()
Gets the default alignment of parents relative to their children. |
java.util.Comparator |
getAlphabeticNodeTextComparer()
|
JGoTreeNetworkNode |
getAlternateDefaults()
Gets the object holding the default values for alternate layer JGoTreeNetworkNodes. |
float |
getAngle()
Gets the default direction for tree growth. |
int |
getArrangement()
Get how ArrangeTrees should lay out the separate trees. |
java.awt.Point |
getArrangementOrigin()
Sets the point at which ArrangeTrees will position the trees. |
java.awt.Dimension |
getArrangementSpacing()
Gets the space between which ArrangeTrees will position the trees. |
int |
getBreadthLimit()
Gets a limit on how broad a tree should be. |
int |
getChildPortSpot()
Gets the spot that children nodes' JGoPorts get as their ToSpot. |
int |
getCompaction()
Gets how closely to pack the child nodes of a subtree. |
java.util.Comparator |
getComparer()
Gets the default Comparator used for sorting. |
JGoDocument |
getDocument()
Returns the AutoLayout's JGoDocument. |
int |
getLayerSpacing()
Gets the distance between a parent node and its children. |
JGoNetwork |
getNetwork()
Use getTreeNetwork instead. |
int |
getNodeIndent()
Gets the default indentation of the first child. |
int |
getNodeSpacing()
Gets the distance between child nodes. |
int |
getPath()
Gets how the tree should be constructed from the JGoTreeNetworkLinks
connecting JGoTreeNetworkNodes. |
int |
getPortSpot()
Gets the spot that this node's JGoPort gets as its FromSpot. |
JGoTreeNetworkNode |
getRootDefaults()
Gets the object holding the default values for the root JGoTreeNetworkNode. |
JGoObjectCollection |
getRoots()
Gets a JGoObject Collection of root JGoObjects. |
int |
getRowIndent()
Gets the default indentation of the first child of each row. |
int |
getRowSpacing()
Gets the distance between rows of children. |
boolean |
getSetsChildPortSpot()
Gets whether SetPortSpots should set the JGoPort ToSpot for each child node port. |
boolean |
getSetsPortSpot()
Gets whether SetPortSpots should set the JGoPort FromSpot for this parent node port. |
int |
getSorting()
Gets the default sorting policy. |
int |
getStyle()
Gets the Style for the resulting trees. |
JGoTreeNetwork |
getTreeNetwork()
Gets the JGoTreeNetwork that the layout will be performed on. |
protected void |
InitializeTreeNodeValues(JGoTreeNetworkNode n)
Assign initial property values for a JGoTreeNetworkNode. |
protected void |
LayoutNodesAndLinks()
Call JGoTreeNetworkNode.CommitPosition to position each node,
call LayoutComments, and then call
JGoTreeNetworkLink.CommitPosition to route the links. |
void |
performLayout()
Do a tree layout. |
void |
setAlignment(int value)
Sets the default alignment of parents relative to their children. |
void |
setAngle(float value)
Sets the default direction for tree growth. |
void |
setArrangement(int value)
Set how ArrangeTrees should lay out the separate trees. |
void |
setArrangementOrigin(java.awt.Point value)
Sets the point at which ArrangeTrees will position the trees. |
void |
setArrangementSpacing(java.awt.Dimension value)
Sets the space between which ArrangeTrees will position the trees. |
void |
setBreadthLimit(int value)
Sets a limit on how broad a tree should be. |
void |
setChildPortSpot(int value)
Sets the spot that children nodes' JGoPorts get as their ToSpot. |
void |
setCompaction(int value)
Sets how closely to pack the child nodes of a subtree. |
void |
setComparer(java.util.Comparator value)
Sets the default Comparator used for sorting. |
void |
setDocument(JGoDocument value)
Sets the AutoLayout's JGoDocument to d. |
void |
setLayerSpacing(int value)
Sets the distance between a parent node and its children. |
void |
setNodeIndent(int value)
Gets the default indentation of the first child. |
void |
setNodeSpacing(int value)
Sets the distance between child nodes. |
void |
setPath(int value)
Sets how the tree should be constructed from the JGoTreeNetworkLinks
connecting JGoTreeNetworkNodes. |
void |
setPortSpot(int value)
Sets the spot that this node's JGoPort gets as its FromSpot. |
protected void |
SetPortSpots(JGoTreeNetworkNode n)
Assign port spots for single-port nodes. |
void |
setRoots(JGoObjectCollection value)
Sets a JGoObject Collection of root JGoObjects. |
void |
setRowIndent(int value)
Sets the default indentation of the first child of each row. |
void |
setRowSpacing(int value)
Sets the distance between rows of children. |
void |
setSetsChildPortSpot(boolean value)
Sets whether SetPortSpots should set the JGoPort ToSpot for each child node port. |
void |
setSetsPortSpot(boolean value)
Gets whether SetPortSpots should set the JGoPort FromSpot for this parent node port. |
void |
setSorting(int value)
Sets the default sorting policy. |
void |
setStyle(int value)
Sets the Style for the resulting trees. |
void |
SortAll()
|
void |
SortTree(JGoTreeNetworkNode n)
|
protected void |
SortTreeNodeChildren(JGoTreeNetworkNode n)
Sort the JGoTreeNetworkNode Children of a node. |
protected void |
WalkTree(JGoTreeNetworkNode n)
Traverse the JToTreeNetwork
and assign the JGoTreeNetworkNode,
JGoTreeNetworkNode Parent, and JGoTreeNetworkNode Level, and
JGoTreeNetworkNode Children properties. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PathDestination
public static final int PathDestination
- See Also:
- Constant Field Values
PathSource
public static final int PathSource
- See Also:
- Constant Field Values
StyleLayered
public static final int StyleLayered
- See Also:
- Constant Field Values
StyleLastParents
public static final int StyleLastParents
- See Also:
- Constant Field Values
StyleAlternating
public static final int StyleAlternating
- See Also:
- Constant Field Values
ArrangementVertical
public static final int ArrangementVertical
- See Also:
- Constant Field Values
ArrangementHorizontal
public static final int ArrangementHorizontal
- See Also:
- Constant Field Values
ArrangementFixedRoots
public static final int ArrangementFixedRoots
- See Also:
- Constant Field Values
JGoTreeAutoLayout
public JGoTreeAutoLayout()
- Construct a layout with the default values
JGoTreeAutoLayout
public JGoTreeAutoLayout(JGoDocument doc)
- Construct a layout with the default values and create a JGoTreeNetwork from
the provided JGoDocument.
- Parameters:
doc - the JGoDocument from which to create the JGoTreeNetwork
JGoTreeAutoLayout
public JGoTreeAutoLayout(JGoSelection sel)
- Construct a lyout with the default values and create a JGoTreeNetwork from
the provided JGoSelection
- Parameters:
sel - the JGoSelection from which to create the JGoTreeNetwork
getTreeNetwork
public JGoTreeNetwork getTreeNetwork()
- Gets the JGoTreeNetwork that the layout will be performed on.
- Returns:
getNetwork
public JGoNetwork getNetwork()
- Use getTreeNetwork instead. This overrides the super method to return null.
- Overrides:
getNetwork in class JGoAutoLayout
- Returns:
getDocument
public JGoDocument getDocument()
- Description copied from class:
JGoAutoLayout
- Returns the AutoLayout's JGoDocument.
- Overrides:
getDocument in class JGoAutoLayout
setDocument
public void setDocument(JGoDocument value)
- Description copied from class:
JGoAutoLayout
- Sets the AutoLayout's JGoDocument to d.
If getNetwork() is null, this also creates a JGoNetwork
for the document and calls setNetwork.
- Overrides:
setDocument in class JGoAutoLayout
- Parameters:
value - the new value for the document
performLayout
public void performLayout()
- Do a tree layout.
If you are re-using this JGoTreeLayout with the same document, you should
set the TreeNetwork property to null to a new JGoTreeNetwork. If you are
re-using the same JGoTreeNetwork too you shouhld set the Roots peropties,
either by clearing it and letting FindRoots do its job, or by specifying
all the JGoTreeNetworkNodes that are the roots of your trees.
- Specified by:
performLayout in class JGoAutoLayout
getRoots
public JGoObjectCollection getRoots()
- Gets a JGoObject Collection of root JGoObjects.
Initially, this will be an empty collection. If the Path is either
PathDestination or PathSource, FindRoots can easily determine all of the
tree roots by searching the whole network. Otherwise, you should
explicitly initialize this collection
- Returns:
- a collection of root JGoObjects
setRoots
public void setRoots(JGoObjectCollection value)
- Sets a JGoObject Collection of root JGoObjects.
If the Path is either PathDestination or PathSource, FindRoots can easily
determine all of the tree roots by searching the whole network.
Otherwise, you should explicitly initialize this collection
getPath
public int getPath()
- Gets how the tree should be constructed from the JGoTreeNetworkLinks
connecting JGoTreeNetworkNodes. The default value is
PathDestination.
- Returns:
- PathDestination or PathSource
setPath
public void setPath(int value)
- Sets how the tree should be constructed from the JGoTreeNetworkLinks
connecting JGoTreeNetworkNodes. The default value is
PathDestination.
CreateTrees
protected void CreateTrees()
- This method is responsible for initializing all of the JGoTreeNetworkNodes,
setting JGoTreeNetworkNode Initialized, JGoTreeNetworkNode Leve,
JGoTreeNetworkNode Parent, and JGoTreeNetworkNode Children, and making
sure Roots has at least one suitable JGoObject in it.
This will call FinRoots if Roots is empty.
Then it will iterate over the roots, calling WalkTree on each one.
FindRoots
public void FindRoots()
- This method is responsible for finding all the root nodes.
When you have not already added the roots to the Roots collection, this
will choose a root node. The choice might not be what you want, so we
recommend that you specify the Roots.
WalkTree
protected void WalkTree(JGoTreeNetworkNode n)
- Traverse the JToTreeNetwork
and assign the JGoTreeNetworkNode,
JGoTreeNetworkNode Parent, and JGoTreeNetworkNode Level, and
JGoTreeNetworkNode Children properties.
This method should walk the tree recursively. The standard implementation
gracefully handles shared nodes, including cyclical references.
However, there can only be one JGoTreeNetworkNode Parent per node.
If a node is declared to be the child of mulitple nodes, it is not
guaranteed which node wins as the parent node. If any of the children of
this node are in the Roots collection, they are removed from that
collection.
- Parameters:
n -
getStyle
public int getStyle()
- Gets the Style for the resulting trees. Possible styles are
StyleAlternating, StyleLastParents, and StyleLayered. The default
value is StyleLayered.
- Returns:
setStyle
public void setStyle(int value)
- Sets the Style for the resulting trees. Possible styles are
StyleAlternating, StyleLastParents, and StyleLayered. The default
value is StyleLayered.
- Parameters:
value -
InitializeTreeNodeValues
protected void InitializeTreeNodeValues(JGoTreeNetworkNode n)
- Assign initial property values for a JGoTreeNetworkNode.
The values may be inherited, so this method is called while propagating
values from the root nodes. This method should not walk the tree, since
it is called for each JGoTreeNetworkNode in a depth-first manner starting
at a root. You probably do not need to override this method, but if you
do you should call either the base method or
JGoTreeNetworkNode.CopyInheritedPropertiesFrom, since they assign most
of the JGoTreeNetworkNode property values used to influence the layout.
Informational properties such as JGoTreeNetworkNode DescendentCount and
JGoiTreeNetworkNode MaxGenerationCount will not yet have been initialized
by the time the method is called.
It is more common to override AssignTreeNodeValues in order to modify
a property to two to customize the layout at that node.
- Parameters:
n -
AssignTreeNodeValues
protected void AssignTreeNodeValues(JGoTreeNetworkNode n)
- Assign final property values for a JGoTreeNetworkNode.
This method is commonly overridden in order to provide tree layout
properties for particular nodes. This method is called after values have
been inherited from other JGoTreeNetworkNodes, so you can examine and
modify the values of related tree nodes.
This method should not walk the tree, since it is called for each
JGoTreeNetowrkNode in a depth-first manner starting at a root.
- Parameters:
n -
SortAll
public void SortAll()
SortTree
public void SortTree(JGoTreeNetworkNode n)
SortTreeNodeChildren
protected void SortTreeNodeChildren(JGoTreeNetworkNode n)
- Sort the JGoTreeNetworkNode Children of a node.
This method should not walk the tree, since it is called fro each
JGoTreeNetworkNode in a breadth-first manner starting at a root.
- Parameters:
n -
getArrangement
public int getArrangement()
- Get how ArrangeTrees should lay out the separate trees.
Possible values are ArrangementFixedRoots, ArrangementHorizontal,
ArrangementVertical.
The default value is ArrangementVertical.
- Returns:
setArrangement
public void setArrangement(int value)
- Set how ArrangeTrees should lay out the separate trees.
Possible values are ArrangementFixedRoots, ArrangementHorizontal,
ArrangementVertical.
The default value is ArrangementVertical.
- Parameters:
value -
getArrangementOrigin
public java.awt.Point getArrangementOrigin()
- Sets the point at which ArrangeTrees will position the trees.
This defaults to the Point(50, 50).
- Returns:
setArrangementOrigin
public void setArrangementOrigin(java.awt.Point value)
- Sets the point at which ArrangeTrees will position the trees.
This defaults to the Point(50, 50).
- Parameters:
value -
getArrangementSpacing
public java.awt.Dimension getArrangementSpacing()
- Gets the space between which ArrangeTrees will position the trees.
This defaults to Dimension(10, 10).
- Returns:
setArrangementSpacing
public void setArrangementSpacing(java.awt.Dimension value)
- Sets the space between which ArrangeTrees will position the trees.
This defaults to Dimension(10, 10).
- Parameters:
value -
ArrangeTrees
protected void ArrangeTrees()
- Position each separate tree.
This is called after each tree has been laid out and thus each subtree
bounds are known.
LayoutNodesAndLinks
protected void LayoutNodesAndLinks()
- Call JGoTreeNetworkNode.CommitPosition to position each node,
call LayoutComments, and then call
JGoTreeNetworkLink.CommitPosition to route the links.
SetPortSpots
protected void SetPortSpots(JGoTreeNetworkNode n)
- Assign port spots for single-port nodes.
Assign port spots if JGoTreeNetworkNode SetsPortSpot or JGoTreeNetworkNode SetsChildPortSpot
is true, according to the value of PortSpot or ChildPortSpot.
This iterates over all the JGoTreeNetworkLinks in the network, finds the
corresponding JGoPort, and assigns their FromSpot and/or ToSpot property
if the JGoTreeNetworkNode. SetsPortSpot and/or SetsChildPortSpot properties
are true, and if the port's node only has a single port.
The spot values are given by PortSpot and ChildPortSpot respectively, unless
the value is JGoObject.NoSpot.
In the latter case the actual spot is determined by the JGoTreeNetworkNode Angle
of the parent node (the JGoTreeNetworkLink FromNode).
For example, when the angle is zero, the tree gows deeper toward the right.
So the JGoPort FromSpot will be set to JGoObject.MiddleRight, and the
JGoPort ToSpot will be set to JGoObject.MiddleLeft.
- Parameters:
n -
getRootDefaults
public JGoTreeNetworkNode getRootDefaults()
- Gets the object holding the default values for the root JGoTreeNetworkNode.
The values for the following inheritable properties are actually stored in
this object:
Sorting, Comparer, Angle, Alignment, NodeIndent, NodeSpacing, LayerSpacing,
Compaction, BreadthLimit, RowSpacing, RowIndent, CommentSpacing, CommentMargin,
SetsPortSpot, PortSpot, SetsChildPortSpot, ChildPortSpot.
The other properties of this JGoTreeNetworkNode are ignored.
- Returns:
getAlternateDefaults
public JGoTreeNetworkNode getAlternateDefaults()
- Gets the object holding the default values for alternate layer JGoTreeNetworkNodes.
Used when the Style is StyleAlternating or StyleLastParents.
See the list of inheritable properties in the remarks for RootDefaults.
The other properties of this JGoTreeNetworkNode are ignored.
- Returns:
getSorting
public int getSorting()
- Gets the default sorting policy.
Possible values are SortingAscending (the sort order given by JGoTreeNetworkNode Comparer),
SortingDescending (the reverse of the sort order given by JGoTreeNetworkNode Comparer),
SortingForward (the order they were found),
SortingReverse (the reverse order from which they were found).
The default is SortingForwards.
- Returns:
setSorting
public void setSorting(int value)
- Sets the default sorting policy.
Possible values are SortingAscending (the sort order given by JGoTreeNetworkNode Comparer),
SortingDescending (the reverse of the sort order given by JGoTreeNetworkNode Comparer),
SortingForward (the order they were found),
SortingReverse (the reverse order from which they were found).
The default is SortingForwards.
- Parameters:
value -
getComparer
public java.util.Comparator getComparer()
- Gets the default Comparator used for sorting.
The default Comparator assumes each JGoTreeNetworkNode JGoObject is
a JGoLabeledPart and compares their Text values.
This method just gets the RootDefaults property of the same name.
- Returns:
setComparer
public void setComparer(java.util.Comparator value)
- Sets the default Comparator used for sorting.
The default Comparator assumes each JGoTreeNetworkNode JGoObject is
a JGoLabeledPart and compares their Text values.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getAlphabeticNodeTextComparer
public java.util.Comparator getAlphabeticNodeTextComparer()
getAngle
public float getAngle()
- Gets the default direction for tree growth.
The default value is 0; the value must be one of : 0, 90, 180, 270.
These values are in degrees, where 0 is along the positive x axis (right),
and where 90 is along the positive Y axis (down).
This just gets the RootDefaults property of the same name.
- Returns:
setAngle
public void setAngle(float value)
- Sets the default direction for tree growth.
The default value is 0; the value must be one of : 0, 90, 180, 270.
These values are in degrees, where 0 is along the positive x axis (right),
and where 90 is along the positive Y axis (down).
This just sets the RootDefaults property of the same name.
- Parameters:
value -
getAlignment
public int getAlignment()
- Gets the default alignment of parents relative to their children.
Possible values are JGoTreeNetworkNode.AlignmentCenterChildren,
AlignmentCenterSubTrees, AlignmentEnd, AlignmentStart.
The default value is JGoTreeNetworkNode.AlignmentCenterChildren.
This method just gets the RootDefaults property of the same name.
- Returns:
setAlignment
public void setAlignment(int value)
- Sets the default alignment of parents relative to their children.
Possible values are JGoTreeNetworkNode.AlignmentCenterChildren,
AlignmentCenterSubTrees, AlignmentEnd, AlignmentStart.
The default value is JGoTreeNetworkNode.AlignmentCenterChildren.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getNodeIndent
public int getNodeIndent()
- Gets the default indentation of the first child.
The default value is zero. The value should be non-negative.
This property is only sensible when the Alignment is
JGoTreeNetworkNode.AlignmentStart or AlignmentEnd. Having a positive
value is useful if you want to reserve space at the start of the row
of children for some reason.
For example, if you want to pretend the parent node is infinitely deep,
you can set this to be the breadth of parent node.
This method just gets or sets the RootDefaults property of the same name.
See also RowIndent.
- Returns:
setNodeIndent
public void setNodeIndent(int value)
- Gets the default indentation of the first child.
The default value is zero. The value should be non-negative.
This property is only sensible when the Alignment is
JGoTreeNetworkNode.AlignmentStart or AlignmentEnd. Having a positive
value is useful if you want to reserve space at the start of the row
of children for some reason.
For example, if you want to pretend the parent node is infinitely deep,
you can set this to be the breadth of parent node.
This method just gets or sets the RootDefaults property of the same name.
See also RowIndent.
- Parameters:
value -
getNodeSpacing
public int getNodeSpacing()
- Gets the distance between child nodes.
The default value is 20. A negative value causes sibling nodes to overlap.
This method just gets the RootDefaults property of the same name.
- Returns:
setNodeSpacing
public void setNodeSpacing(int value)
- Sets the distance between child nodes.
The default value is 20. A negative value causes sibling nodes to overlap.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getLayerSpacing
public int getLayerSpacing()
- Gets the distance between a parent node and its children.
The default value is 50.
This is the distance between a parent node and its first row of children,
in case there are multiple rows of its children.
The RowSpacing property determines the distance between rows of children.
Negative values may cause children to overlap with the parent.
This method just gets the RootDefaults property of the same name.
- Returns:
setLayerSpacing
public void setLayerSpacing(int value)
- Sets the distance between a parent node and its children.
The default value is 50.
This is the distance between a parent node and its first row of children,
in case there are multiple rows of its children.
The RowSpacing property determines the distance between rows of children.
Negative values may cause children to overlap with the parent.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getCompaction
public int getCompaction()
- Gets how closely to pack the child nodes of a subtree.
The default value is JGoTreeNetworkNode.CompactionBlock.
This method just gets the RootDefaults property of the same name.
- Returns:
setCompaction
public void setCompaction(int value)
- Sets how closely to pack the child nodes of a subtree.
The default value is JGoTreeNetworkNode.CompactionBlock.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getBreadthLimit
public int getBreadthLimit()
- Gets a limit on how broad a tree should be.
A value of zero (the default) means there is no limit; a positive value
specifies a limit. The default value is zero.
This property is just a suggested constraint on how broadly the tree will
be laid out. When there isn't enough breadth for all of the children of
a node, the children are placed in as many rows as needed to try to stay
within the given breadth limit.
If the value is too small, since this layout algorithm does not modify the
size or shape of any node, the nodes will jsut be laid out in a line, one per row, and the
breadth is determined by the broadest node.
The distance between rows is specified by RowSpacing. To make room for the
links that go around earlier rows to get to later rows, when the alignment
is not a "center" alignment, the RowIndent property specifies that space
at the start of each row.
This method just gets the RootDefaults property of the same name.
- Returns:
setBreadthLimit
public void setBreadthLimit(int value)
- Sets a limit on how broad a tree should be.
A value of zero (the default) means there is no limit; a positive value
specifies a limit. The default value is zero.
This property is just a suggested constraint on how broadly the tree will
be laid out. When there isn't enough breadth for all of the children of
a node, the children are placed in as many rows as needed to try to stay
within the given breadth limit.
If the value is too small, since this layout algorithm does not modify the
size or shape of any node, the nodes will jsut be laid out in a line, one per row, and the
breadth is determined by the broadest node.
The distance between rows is specified by RowSpacing. To make room for the
links that go around earlier rows to get to later rows, when the alignment
is not a "center" alignment, the RowIndent property specifies that space
at the start of each row.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getRowSpacing
public int getRowSpacing()
- Gets the distance between rows of children.
The default value is 25.
This property is only used when there is more than one row of children for
a given parent node. LayerSpacing determines the distance between the
parent node and its first row of child nodes.
This method just gets the RootDefaults property of the same name.
See also BreadthLimit and RowIndent.
- Returns:
setRowSpacing
public void setRowSpacing(int value)
- Sets the distance between rows of children.
The default value is 25.
This property is only used when there is more than one row of children for
a given parent node. LayerSpacing determines the distance between the
parent node and its first row of child nodes.
This method just sets the RootDefaults property of the same name.
See also BreadthLimit and RowIndent.
- Parameters:
value -
getRowIndent
public int getRowIndent()
- Gets the default indentation of the first child of each row.
Used only if the JGoTreeNetworkNode Alignment is not a "center" alignment.
The default value is 10. The value should be non-negative.
This is used to leave room for the links that connect a parent node
with the child nodes that are in additional rows.
This method just gets the RootDefaults property of the same name.
setRowIndent
public void setRowIndent(int value)
- Sets the default indentation of the first child of each row.
Used only if the JGoTreeNetworkNode Alignment is not a "center" alignment.
The default value is 10. The value should be non-negative.
This is used to leave room for the links that connect a parent node
with the child nodes that are in additional rows.
This method just sets the RootDefaults property of the same name.
- Returns:
getSetsPortSpot
public boolean getSetsPortSpot()
- Gets whether SetPortSpots should set the JGoPort FromSpot for this parent node port.
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 InitializeTreeNodeValues method.
The spot used depends on the value of PortSpot.
This method just gets the RootDefaults property of the same name.
- Returns:
setSetsPortSpot
public void setSetsPortSpot(boolean value)
- Gets whether SetPortSpots should set the JGoPort FromSpot for this parent node port.
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 InitializeTreeNodeValues method.
The spot used depends on the value of PortSpot.
This method just gets the RootDefaults property of the same name.
- Parameters:
value -
getPortSpot
public int getPortSpot()
- Gets the spot that this node's JGoPort gets as its FromSpot.
The default value is JGoObject.NoSpot.
This inherited property is initialized in the InitializeTreeNodeValues method.
A value of JGoObject.NoSpot will cause SetPortSpots to assign a FromSpot based
on the parent node's Angle.
If the value is other than JGoObject.NoSpot, it is just assigned.
When Path is PathSource, the JGoPort's ToSpot is set instead of the FromSpot.
This method just gets the RootDefaults property of the same name.
- Returns:
setPortSpot
public void setPortSpot(int value)
- Sets the spot that this node's JGoPort gets as its FromSpot.
The default value is JGoObject.NoSpot.
This inherited property is initialized in the InitializeTreeNodeValues method.
A value of JGoObject.NoSpot will cause SetPortSpots to assign a FromSpot based
on the parent node's Angle.
If the value is other than JGoObject.NoSpot, it is just assigned.
When Path is PathSource, the JGoPort's ToSpot is set instead of the FromSpot.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getSetsChildPortSpot
public boolean getSetsChildPortSpot()
- Gets whether SetPortSpots should set the JGoPort ToSpot for each child node port.
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 InitializeTreeNodeValues
method. The spot used depends on the value of ChildPortSpot.
This method just gets the RootDefaults property of the same name.
- Returns:
setSetsChildPortSpot
public void setSetsChildPortSpot(boolean value)
- Sets whether SetPortSpots should set the JGoPort ToSpot for each child node port.
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 InitializeTreeNodeValues
method. The spot used depends on the value of ChildPortSpot.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -
getChildPortSpot
public int getChildPortSpot()
- Gets the spot that children nodes' JGoPorts get as their ToSpot.
The default value is JGoObject.NoSpot.
This inherited property is initialized in the InitializeTreeNodeValues method.
A vluae of JGoObject.NoSpot will cause SetPortSpots to assign a ToSpot
based on the parent node's JGoTreeNetworkNode Angle.
If the value is other than JGoObject.NoSpot, it is just assigned.
When Path is PathSource, the JGoPort's FromSpot is set instead of the
ToSpot.
This method just gets the RootDefaults property of the same name.
- Returns:
setChildPortSpot
public void setChildPortSpot(int value)
- Sets the spot that children nodes' JGoPorts get as their ToSpot.
The default value is JGoObject.NoSpot.
This inherited property is initialized in the InitializeTreeNodeValues method.
A vluae of JGoObject.NoSpot will cause SetPortSpots to assign a ToSpot
based on the parent node's JGoTreeNetworkNode Angle.
If the value is other than JGoObject.NoSpot, it is just assigned.
When Path is PathSource, the JGoPort's FromSpot is set instead of the
ToSpot.
This method just sets the RootDefaults property of the same name.
- Parameters:
value -