public class GridLayout extends java.lang.Object implements Layout
Constructor and Description |
---|
GridLayout()
Initializes a new instance of the GridLayout class.
|
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.
|
DiagramNode |
getEndNode()
Gets the node that should be placed at the bottom right corner of the grid.
|
float |
getGridSize()
Gets the desired distance between adjacent grid points.
|
int |
getIterations()
Gets the number of iterations that the layout algorithm should run.
|
boolean |
getKeepGroupLayout()
Gets a value specifying whether the relative position of nodes
within groups should be kept intact.
|
int |
getRandomSeed()
Gets the randomization seed used for generating random node positions.
|
DiagramNode |
getStartNode()
Gets the node that should be placed at the upper left corner of the grid.
|
float |
getXGap()
Gets a value indicating how much horizontal space should be left
between the document boundaries and the graph.
|
float |
getYGap()
Gets a value indicating how much vertical space should be left
between the document boundaries and the graph.
|
com.mindfusion.diagramming.builders.GridLayoutBuilder |
init()
Returns a GridLayoutBuilder object used to configure this GridLayout instance.
|
void |
setAnchoring(Anchoring value)
Sets a value indicating how links should be aligned to the anchor points of tree nodes.
|
void |
setEndNode(DiagramNode value)
Sets the node that should be placed at the bottom right corner of the grid.
|
void |
setGridSize(float value)
Sets the desired distance between adjacent grid points.
|
void |
setIterations(int value)
Sets the number of iterations that the layout algorithm should run.
|
void |
setKeepGroupLayout(boolean value)
Sets a value specifying whether the relative position of nodes
within groups should be kept intact.
|
void |
setRandomSeed(int value)
Sets the randomization seed used for generating random node positions.
|
void |
setStartNode(DiagramNode value)
Sets the node that should be placed at the upper left corner of the grid.
|
void |
setXGap(float value)
Sets a value indicating how much horizontal space should be left
between the document boundaries and the graph.
|
void |
setYGap(float value)
Sets a value indicating how much vertical space should be left
between the document boundaries and the graph.
|
static com.mindfusion.diagramming.builders.GridLayoutBuilder |
with()
Returns a GridLayoutBuilder object used to configure and create new GridLayout instances.
|
public GridLayout()
public boolean arrange(Diagram chart)
public DiagramNode getStartNode()
DiagramNode
.public void setStartNode(DiagramNode value)
setEndNode(com.mindfusion.diagramming.DiagramNode)
method to specify the end node. GridLayout usually produces better
layouts if you do not specify start and end nodes; in such a case the
algorithm automatically selects suitable nodes.value
- A DiagramNode
object representing the grid start node.public DiagramNode getEndNode()
DiagramNode
.public void setEndNode(DiagramNode value)
setStartNode(com.mindfusion.diagramming.DiagramNode)
method to specify the start node. GridLayout usually produces better
layouts if you do not specify start and end nodes; in such a case the
algorithm automatically selects suitable nodes.value
- A DiagramNode
object representing the grid end node.public int getIterations()
public void setIterations(int value)
value
- An integer value specifying the number of iterations.public float getGridSize()
public void setGridSize(float value)
value
- A float value specifying the distance between adjacent grid points.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 int getRandomSeed()
public void setRandomSeed(int value)
value
- An integer value specifying the randomization seed.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 Anchoring getAnchoring()
Anchoring
enumeration.public void setAnchoring(Anchoring value)
value
- A member of the Anchoring
enumeration.public static com.mindfusion.diagramming.builders.GridLayoutBuilder with()
GridLayoutBuilder
instance.public com.mindfusion.diagramming.builders.GridLayoutBuilder init()
GridLayoutBuilder
instance.