| 
 | JGraph X 2.1.0.7 | |||||||||
| 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.mxFastOrganicLayout
public class mxFastOrganicLayout
Fast organic layout algorithm.
| Field Summary | |
|---|---|
| protected  boolean | allowedToRunBoolean flag that specifies if the layout is allowed to run. | 
| protected  double[][] | cellLocationAn array of locally stored co-ordinate positions for the vertices. | 
| protected  boolean | disableEdgeStyleSpecifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result. | 
| protected  double[] | dispXAn array of locally stored X co-ordinate displacements for the vertices. | 
| protected  double[] | dispYAn array of locally stored Y co-ordinate displacements for the vertices. | 
| protected  double | forceConstantThe force constant by which the attractive forces are divided and the replusive forces are multiple by the square of. | 
| protected  double | forceConstantSquaredCache of | 
| protected  Hashtable<Object,Integer> | indicesMaps from vertices to indices. | 
| protected  double | initialTempStart value of temperature. | 
| protected  boolean[] | isMoveableArray of booleans representing the movable states of the vertices. | 
| protected  double | iterationCurrent iteration count. | 
| protected  double | maxDistanceLimitThe maximum distance between vertices, beyond which their repulsion no longer has an effect | 
| protected  double | maxIterationsTotal number of iterations to run the layout though. | 
| protected  double | minDistanceLimitMinimal distance limit. | 
| protected  double | minDistanceLimitSquaredCached version of | 
| protected  int[][] | neighboursLocal copy of cell neighbours. | 
| protected  double[] | radiusThe approximate radius of each cell, nodes only. | 
| protected  double[] | radiusSquaredThe approximate radius squared of each cell, nodes only. | 
| protected  boolean | resetEdgesSpecifies if all edge points of traversed edges should be removed. | 
| protected  double | temperatureTemperature to limit displacement at later stages of layout. | 
| protected  boolean | useInputOriginSpecifies if the top left corner of the input cells should be the origin of the layout result. | 
| protected  Object[] | vertexArrayAn array of all vertices to be laid out. | 
| Fields inherited from class com.mxgraph.layout.mxGraphLayout | 
|---|
| graph, parent, useBoundingBox | 
| Constructor Summary | |
|---|---|
| mxFastOrganicLayout(mxGraph graph)Constructs a new fast organic layout for the specified graph. | |
| Method Summary | |
|---|---|
| protected  void | calcAttraction()Calculates the attractive forces between all laid out nodes linked by edges | 
| protected  void | calcPositions()Takes the displacements calculated for each cell and applies them to the local cache of cell positions. | 
| protected  void | calcRepulsion()Calculates the repulsive forces between all laid out nodes | 
|  void | execute(Object parent)Executes the layout for the children of the specified parent. | 
|  double | getForceConstant() | 
|  double | getInitialTemp() | 
|  double | getMaxDistanceLimit() | 
|  double | getMaxIterations() | 
|  double | getMinDistanceLimit() | 
|  boolean | isDisableEdgeStyle() | 
|  boolean | isResetEdges() | 
|  boolean | isUseInputOrigin() | 
|  boolean | isVertexIgnored(Object vertex)Returns a boolean indicating if the given | 
|  void | moveCell(Object cell,
         double x,
         double y)Notified when a cell is being moved in a parent that has automatic layout to update the cell state (eg. | 
| protected  void | reduceTemperature()Reduces the temperature of the layout from an initial setting in a linear fashion to zero. | 
|  void | setDisableEdgeStyle(boolean value) | 
|  void | setForceConstant(double value) | 
|  void | setInitialTemp(double value) | 
|  void | setMaxDistanceLimit(double maxDistanceLimit) | 
|  void | setMaxIterations(double value) | 
|  void | setMinDistanceLimit(double value) | 
|  void | setResetEdges(boolean value) | 
|  void | setUseInputOrigin(boolean value) | 
| Methods inherited from class com.mxgraph.layout.mxGraphLayout | 
|---|
| arrangeGroups, getConstraint, getConstraint, getGraph, getParentOffset, getVertexBounds, isEdgeIgnored, isUseBoundingBox, isVertexMovable, setEdgePoints, setEdgeStyleEnabled, setOrthogonalEdge, setUseBoundingBox, setVertexLocation | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected boolean useInputOrigin
protected boolean resetEdges
protected boolean disableEdgeStyle
protected double forceConstant
protected double forceConstantSquared
protected double minDistanceLimit
protected double minDistanceLimitSquared
protected double maxDistanceLimit
protected double initialTemp
protected double temperature
protected double maxIterations
protected double iteration
protected Object[] vertexArray
protected double[] dispX
protected double[] dispY
protected double[][] cellLocation
protected double[] radius
protected double[] radiusSquared
protected boolean[] isMoveable
protected int[][] neighbours
protected boolean allowedToRun
protected Hashtable<Object,Integer> indices
| Constructor Detail | 
|---|
public mxFastOrganicLayout(mxGraph graph)
| Method Detail | 
|---|
public boolean isVertexIgnored(Object vertex)
isVertexIgnored in class mxGraphLayoutvertex - Object that represents the vertex to be tested.
public boolean isUseInputOrigin()
public void setUseInputOrigin(boolean value)
value - public boolean isResetEdges()
public void setResetEdges(boolean value)
value - public boolean isDisableEdgeStyle()
public void setDisableEdgeStyle(boolean value)
value - public double getMaxIterations()
public void setMaxIterations(double value)
value - public double getForceConstant()
public void setForceConstant(double value)
value - public double getMinDistanceLimit()
public void setMinDistanceLimit(double value)
value - public double getMaxDistanceLimit()
public void setMaxDistanceLimit(double maxDistanceLimit)
maxDistanceLimit - the maxDistanceLimit to setpublic double getInitialTemp()
public void setInitialTemp(double value)
value - protected void reduceTemperature()
public void moveCell(Object cell,
                     double x,
                     double y)
mxIGraphLayout
moveCell in interface mxIGraphLayoutmoveCell in class mxGraphLayoutcell - Cell which is being moved.x - X-coordinate of the new cell location.y - Y-coordinate of the new cell location.public void execute(Object parent)
mxIGraphLayout
execute in interface mxIGraphLayoutexecute in class mxGraphLayoutparent - Parent cell that contains the children to be layed out.protected void calcPositions()
protected void calcAttraction()
protected void calcRepulsion()
| 
 | JGraph X 2.1.0.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||