|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindfusion.diagramming.GridLayout
public class GridLayout
Implements a grid graph layout algorithm. GridLayout arranges diagram nodes in a grid, keeping connected nodes close together. The algorithm strives to achieve a small number of arrow crossings. It is based on an iterative process whose initial steps shuffle the grid nodes randomly. That can lead to very different results each time the algorithm is run.
Constructor Summary | |
---|---|
GridLayout()
Initializes a new instance of the GridLayout class. |
Method Summary | |
---|---|
boolean |
arrange(Diagram chart)
Arranges the specified flowchart. |
int |
getAnchoring()
Gets a value indicating how arrows 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. |
void |
setAnchoring(int value)
Sets a value indicating how arrows 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GridLayout()
Method Detail |
---|
public boolean arrange(Diagram chart)
arrange
in interface Layout
chart
- The Diagram
to arrange.
true
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 bound.public float getYGap()
public void setYGap(float value)
value
- A float value specifying the vertical offset from the
top document bound.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 int getAnchoring()
Anchoring
constants.public void setAnchoring(int value)
value
- One of the Anchoring
constants.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |