|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgraph.layout.JGraphLayoutAlgorithm
org.jgraph.layout.MoenLayoutAlgorithm
Field Summary | |
static java.lang.Object |
CELL_WRAPPER
layout,attachParent,layoutLeaf,join,merge,offset and bridge methods below were taken line by line from Moen's algorithm. |
protected int |
childParentDistance
|
static int |
DEFAULT_ORIENTATION
|
static int |
LEFT_TO_RIGHT
|
protected int |
orientation
|
static int |
UP_TO_DOWN
|
Fields inherited from class org.jgraph.layout.JGraphLayoutAlgorithm |
LAYOUT_ATTRIBUTES |
Constructor Summary | |
MoenLayoutAlgorithm()
|
Method Summary | |
protected void |
attachParent(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t,
int h)
|
protected org.jgraph.layout.MoenLayoutAlgorithm.PolyLine |
bridge(org.jgraph.layout.MoenLayoutAlgorithm.PolyLine line1,
int x1,
int y1,
org.jgraph.layout.MoenLayoutAlgorithm.PolyLine line2,
int x2,
int y2)
|
protected void |
buildLayoutHelperTree(java.util.Collection roots)
|
JGraphLayoutSettings |
createSettings()
Returns an new instance of SugiyamaLayoutSettings |
protected void |
decorateNode(VertexView node)
|
protected void |
display(java.util.Collection roots)
|
protected void |
displayHelper(VertexView view)
|
protected java.util.List |
getChildren(VertexView node)
|
java.lang.String |
getHint()
Get a human readable hint for using this layout. |
protected java.util.ArrayList |
getRootVertices(java.lang.Object[] selectedCells)
If it is a Vertex and it has no source, it must be a root vertex. |
protected org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode |
getTreeLayoutNode(VertexView view)
|
protected org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode |
getTreeLayoutNode(VertexView view,
boolean createIfNotPresent)
|
protected int |
join(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t)
|
protected void |
layout(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t)
|
protected void |
layoutLeaf(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t)
|
protected void |
layoutTrees(java.util.Collection roots)
|
protected void |
leftRightNodeLayout(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode node,
int off_x,
int off_y)
|
protected int |
merge(org.jgraph.layout.MoenLayoutAlgorithm.Polygon c1,
org.jgraph.layout.MoenLayoutAlgorithm.Polygon c2)
|
protected int |
offset(int p1,
int p2,
int a1,
int a2,
int b1,
int b2)
|
void |
run(JGraph graph,
java.lang.Object[] dynamic_cells,
java.lang.Object[] static_cells)
This method assumes the graph describes a tree structure. |
void |
setChildParentDistance(int distance)
|
void |
setLayoutOrientation(int orientation)
|
java.lang.String |
toString()
Returns the name of this algorithm in human readable form. |
protected void |
upDownNodeLayout(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode node,
int off_x,
int off_y)
|
Methods inherited from class org.jgraph.layout.JGraphLayoutAlgorithm |
applyLayout, applyLayout, createDialog, createDialog, getMaximumProgress, getProgress, isAllowedToRun, populateDialog, run, setAllowedToRun, setMaximumProgress, setProgress |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.Object CELL_WRAPPER
public static final int LEFT_TO_RIGHT
public static final int UP_TO_DOWN
public static final int DEFAULT_ORIENTATION
protected int orientation
protected int childParentDistance
Constructor Detail |
public MoenLayoutAlgorithm()
Method Detail |
public java.lang.String toString()
public java.lang.String getHint()
getHint
in class JGraphLayoutAlgorithm
public JGraphLayoutSettings createSettings()
createSettings
in class JGraphLayoutAlgorithm
public void setLayoutOrientation(int orientation)
public void setChildParentDistance(int distance)
protected void layout(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t)
protected void attachParent(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t, int h)
protected void layoutLeaf(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t)
protected int join(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode t)
protected int merge(org.jgraph.layout.MoenLayoutAlgorithm.Polygon c1, org.jgraph.layout.MoenLayoutAlgorithm.Polygon c2)
protected int offset(int p1, int p2, int a1, int a2, int b1, int b2)
protected org.jgraph.layout.MoenLayoutAlgorithm.PolyLine bridge(org.jgraph.layout.MoenLayoutAlgorithm.PolyLine line1, int x1, int y1, org.jgraph.layout.MoenLayoutAlgorithm.PolyLine line2, int x2, int y2)
protected void leftRightNodeLayout(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode node, int off_x, int off_y)
protected void upDownNodeLayout(org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode node, int off_x, int off_y)
public void run(JGraph graph, java.lang.Object[] dynamic_cells, java.lang.Object[] static_cells)
run
in class JGraphLayoutAlgorithm
graph
- JGraph instancedynamic_cells
- List of all nodes the layout should movestatic_cells
- List of node the layout should not move but allow forprotected java.util.ArrayList getRootVertices(java.lang.Object[] selectedCells)
protected java.util.List getChildren(VertexView node)
protected void layoutTrees(java.util.Collection roots)
protected void buildLayoutHelperTree(java.util.Collection roots)
protected void decorateNode(VertexView node)
protected org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode getTreeLayoutNode(VertexView view)
protected org.jgraph.layout.MoenLayoutAlgorithm.TreeLayoutNode getTreeLayoutNode(VertexView view, boolean createIfNotPresent)
protected void display(java.util.Collection roots)
protected void displayHelper(VertexView view)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |