|
JGraphAddons |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jgraph.layout.JGraphLayoutAlgorithm | +--org.jgraph.layout.MoenLayoutAlgorithm
Field Summary | |
static 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(Collection roots)
|
JGraphLayoutSettings |
createSettings()
Returns an new instance of SugiyamaLayoutSettings |
protected void |
decorateNode(VertexView node)
|
protected void |
display(Collection roots)
|
protected void |
displayHelper(VertexView view)
|
protected List |
getChildren(VertexView node)
|
String |
getHint()
Get a human readable hint for using this layout. |
protected ArrayList |
getRootVertices(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(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 jgraph,
Object[] cells,
int step)
This method assumes the graph describes a tree structure. |
void |
setChildParentDistance(int distance)
|
void |
setLayoutOrientation(int orientation)
|
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, 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 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 String toString()
toString
in class Object
public 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 jgraph, Object[] cells, int step)
run
in class JGraphLayoutAlgorithm
jgraph
- protected ArrayList getRootVertices(Object[] selectedCells)
protected List getChildren(VertexView node)
protected void layoutTrees(Collection roots)
protected void buildLayoutHelperTree(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(Collection roots)
protected void displayHelper(VertexView view)
|
JGraphAddons |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |