y.layout
Class CompositeLayoutStage

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

public class CompositeLayoutStage
extends AbstractLayoutStage

A composite layout stage 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
CompositeLayoutStage()
          Creates a new instance of CompositeLayoutStage
CompositeLayoutStage(LayoutStage outerStage, LayoutStage innerStage)
          Creates a new instance of CompositeLayoutStage
 
Method Summary
 void appendStage(LayoutStage stage)
          Appends a stage to the layout pipeline.
 boolean canLayout(LayoutGraph graph)
          Returns true.
 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 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

CompositeLayoutStage

public CompositeLayoutStage()
Creates a new instance of CompositeLayoutStage


CompositeLayoutStage

public CompositeLayoutStage(LayoutStage outerStage,
                            LayoutStage innerStage)
Creates a new instance of CompositeLayoutStage

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.


doLayout

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


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

2003