public class TreeLayout extends java.lang.Object implements Layout
setType(com.mindfusion.diagramming.TreeLayoutType)
method.Constructor and Description |
---|
TreeLayout()
Initializes a new instance of the TreeLayout class.
|
TreeLayout(DiagramNode root)
Initializes a new instance of the TreeLayout class, specifying which
node to use as a tree root.
|
TreeLayout(DiagramNode root,
TreeLayoutType type)
Initializes a new instance of the TreeLayout class, specifying the
root node and layout mode.
|
TreeLayout(DiagramNode root,
TreeLayoutType type,
boolean reversedLinks,
TreeLayoutLinkType linkStyle,
TreeLayoutDirection direction,
float levelDistance,
float nodeDistance,
boolean keepRootPosition,
float xGap,
float yGap)
Initializes a new instance of the TreeLayout class.
|
TreeLayout(DiagramNode root,
TreeLayoutType type,
boolean reversedLinks,
TreeLayoutLinkType linkStyle,
TreeLayoutDirection direction,
float levelDistance,
float nodeDistance,
boolean keepRootPosition,
float xGap,
float yGap,
boolean keepGroupLayout)
Initializes a new instance of the TreeLayout class.
|
TreeLayout(TreeLayoutType type)
Initializes a new instance of the TreeLayout class, specifying the
layout mode.
|
Modifier and Type | Method and Description |
---|---|
boolean |
arrange(Diagram chart)
Arranges the specified flowchart.
|
Anchoring |
getAnchoring()
Gets a value indicating how links will be aligned to the anchor points of tree nodes.
|
TreeLayoutBalance |
getBalance()
Gets a value indicating the ordering of the child
nodes in order to produce layouts with custom balance.
|
boolean |
getCompactAssistants()
Gets a value indicating whether the "assistant" nodes on the
same side of a single parent are arranged as close enough to each other
as possible.
|
TreeLayoutDirection |
getDirection()
Gets a value indicating in what direction child nodes
should be placed relatively to their parent nodes.
|
boolean |
getEnableAssistants()
Gets a value indicating whether the "assistant" trait
is regarded when performing the layout.
|
boolean |
getIgnoreLinkDirection()
Gets a value indicating whether the direction of links should be ignored.
|
boolean |
getKeepGroupLayout()
Gets a value indicating whether groups of diagram nodes should be
treated as integral nodes in the tree that will be laid out.
|
boolean |
getKeepRootPosition()
Gets a value indicating whether the root node should be kept
at its original position.
|
float |
getLevelDistance()
Gets the desired distance between tree levels.
|
TreeLayoutLinkType |
getLinkStyle()
Gets what style is assigned to the links processed by the TreeLayout.
|
float |
getNodeDistance()
Gets the desired distance between nodes on the same level.
|
boolean |
getReversedLinks()
Gets a value indicating which direction of links should be
considered the parent-to-child one.
|
DiagramNode |
getRoot()
Gets the node which will be used as root of the tree.
|
float |
getStretchFactor()
Gets a value defining the elliptic factor used with radial layouts.
|
TreeLayoutType |
getType()
Gets the layout mode.
|
float |
getXGap()
Gets a value indicating how much horizontal space to leave between
the document boundaries and the tree.
|
float |
getYGap()
Gets a value indicating how much vertical space to leave between
the document boundaries and the tree.
|
com.mindfusion.diagramming.builders.TreeLayoutBuilder |
init()
Returns a TreeLayoutBuilder object used to configure this TreeLayout instance.
|
void |
setAnchoring(Anchoring value)
Sets a value indicating how links should be aligned to the anchor points of tree nodes.
|
void |
setBalance(TreeLayoutBalance value)
Sets a value indicating the ordering of the child
nodes in order to produce layouts with custom balance.
|
void |
setCompactAssistants(boolean value)
Sets a value indicating whether the "assistant" nodes on the
same side of a single parent are arranged as close enough to each other
as possible.
|
void |
setDirection(TreeLayoutDirection value)
Sets a value indicating in what direction child nodes
should be placed relatively to their parent nodes.
|
void |
setEnableAssistants(boolean value)
Sets a value indicating whether the "assistant" trait
is regarded when performing the layout.
|
void |
setIgnoreLinkDirection(boolean value)
Sets a value indicating whether the direction of links should be ignored.
|
void |
setKeepGroupLayout(boolean value)
Sets a value indicating whether groups of diagram nodes should be
treated as integral nodes in the tree that will be laid out.
|
void |
setKeepRootPosition(boolean value)
Sets a value indicating whether the root node should be kept
at its original position.
|
void |
setLevelDistance(float value)
Sets the desired distance between tree levels.
|
void |
setLinkStyle(TreeLayoutLinkType value)
Sets what style should be assigned to the links processed by the
layout algorithm.
|
void |
setNodeDistance(float value)
Sets the desired distance between nodes on the same level.
|
void |
setReversedLinks(boolean value)
Sets a value indicating which direction of links should be
considered the parent-to-child one.
|
void |
setRoot(DiagramNode value)
Sets the object which will be used as root of the tree.
|
void |
setStretchFactor(float value)
Sets a value defining the elliptic factor used with radial layouts.
|
void |
setType(TreeLayoutType value)
Sets the layout mode.
|
void |
setXGap(float value)
Sets a value indicating how much horizontal space to leave between
the document boundaries and the tree.
|
void |
setYGap(float value)
Sets a value indicating how much vertical space to leave between
the document boundaries and the tree.
|
static com.mindfusion.diagramming.builders.TreeLayoutBuilder |
with()
Returns a TreeLayoutBuilder object used to configure and create new TreeLayout instances.
|
public TreeLayout()
public TreeLayout(DiagramNode root)
root
- A DiagramNode
-derived object representing the tree root node.public TreeLayout(TreeLayoutType type)
type
- A member of the TreeLayoutType
enumeration.public TreeLayout(DiagramNode root, TreeLayoutType type)
root
- A DiagramNode
-derived object representing the tree root node.type
- A member of the TreeLayoutType
enumeration.public TreeLayout(DiagramNode root, TreeLayoutType type, boolean reversedLinks, TreeLayoutLinkType linkStyle, TreeLayoutDirection direction, float levelDistance, float nodeDistance, boolean keepRootPosition, float xGap, float yGap)
root
- A DiagramNode
-derived object representing the tree root node.type
- A member of the TreeLayoutType
enumeration.reversedLinks
- true
if the parent-to-child direction
in the tree is considered to be the one from links destination
nodes to links origin nodes, otherwise false
.linkStyle
- A member of the TreeLayoutLinkType
enumeration.direction
- A member of the TreeLayoutDirection
enumeration.levelDistance
- A float value specifying the distance between tree levels.nodeDistance
- A float value specifying the distance between sibling nodes.keepRootPosition
- true
if the root position
should be preserved, otherwise false
.xGap
- A float value specifying the horizontal offset
from the left document border.yGap
- A float value specifying the vertical offset
from the top document border.public TreeLayout(DiagramNode root, TreeLayoutType type, boolean reversedLinks, TreeLayoutLinkType linkStyle, TreeLayoutDirection direction, float levelDistance, float nodeDistance, boolean keepRootPosition, float xGap, float yGap, boolean keepGroupLayout)
root
- A DiagramNode
-derived object representing the tree root node.type
- A member of the TreeLayoutType
enumeration.reversedLinks
- true
if the parent-to-child direction
in the tree is considered to be the one from links destination
nodes to links origin nodes, otherwise false
.linkStyle
- A member of the TreeLayoutLinkType
enumeration.direction
- A member of the TreeLayoutDirection
enumeration.levelDistance
- A float value specifying the distance between tree levels.nodeDistance
- A float value specifying the distance between sibling nodes.keepRootPosition
- true
if the root position
should be preserved, otherwise false
.xGap
- A float value specifying the horizontal offset
from the left document border.yGap
- A float value specifying the vertical offset
from the top document border.keepGroupLayout
- true
if the relative position of
nodes within groups should be preserved, otherwise false
.public boolean arrange(Diagram chart)
public DiagramNode getRoot()
DiagramNode
-derived object representing the tree root node.public void setRoot(DiagramNode value)
value
- A DiagramNode
-derived object representing the tree root node.public TreeLayoutType getType()
TreeLayoutType
enumeration.public void setType(TreeLayoutType value)
value
- A member of the TreeLayoutType
enumeration.public TreeLayoutLinkType getLinkStyle()
TreeLayoutLinkType
constants.public void setLinkStyle(TreeLayoutLinkType value)
value
- A member of the TreeLayoutLinkType
enumeration.public float getLevelDistance()
public void setLevelDistance(float value)
value
- A float value specifying the distance between tree levels.public float getNodeDistance()
public void setNodeDistance(float value)
value
- A float value specifying the distance between sibling nodes.public boolean getKeepRootPosition()
true
if the root position will be preserved,
otherwise false
.public void setKeepRootPosition(boolean value)
value
- true
if the root position should be
preserved, otherwise false
.public float getXGap()
public void setXGap(float value)
value
- A float value specifying the horizontal offset from the
left document border.public float getYGap()
public void setYGap(float value)
value
- A float value specifying the vertical offset from the
top document border.public float getStretchFactor()
public void setStretchFactor(float value)
value
- A float multiplier that is applied to the horizontal distance
between nodes in a radial layout.public TreeLayoutDirection getDirection()
TreeLayoutDirection
enumeration.public void setDirection(TreeLayoutDirection value)
value
- A member of the TreeLayoutDirection
enumeration.public boolean getReversedLinks()
true
if the parent-to-child direction in the tree
is considered to be the one from links destination nodes to
links origin nodes, otherwise false
.public void setReversedLinks(boolean value)
value
- true
if the parent-to-child direction in the tree
is considered to be the one from links destination nodes to
links origin nodes, otherwise false
.public boolean getKeepGroupLayout()
true
if the relative position of nodes within
groups should be preserved, otherwise false
.public void setKeepGroupLayout(boolean value)
value
- true
if the relative position of nodes within
groups should be preserved, otherwise false
.public boolean getIgnoreLinkDirection()
true
if the direction of links will be ignored
when arranging a tree, otherwise false
.public void setIgnoreLinkDirection(boolean value)
value
- true
if the direction of links should be
ignored when arranging a tree, otherwise false
.public TreeLayoutBalance getBalance()
TreeLayoutBalance
enumeration.public void setBalance(TreeLayoutBalance value)
value
- A member of the TreeLayoutBalance
enumeration.public Anchoring getAnchoring()
Anchoring
enumeration.public void setAnchoring(Anchoring value)
value
- A member of the Anchoring
enumeration.public boolean getEnableAssistants()
public void setEnableAssistants(boolean value)
public boolean getCompactAssistants()
public void setCompactAssistants(boolean value)
public static com.mindfusion.diagramming.builders.TreeLayoutBuilder with()
TreeLayoutBuilder
instance.public com.mindfusion.diagramming.builders.TreeLayoutBuilder init()
TreeLayoutBuilder
instance.