y.layout
Class CompositeLayouter

java.lang.Object
  |
  +--y.layout.CompositeLayouter
All Implemented Interfaces:
Layouter

public class CompositeLayouter
extends Object
implements Layouter

A layouter that allows to express a layout stage as a chain of more basic layout stages.


Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
CompositeLayouter(LayoutStage stage, Layouter coreLayouter)
          Creates a new instance of CompositeLayouter
 
Method Summary
 void appendStage(LayoutStage stage)
          Appends a stage to the layout pipeline.
 boolean canLayout(LayoutGraph graph)
          Returns true if all layout stages and the core layout stage can layout the given graph.
 void doLayout(LayoutGraph graph)
          Assigns a new graph layout to the given layout graph.
 List getLayoutStages()
          Returns the chain of layout stages that make up this composite layout stage.
 void prependStage(LayoutStage stage)
          Prepends a stage to this composite layout stage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeLayouter

public CompositeLayouter(LayoutStage stage,
                         Layouter coreLayouter)
Creates a new instance of CompositeLayouter

Method Detail

prependStage

public void prependStage(LayoutStage stage)
Prepends a stage to this composite layout stage. Stage added with this method will be invoked before any other stages will be invoked.


getLayoutStages

public List getLayoutStages()
Returns the chain of layout stages that make up this composite layout stage.


appendStage

public void appendStage(LayoutStage stage)
Appends a stage to the layout pipeline. Stages added with this method will be invoked just before the core layouter of the composite layout stage will be invoked.


canLayout

public boolean canLayout(LayoutGraph graph)
Returns true if all layout stages and the core layout stage can layout the given graph.

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

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

2003