y25.layout
Class CompositeLayouter25D

java.lang.Object
  extended byy25.layout.CompositeLayouter25D
All Implemented Interfaces:
Layouter25D

public class CompositeLayouter25D
extends Object
implements Layouter25D

A layouter that allows to express a layout operation as a chain of multiple layout stages. This interface mirrors the CompositeLayouter interface found in the y.layout package.


Field Summary
protected  Layouter25D coreLayouter
          The layouter that is always invoked at the end of the chain.
protected  LayoutStage25D firstStage
          The first layout stage.
protected  LayoutStage25D lastStage
          The last layout stage that is invoked right before the core layouter is invoked.
 
Constructor Summary
CompositeLayouter25D(LayoutStage25D stage, Layouter25D coreLayouter)
          Creates a new instance of CompositeLayouter25D.
 
Method Summary
 void appendStage(LayoutStage25D stage)
          Appends a stage to the layout pipeline.
 boolean canLayout(LayeredLayoutGraph lg)
          Returns true, if this Layouter25D is capable of layouting the given graph.
 void doLayout(LayeredLayoutGraph lg)
          Performs the layout on the given graph.
 List getLayoutStages()
          Returns a vector of all layout stages already present in the layout chain.
 void prependStage(LayoutStage25D stage)
          Prepends a stage to the layout pipeline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

coreLayouter

protected Layouter25D coreLayouter
The layouter that is always invoked at the end of the chain.


firstStage

protected LayoutStage25D firstStage
The first layout stage.


lastStage

protected LayoutStage25D lastStage
The last layout stage that is invoked right before the core layouter is invoked.

Constructor Detail

CompositeLayouter25D

public CompositeLayouter25D(LayoutStage25D stage,
                            Layouter25D coreLayouter)
Creates a new instance of CompositeLayouter25D.

Parameters:
stage - the layout stage that is wrapped around the core layouter
coreLayouter - the core layouter of this composite layouter
Method Detail

canLayout

public boolean canLayout(LayeredLayoutGraph lg)
Description copied from interface: Layouter25D
Returns true, if this Layouter25D is capable of layouting the given graph.

Specified by:
canLayout in interface Layouter25D

doLayout

public void doLayout(LayeredLayoutGraph lg)
Description copied from interface: Layouter25D
Performs the layout on the given graph.

Specified by:
doLayout in interface Layouter25D

appendStage

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


prependStage

public void prependStage(LayoutStage25D stage)
Prepends a stage to the layout pipeline. Stages added with this method will be invoked before any other stages will be invoked.


getLayoutStages

public List getLayoutStages()
Returns a vector of all layout stages already present in the layout chain. The first entry of the vector is the first layout stage, the last entry is the last layout stage that is invoked before the core layouter is invoked.