y.layout
Class BendConverter

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

public class BendConverter
extends Object
implements LayoutStage

This layout stage replaces bends with dummy nodes, calls the core layout algorithm and recreates the bends. Note that values bound to edges via EdgeMaps will not be copied to the dummy edges.


Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
BendConverter()
          Creates a new instance of BendConverter
BendConverter(double size)
          Creates a new instance of BendConverter using the given size as the width and height for the dummynodes.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be layed out by this algorithm.
 void doLayout(LayoutGraph graph)
          Assigns a new graph layout to the given layout graph.
 Layouter getCoreLayouter()
          Returns the core layouter.
 void setCoreLayouter(Layouter l)
          Sets the core layouter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BendConverter

public BendConverter()
Creates a new instance of BendConverter


BendConverter

public BendConverter(double size)
Creates a new instance of BendConverter using the given size as the width and height for the dummynodes.

Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
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.

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