|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.organic.RemoveOverlapsLayoutStage
public class RemoveOverlapsLayoutStage
This LayoutStage removes node overlaps and guarantees a certain minimal node distance.
Field Summary | |
---|---|
protected LayoutGraph |
graph
the graph |
protected double[] |
h
heights based on node-indices |
protected Node[] |
nodes
the node array |
protected YRandom |
random
the source of randomness |
protected double[] |
w
widths based on node-indices |
protected double[] |
x
x coordinates based on node-indices |
protected double[] |
y
y coordinates based on node-indices |
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
RemoveOverlapsLayoutStage(double minDist)
Creates a new instance of RemoveOverlapsLayoutStage |
|
RemoveOverlapsLayoutStage(YRandom random,
double minDist)
Creates a new instance of RemoveOverlapsLayoutStage |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be laid
out by this algorithm. |
void |
doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph. |
Layouter |
getCoreLayouter()
Returns the core layouter. |
void |
setCoreLayouter(Layouter l)
Sets the core layouter. |
protected void |
updatePos()
updates arrays x and y according to the current centers of the nodes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LayoutGraph graph
protected YRandom random
protected double[] x
protected double[] y
protected double[] w
protected double[] h
protected Node[] nodes
Constructor Detail |
---|
public RemoveOverlapsLayoutStage(double minDist)
public RemoveOverlapsLayoutStage(YRandom random, double minDist)
Method Detail |
---|
public boolean canLayout(LayoutGraph graph)
Layouter
true
iff the given graph can be laid
out by this algorithm. Calling doLayout
with
the given graph as its argument will only success if
this method returns true
.
canLayout
in interface Layouter
public void doLayout(LayoutGraph graph)
doLayout
in interface Layouter
protected void updatePos()
public Layouter getCoreLayouter()
getCoreLayouter
in interface LayoutStage
public void setCoreLayouter(Layouter l)
setCoreLayouter
in interface LayoutStage
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |