|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.router.OrganicEdgeRouter
This algorithm routes edges using an organic-like layout approach and style.
It is implemented as a LayoutStage so that it can easily be appended to
another stage, by setting the other stage as the core of this one.
Note that this algorithm only works correctly if it is guaranteed that nodes are at
least approximately twice as far away from each other as the minimal edge
distance, which has been set for this algorithm. This can be achieved by using
the OrganicEdgeRouter.createNodeEnlargementStage()
layout stage in combination with a stage
that removes node overlaps as the core of this layouter.
Here is a sample output of the router using as input a straight-line drawing
created by SmartOrganicLayouter
:
Field Summary | |
static Object |
ROUTE_EDGE_DPKEY
use this key to provide the alogrithm with boolean values for each edge, specifying the ones which should be rerouted. |
Fields inherited from interface y.layout.Layouter |
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
OrganicEdgeRouter()
Creates a new instance of OrganicEdgeRouter with an inital minimal distance of 10 |
|
OrganicEdgeRouter(double minNodeDistance)
Creates a new instance of OrganicEdgeRouter using the given initial minimal distance |
Method Summary | |
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be layed
out by this algorithm. |
LayoutStage |
createNodeEnlargementStage()
This will return a layout stage which can be given a core layouter, which itself should assure that the nodes do not overlap. |
void |
doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph. |
Layouter |
getCoreLayouter()
Returns the core layouter. |
double |
getMinimalDistance()
Getter for property minimalDistance. |
boolean |
isRoutingAll()
Getter for property routingAll. |
boolean |
isUsingBends()
Getter for property usingBends. |
void |
setCoreLayouter(Layouter l)
Sets the core layouter. |
void |
setMinimalDistance(double minimalDistance)
Setter for property minimalDistance. |
void |
setRoutingAll(boolean routingAll)
Setter for property routingAll. |
void |
setUsingBends(boolean usingBends)
Setter for property usingBends. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object ROUTE_EDGE_DPKEY
Constructor Detail |
public OrganicEdgeRouter()
public OrganicEdgeRouter(double minNodeDistance)
Method Detail |
public boolean canLayout(LayoutGraph graph)
Layouter
true
iff the given graph can be layed
out by this algorithm. Calling doLayout
with
the given graph as it's argument will only success if
this method returns true
.
canLayout
in interface Layouter
public void doLayout(LayoutGraph graph)
Layouter
doLayout
in interface Layouter
public Layouter getCoreLayouter()
getCoreLayouter
in interface LayoutStage
public void setCoreLayouter(Layouter l)
setCoreLayouter
in interface LayoutStage
public double getMinimalDistance()
public void setMinimalDistance(double minimalDistance)
minimalDistance
- New value of property minimalDistance.public boolean isUsingBends()
public void setUsingBends(boolean usingBends)
usingBends
- New value of property usingBends.public boolean isRoutingAll()
public void setRoutingAll(boolean routingAll)
routingAll
- New value of property routingAll.public LayoutStage createNodeEnlargementStage()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |