public class GridLayoutBuilder
extends java.lang.Object
Constructor and Description |
---|
GridLayoutBuilder()
Initializes a new instance of the GridLayoutBuilder class.
|
GridLayoutBuilder(GridLayout instance)
Initializes a new instance of the GridLayoutBuilder class.
|
Modifier and Type | Method and Description |
---|---|
GridLayoutBuilder |
anchoring(Anchoring value)
Sets a value indicating how links should be aligned to the anchor points of tree nodes.
|
GridLayout |
create()
Creates a new object with the attributes accumulated by this builder.
|
GridLayoutBuilder |
endNode(DiagramNode value)
Sets the node that should be placed at the bottom right corner of the grid.
|
GridLayout |
get()
Returns an existing object passed for initialization to this builder.
|
GridLayoutBuilder |
gridSize(float value)
Sets the desired distance between adjacent grid points.
|
GridLayoutBuilder |
iterations(int value)
Sets the number of iterations that the layout algorithm should run.
|
GridLayoutBuilder |
keepGroupLayout(boolean value)
Sets a value specifying whether the relative position of nodes
within groups should be kept intact.
|
GridLayoutBuilder |
randomSeed(int value)
Sets the randomization seed used for generating random node positions.
|
GridLayoutBuilder |
startNode(DiagramNode value)
Sets the node that should be placed at the upper left corner of the grid.
|
GridLayoutBuilder |
xGap(float value)
Sets a value indicating how much horizontal space should be left
between the document boundaries and the graph.
|
GridLayoutBuilder |
yGap(float value)
Sets a value indicating how much vertical space should be left
between the document boundaries and the graph.
|
public GridLayoutBuilder()
public GridLayoutBuilder(GridLayout instance)
public GridLayoutBuilder xGap(float value)
value
- A float value specifying the horizontal offset from the
left document border.public GridLayoutBuilder yGap(float value)
value
- A float value specifying the vertical offset from the
top document border.public GridLayoutBuilder anchoring(Anchoring value)
value
- A member of the Anchoring
enumeration.public GridLayoutBuilder endNode(DiagramNode value)
#setStartNode
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 GridLayoutBuilder gridSize(float value)
value
- A float value specifying the distance between adjacent grid points.public GridLayoutBuilder iterations(int value)
value
- An integer value specifying the number of iterations.public GridLayoutBuilder keepGroupLayout(boolean value)
value
- true
if the relative position of nodes within
groups should be preserved, otherwise false
.public GridLayoutBuilder randomSeed(int value)
value
- An integer value specifying the randomization seed.public GridLayoutBuilder startNode(DiagramNode value)
GridLayout.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 GridLayout create()
public GridLayout get()