| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment
public class mxCoordinateAssignment
Sets the horizontal locations of node and edge dummy nodes on each layer. Uses median down and up weighings as well heuristic to straighten edges as far as possible.
| Nested Class Summary | |
|---|---|
| protected  class | mxCoordinateAssignment.AreaSpatialCacheUtility class that stores a collection of vertices and edge points within a certain area. | 
| protected  class | mxCoordinateAssignment.WeightedCellSorterA utility class used to track cells whilst sorting occurs on the weighted sum of their connected edges. | 
| Field Summary | |
|---|---|
| protected  double | currentXDeltaThe sum of x-displacements for the current iteration | 
| protected  boolean | disableEdgeStyleSpecifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result. | 
| protected  boolean | fineTuningWhether or not to perform local optimisations and iterate multiple times through the algorithm | 
| protected  double | initialXThe minimum x position node placement starts at | 
| protected  double | interRankCellSpacingThe minimum distance between cells on adjacent ranks | 
| protected  double | intraCellSpacingThe minimum buffer between cells on the same rank | 
| protected  mxHierarchicalLayout | layoutReference to the enclosing layout algorithm | 
| protected  double | limitXThe maximum x value this positioning lays up to | 
| protected  int | maxIterationsThe number of heuristic iterations to run | 
| protected  mxGraphAbstractHierarchyCell[][] | nextLayerConnectedCacheA store of connections to the layer above for speed | 
| protected  int | orientationThe position of the root ( start ) node(s) relative to the rest of the laid out graph | 
| protected  double | parallelEdgeSpacingThe distance between each parallel edge on each ranks for long edges | 
| protected  mxGraphAbstractHierarchyCell[][] | previousLayerConnectedCacheA store of connections to the layer below for speed | 
| protected  double[] | rankWidthsThe width of all the ranks | 
| protected  double[] | rankYThe Y-coordinate of all the ranks | 
| protected  int | widestRankThe rank that has the widest x position | 
| protected  double | widestRankValueThe X-coordinate of the edge of the widest rank | 
| Constructor Summary | |
|---|---|
| mxCoordinateAssignment(mxHierarchicalLayout layout,
                       double intraCellSpacing,
                       double interRankCellSpacing,
                       int orientation,
                       double initialX,
                       double parallelEdgeSpacing)Creates a coordinate assignment. | |
| Method Summary | |
|---|---|
| protected  void | calculateWidestRank(mxGraph graph,
                    mxGraphHierarchyModel model)Calculates the width rank in the hierarchy. | 
|  void | execute(Object parent)A basic horizontal coordinate assignment algorithm | 
|  double | getInterRankCellSpacing() | 
|  double | getIntraCellSpacing() | 
|  double | getLimitX() | 
|  int | getOrientation() | 
|  boolean | isFineTuning() | 
| protected  void | rankCoordinates(int rankValue,
                mxGraph graph,
                mxGraphHierarchyModel model)Sets up the layout in an initial positioning. | 
| protected  void | rankMedianPosition(int rankValue,
                   mxGraphHierarchyModel model,
                   int nextRankValue)Performs median minimisation over one rank. | 
|  void | setFineTuning(boolean fineTuning) | 
|  void | setInterRankCellSpacing(double interRankCellSpacing) | 
|  void | setIntraCellSpacing(double intraCellSpacing) | 
|  void | setLimitX(double limitX) | 
|  void | setLoggerLevel(Level level)Sets the logging level of this class | 
|  void | setOrientation(int orientation) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected mxHierarchicalLayout layout
protected double intraCellSpacing
protected double interRankCellSpacing
protected double parallelEdgeSpacing
protected int maxIterations
protected int orientation
protected double initialX
protected double limitX
protected double currentXDelta
protected int widestRank
protected double widestRankValue
protected double[] rankWidths
protected double[] rankY
protected boolean fineTuning
protected boolean disableEdgeStyle
protected mxGraphAbstractHierarchyCell[][] nextLayerConnectedCache
protected mxGraphAbstractHierarchyCell[][] previousLayerConnectedCache
| Constructor Detail | 
|---|
public mxCoordinateAssignment(mxHierarchicalLayout layout,
                              double intraCellSpacing,
                              double interRankCellSpacing,
                              int orientation,
                              double initialX,
                              double parallelEdgeSpacing)
intraCellSpacing - the minimum buffer between cells on the same rankinterRankCellSpacing - the minimum distance between cells on adjacent ranksorientation - the position of the root node(s) relative to the graphinitialX - the leftmost coordinate node placement starts at| Method Detail | 
|---|
public void execute(Object parent)
execute in interface mxHierarchicalLayoutStage
protected void rankMedianPosition(int rankValue,
                                  mxGraphHierarchyModel model,
                                  int nextRankValue)
rankValue - the layer number of this rankmodel - an internal model of the hierarchical layoutnextRankValue - the layer number whose connected cels are to be laid out
            relative to
protected void rankCoordinates(int rankValue,
                               mxGraph graph,
                               mxGraphHierarchyModel model)
rankValue - the current rank being processedgraph - the facade describing the input graphmodel - an internal model of the hierarchical layout
protected void calculateWidestRank(mxGraph graph,
                                   mxGraphHierarchyModel model)
graph - the facade describing the input graphmodel - an internal model of the hierarchical layoutpublic double getInterRankCellSpacing()
public void setInterRankCellSpacing(double interRankCellSpacing)
interRankCellSpacing - The interRankCellSpacing to set.public double getIntraCellSpacing()
public void setIntraCellSpacing(double intraCellSpacing)
intraCellSpacing - The intraCellSpacing to set.public int getOrientation()
public void setOrientation(int orientation)
orientation - The orientation to set.public double getLimitX()
public void setLimitX(double limitX)
limitX - The limitX to set.public boolean isFineTuning()
public void setFineTuning(boolean fineTuning)
fineTuning - The fineTuning to set.public void setLoggerLevel(Level level)
level - the logging level to set| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||