|
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.router.EdgeGroupRouterStage
public class EdgeGroupRouterStage
EdgeGroupRouterStage
adds support for a bus-like routing style for OrthogonalEdgeRouter
.
Edges that are assigned to edge groups using DataProvider
s registered with
PortConstraintKeys.SOURCE_GROUPID_KEY
and PortConstraintKeys.TARGET_GROUPID_KEY
will share parts
of their paths. This stage tries to route grouped edges on a vertical or horizontal bus. The edges will connect to
their common node at the same port coordinates.
There are some limitations to this stage:
scope
,
then all edges in this group will be also routed by the edge routing algorithm.
Graph containing edge groups
EdgeGroupRouterStage
will not have an effect with edge routing algorithms other than
OrthogonalEdgeRouter
.OrthogonalEdgeRouter
,
PortConstraintKeys.SOURCE_GROUPID_KEY
,
PortConstraintKeys.TARGET_GROUPID_KEY
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
EdgeGroupRouterStage(Layouter coreLayouter)
Creates a new instance of EdgeGroupRouterStage using the given
core layout algorithm . |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs that are accepted by the core layout algorithm . |
void |
doLayout(LayoutGraph graph)
Handles edge grouping for the core layout algorithm . |
double |
getMinimalBusDistance()
Returns the minimum distance between a bus formed by an edge group and the nodes to which the grouped edges connect. |
void |
setMinimalBusDistance(double minimalBusDistance)
Specifies the minimum distance between a bus formed by an edge group and the nodes to which the grouped edges connect. |
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 EdgeGroupRouterStage(Layouter coreLayouter)
EdgeGroupRouterStage
using the given
core layout algorithm
.
EdgeGroupRouterStage
provides an optimization step for OrthogonalEdgeRouter
and will not
work with other edge routing algorithms.coreLayouter
- the given core layout algorithmMethod Detail |
---|
public double getMinimalBusDistance()
The minimum bus distance needs to be non-negative.
setMinimalBusDistance(double)
public void setMinimalBusDistance(double minimalBusDistance)
The minimum bus distance needs to be non-negative.
minimalBusDistance
- the minimum distance of the bus to its connected nodes
java.lang.IllegalArgumentException
- if the specified distance is negativepublic boolean canLayout(LayoutGraph graph)
core layout algorithm
.
graph
- the input graph
true
if the core layout algorithm can handle the graph, false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
core layout algorithm
.
core layout algorithm
must be an instance of
OrthogonalEdgeRouter
or at least must have such an instance in its layout pipeline.graph
- the input graphLayouter.canLayout(LayoutGraph)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |