public class JGraphHierarchicalLayout extends java.lang.Object implements JGraphLayout, JGraphLayout.Stoppable
JGraphCompoundLayout
as a complete model of the hierarchy
needs to be passed into each step andJGraphLayout.Stoppable
Modifier and Type | Field and Description |
---|---|
protected boolean |
compactLayout
Whether or not to pull together sections of layout into empty space
|
protected JGraphHierarchicalLayoutStep |
crossingStage
The second stage of a Sugiyama layout
|
protected JGraphHierarchicalLayoutStep |
cycleStage
A cycle pre-processing stage
|
protected boolean |
deterministic
Whether or not cells are ordered according to the order in the graph
model.
|
protected boolean |
fineTuning
Whether or not to perform local optimisations and iterate multiple times
through the algorithm
|
protected boolean |
fixRoots
Whether or not to fix the position of the root cells.
|
protected double |
interHierarchySpacing
The spacing buffer between unconnected hierarchies
|
protected double |
interRankCellSpacing
The spacing buffer added between cell on adjacent layers
|
protected double |
intraCellSpacing
The spacing buffer added between cells on the same layer
|
protected JGraphHierarchicalLayoutStep |
layeringStage
The first stage of a Sugiyama layout
|
protected boolean |
layoutFromSinks
Whether or not the initial scan of the graph to determine the layer
assigned to each vertex starts from the sinks or source (the sinks
being vertices with the fewest, preferable zero, outgoing edges and
sources same with incoming edges).
|
protected JGraphHierarchyModel |
model
The internal model formed of the layout
|
protected int |
orientation
The position of the root node(s) relative to the laid out graph in
|
protected double |
parallelEdgeSpacing
The distance between each parallel edge on each ranks for long edges
|
protected JGraphHierarchicalLayoutStep |
placementStage
The third stage of a Sugiyama layout
|
protected JGraphLayoutProgress |
progress
The layout progress bar
|
VERSION
Constructor and Description |
---|
JGraphHierarchicalLayout()
The default constructor
|
JGraphHierarchicalLayout(boolean deterministic)
Creates a hierarchical layout, constructing the components of the layout
stages
|
Modifier and Type | Method and Description |
---|---|
double |
getInterHierarchySpacing() |
double |
getInterRankCellSpacing() |
double |
getIntraCellSpacing() |
int |
getOrientation() |
double |
getParallelEdgeSpacing() |
JGraphLayoutProgress |
getProgress()
Returns the progress object that represents the progress of the
current layout run.
|
boolean |
isCompactLayout() |
boolean |
isDeterministic() |
boolean |
isFineTuning() |
boolean |
isFixRoots() |
boolean |
isLayoutFromSinks() |
void |
run(JGraphFacade facade)
The API method used to exercise the layout upon the facade description
and produce a separate description of the vertex position and edge
routing changes made.
|
void |
setCompactLayout(boolean compactLayout) |
void |
setDeterministic(boolean deterministic) |
void |
setFineTuning(boolean fineTuning) |
void |
setFixRoots(boolean fixRoots) |
void |
setInterHierarchySpacing(double interHierarchySpacing) |
void |
setInterRankCellSpacing(double interRankCellSpacing) |
void |
setIntraCellSpacing(double intraCellSpacing) |
void |
setLayoutFromSinks(boolean layoutFromSinks) |
void |
setLoggerLevel(java.util.logging.Level level)
Sets the logging level of this class
|
void |
setOrientation(int orientation) |
void |
setParallelEdgeSpacing(double parallelEdgeSpacing) |
java.lang.String |
toString()
Returns
Hierarchical , the name of this algorithm. |
protected double intraCellSpacing
protected double interRankCellSpacing
protected double interHierarchySpacing
protected double parallelEdgeSpacing
protected int orientation
protected boolean fineTuning
protected boolean compactLayout
protected boolean deterministic
protected boolean fixRoots
protected boolean layoutFromSinks
protected JGraphHierarchyModel model
protected JGraphHierarchicalLayoutStep cycleStage
protected JGraphHierarchicalLayoutStep layeringStage
protected JGraphHierarchicalLayoutStep crossingStage
protected JGraphHierarchicalLayoutStep placementStage
protected JGraphLayoutProgress progress
public JGraphHierarchicalLayout()
public JGraphHierarchicalLayout(boolean deterministic)
deterministic
- whether or not this layout should be deterministicpublic void run(JGraphFacade facade)
run
in interface JGraphLayout
facade
- the facade object that describes and filters the graph to be
acted uponpublic java.lang.String toString()
Hierarchical
, the name of this algorithm.toString
in class java.lang.Object
public JGraphLayoutProgress getProgress()
JGraphLayout.Stoppable
By convention, the layout must check the isStopped method in its
inner-most loops and return immediately if the method returns
true
.
getProgress
in interface JGraphLayout.Stoppable
public double getIntraCellSpacing()
public void setIntraCellSpacing(double intraCellSpacing)
intraCellSpacing
- The intraCellSpacing to set.public double getInterRankCellSpacing()
public void setInterRankCellSpacing(double interRankCellSpacing)
interRankCellSpacing
- The interRankCellSpacing to set.public int getOrientation()
public void setOrientation(int orientation)
orientation
- The orientation to set.public double getInterHierarchySpacing()
public void setInterHierarchySpacing(double interHierarchySpacing)
interHierarchySpacing
- The interHierarchySpacing to set.public double getParallelEdgeSpacing()
public void setParallelEdgeSpacing(double parallelEdgeSpacing)
public boolean isFineTuning()
public void setFineTuning(boolean fineTuning)
fineTuning
- The fineTuning to set.public boolean isDeterministic()
public void setDeterministic(boolean deterministic)
deterministic
- The deterministic to set.public boolean isCompactLayout()
public void setCompactLayout(boolean compactLayout)
compactLayout
- The compactLayout to set.public boolean isFixRoots()
public void setFixRoots(boolean fixRoots)
fixRoots
- The fixRoots to set.public boolean isLayoutFromSinks()
public void setLayoutFromSinks(boolean layoutFromSinks)
public void setLoggerLevel(java.util.logging.Level level)
level
- the logging level to setCopyright (C) 2001-2009 JGraph Ltd. All rights reserved.