y.layout.organic
Class SplitEdgeLayoutStage

java.lang.Object
  |
  +--y.layout.organic.SplitEdgeLayoutStage
All Implemented Interfaces:
Layouter, LayoutStage

public class SplitEdgeLayoutStage
extends Object
implements LayoutStage

This layout stage replaces edges by a path of nodes before it calls a core layouter. After the core layouter is finished this stage transforms the substituted path of nodes back to the original edge. For each node in the path there will be a bend in the original edge. The coordinate of the bend will be the center coordinate of the corresponding path node.


Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
SplitEdgeLayoutStage()
          Creates a new instance of SplitEdgeLayouter
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true
 void doLayout(LayoutGraph graph)
          Assigns a new graph layout to the given layout graph
 Layouter getCoreLayouter()
          Returns the core layouter.
 double getSplitSegmentLength()
          Returns the split segment length.
 void setCoreLayouter(Layouter l)
          Sets the core layouter.
 void setSplitSegmentLength(double l)
          Sets the split segment length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitEdgeLayoutStage

public SplitEdgeLayoutStage()
Creates a new instance of SplitEdgeLayouter

Method Detail

setSplitSegmentLength

public void setSplitSegmentLength(double l)
Sets the split segment length. The split segment length determines the length of the path that will replace an original edge in the graph. The length of the original edge path divided by the given split segment length yields the number of nodes on the new node path.


getSplitSegmentLength

public double getSplitSegmentLength()
Returns the split segment length.

See Also:
SplitEdgeLayoutStage.setSplitSegmentLength(double)

canLayout

public boolean canLayout(LayoutGraph graph)
Returns true

Specified by:
canLayout in interface Layouter

doLayout

public void doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph

Specified by:
doLayout in interface Layouter

getCoreLayouter

public Layouter getCoreLayouter()
Returns the core layouter.

Specified by:
getCoreLayouter in interface LayoutStage

setCoreLayouter

public void setCoreLayouter(Layouter l)
Sets the core layouter.

Specified by:
setCoreLayouter in interface LayoutStage

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003