y.layout
Class ParallelEdgeLayouter
java.lang.Object
|
+--y.layout.AbstractLayoutStage
|
+--y.layout.ParallelEdgeLayouter
- All Implemented Interfaces:
- Layouter, LayoutStage
- public class ParallelEdgeLayouter
- extends AbstractLayoutStage
A layout algorithm that routes parallel edges
(edges that have same source and same target node)
of a graph.
A core layout algorithm can be specifed for this class.
In that case the performed layout process of this class
is subdivided into four stages:
- Remove parallel edges from the input graph.
If there are parallel edges between two nodes A and B than
only one of these edges will remain in the graph. This is the
representative of these edges.
- Invoke the core layouter on the now parallel edge free graph.
- Reinsert all formerly removed edges of the graph.
- Route the parallel edges such that they run in parallel
to their representative which was routed by the core layouter.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hiddenEdges
protected EdgeList hiddenEdges
parallelEdges
public EdgeMap parallelEdges
lineDistance
protected double lineDistance
ParallelEdgeLayouter
public ParallelEdgeLayouter(Layouter coreLayouter)
ParallelEdgeLayouter
public ParallelEdgeLayouter()
setLineDistance
public void setLineDistance(double distance)
doLayout
public void doLayout(LayoutGraph graph)
- Description copied from interface:
Layouter
- Assigns a new graph layout to the given layout graph.
canLayout
public boolean canLayout(LayoutGraph graph)
- Description copied from interface:
Layouter
- Returns
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
.
layoutParallelEdges
protected void layoutParallelEdges(LayoutGraph graph,
EdgeMap parallelEdges)
findAndHideParallelEdges
protected void findAndHideParallelEdges(Graph graph)