|
JGraph X 1.0.2.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mxgraph.layout.mxGraphLayout
com.mxgraph.layout.hierarchical.mxHierarchicalLayout
public class mxHierarchicalLayout
The top level compound layout of the hierarchical layout. The individual elements of the layout are called in sequence.
Field Summary | |
---|---|
protected boolean |
deterministic
Whether or not cells are ordered according to the order in the graph model. |
protected boolean |
disableEdgeStyle
Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result. |
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 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 mxGraphHierarchyModel |
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 Object[] |
roots
The root nodes of the layout |
Fields inherited from class com.mxgraph.layout.mxGraphLayout |
---|
graph, useBoundingBox |
Constructor Summary | |
---|---|
mxHierarchicalLayout(mxGraph graph)
Constructs a hierarchical layout |
|
mxHierarchicalLayout(mxGraph graph,
int orientation)
Constructs a hierarchical layout |
Method Summary | |
---|---|
void |
crossingStage(Object parent)
Executes the crossing stage using mxMedianHybridCrossingReduction. |
void |
cycleStage(Object parent)
Executes the cycle stage. |
void |
execute(Object parent)
Executes the layout for the children of the specified parent. |
void |
execute(Object parent,
Object[] roots)
Executes the layout for the children of the specified parent. |
double |
getInterHierarchySpacing()
|
double |
getInterRankCellSpacing()
|
double |
getIntraCellSpacing()
|
mxGraphHierarchyModel |
getModel()
Returns the model for this layout algorithm. |
int |
getOrientation()
|
double |
getParallelEdgeSpacing()
|
boolean |
isDeterministic()
|
boolean |
isDisableEdgeStyle()
|
boolean |
isFineTuning()
|
boolean |
isFixRoots()
|
boolean |
isLayoutFromSinks()
|
void |
layeringStage()
Implements first stage of a Sugiyama layout. |
double |
placementStage(double initialX,
Object parent)
Executes the placement stage using mxCoordinateAssignment. |
void |
run(Object parent)
The API method used to exercise the layout upon the graph description and produce a separate description of the vertex position and edge routing changes made. |
void |
setDeterministic(boolean deterministic)
|
void |
setDisableEdgeStyle(boolean disableEdgeStyle)
|
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(Level level)
Sets the logging level of this class |
void |
setOrientation(int orientation)
|
void |
setParallelEdgeSpacing(double parallelEdgeSpacing)
|
String |
toString()
Returns Hierarchical , the name of this algorithm. |
Methods inherited from class com.mxgraph.layout.mxGraphLayout |
---|
getConstraint, getConstraint, getGraph, getVertexBounds, isEdgeIgnored, isUseBoundingBox, isVertexIgnored, isVertexMovable, moveCell, setEdgePoints, setEdgeStyleEnabled, setUseBoundingBox, setVertexLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Object[] roots
protected double intraCellSpacing
protected double interRankCellSpacing
protected double interHierarchySpacing
protected double parallelEdgeSpacing
protected int orientation
SwingConstants.NORTH
, i.e. top-down.
protected boolean disableEdgeStyle
protected boolean fineTuning
protected boolean deterministic
protected boolean fixRoots
protected boolean layoutFromSinks
protected mxGraphHierarchyModel model
Constructor Detail |
---|
public mxHierarchicalLayout(mxGraph graph)
graph
- the graph to lay outpublic mxHierarchicalLayout(mxGraph graph, int orientation)
graph
- the graph to lay outorientation
- SwingConstants.NORTH, SwingConstants.EAST, SwingConstants.SOUTH
or SwingConstants.WEST
Method Detail |
---|
public mxGraphHierarchyModel getModel()
public void execute(Object parent)
parent
- Parent cell that contains the children to be laid out.public void execute(Object parent, Object[] roots)
parent
- Parent cell that contains the children to be laid out.roots
- the starting roots of the layoutpublic void run(Object parent)
public void cycleStage(Object parent)
public void layeringStage()
public void crossingStage(Object parent)
public double placementStage(double initialX, Object parent)
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 isDisableEdgeStyle()
public void setDisableEdgeStyle(boolean disableEdgeStyle)
disableEdgeStyle
- public boolean isDeterministic()
public void setDeterministic(boolean deterministic)
deterministic
- The deterministic 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(Level level)
level
- the logging level to setpublic String toString()
Hierarchical
, the name of this algorithm.
toString
in class Object
|
JGraph X 1.0.2.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |