public class SpringLayout extends java.lang.Object implements Layout
| Constructor and Description |
|---|
SpringLayout()
Initializes a new instance of the SpringLayout class.
|
SpringLayout(int iterationCount,
float nodeDistance,
boolean minimizeCrossings)
Initializes a new instance of the SpringLayout class.
|
SpringLayout(int iterationCount,
float nodeDistance,
boolean minimizeCrossings,
boolean keepGroupLayout)
Initializes a new instance of the SpringLayout 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.
|
boolean |
getEnableClusters()
Gets a value indicating whether the layout algorithm should place nodes
into distinct clusters.
|
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.
|
boolean |
getMinimizeCrossings()
Gets a value indicating whether the algorithm should try to minimize
the number of link crossings.
|
float |
getNodeDistance()
Gets how much space should be left between adjacent nodes.
|
int |
getRandomSeed()
Gets the randomization seed used for generating random node positions.
|
double |
getRepulsionFactor()
Gets a multiplier value applied to the repulsive force between nodes.
|
SpringLayoutBuilder |
init()
Returns a SpringLayoutBuilder object used to configure this SpringLayout instance.
|
void |
setAnchoring(Anchoring value)
Sets a value indicating how links should be aligned to the anchor points of tree nodes.
|
void |
setEnableClusters(boolean value)
Sets a value indicating whether the layout algorithm should place nodes
into distinct clusters.
|
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 |
setMinimizeCrossings(boolean value)
Sets a value indicating whether the algorithm should try to minimize
the number of link crossings.
|
void |
setNodeDistance(float value)
Sets how much space should be left between adjacent nodes.
|
void |
setRandomSeed(int value)
Sets the randomization seed that should be used for
generating random node positions.
|
void |
setRepulsionFactor(double value)
Sets a multiplier value applied to the repulsive force between nodes.
|
static SpringLayoutBuilder |
with()
Returns a SpringLayoutBuilder object used to configure and create new SpringLayout instances.
|
public SpringLayout()
public SpringLayout(int iterationCount,
float nodeDistance,
boolean minimizeCrossings)
iterationCount - The number of iterations that the
layout algorithm should run.nodeDistance - The desired distance between nodes.minimizeCrossings - true to minimize link crossings,
otherwise false.public SpringLayout(int iterationCount,
float nodeDistance,
boolean minimizeCrossings,
boolean keepGroupLayout)
iterationCount - The number of iterations that the
layout algorithm should run.nodeDistance - The desired distance between nodes.minimizeCrossings - true to minimize link crossings,
otherwise false.keepGroupLayout - true if the relative position of
nodes within groups should be preserved, otherwise false.public boolean arrange(Diagram chart)
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 getIterations()
public void setIterations(int value)
value - An integer value specifying the number of iterations.public float getNodeDistance()
public void setNodeDistance(float value)
value - A float value specifying the desired node distance.public boolean getMinimizeCrossings()
true if the layout routine will try to minimize
the number of link crossings, otherwise false.public void setMinimizeCrossings(boolean value)
value - true if the layout routine should try to minimize
the number of link crossings, otherwise false.public boolean getEnableClusters()
true if nodes will be placed in clusters
when possible, otherwise false.public void setEnableClusters(boolean value)
value - true if nodes should be placed in clusters
when possible, otherwise false.public double getRepulsionFactor()
public void setRepulsionFactor(double value)
value - A float value by which the repulsive force between nodes is multiplied.public int getRandomSeed()
public void setRandomSeed(int value)
value - An integer value specifying the randomization seed.public Anchoring getAnchoring()
Anchoring enumeration.public void setAnchoring(Anchoring value)
value - A member of the Anchoring enumeration.public static SpringLayoutBuilder with()
SpringLayoutBuilder instance.public SpringLayoutBuilder init()
SpringLayoutBuilder instance.