|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.AbstractLayoutStage y.layout.RemoveColinearBendsStage
public class RemoveColinearBendsStage
This LayoutStage removes all collinear bends found in the graph. The algorithms traverses each edge path from source to target and removes for each triple of consecutive collinear bends the middle one.
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
RemoveColinearBendsStage()
|
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be laid
out by this algorithm. |
void |
doLayout(LayoutGraph graph)
Removes collinear bends of the edges. |
double |
getScale()
Returns the current scale, to which this stage will refer, when checking for collinearity. |
boolean |
isRemoveStraightOnly()
Returns the current state of the remove straight only property. |
void |
setRemoveStraightOnly(boolean removeStraightOnly)
Specifies whether the algorithm removes only collinear bends which lie in the middle of their neighbors or all collinear bends. |
void |
setScale(double scale)
Sets the current scale, to which this stage will refer, when checking for collinearity. |
Methods inherited from class y.layout.AbstractLayoutStage |
---|
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoveColinearBendsStage()
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
.
public double getScale()
public void setScale(double scale)
scale
- the current scale to which this stage will refer, when checking for collinearity.public boolean isRemoveStraightOnly()
true
if the algorithm removes only bends for which the angle is 180 degrees.setRemoveStraightOnly(boolean)
public void setRemoveStraightOnly(boolean removeStraightOnly)
false
.
removeStraightOnly
- whether to enable or disable this featurepublic void doLayout(LayoutGraph graph)
graph
- the graph
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |