Search this API

y.layout.router
Class PartitionGridRouterStage

java.lang.Object
  extended by y.layout.AbstractLayoutStage
      extended by y.layout.router.PartitionGridRouterStage
All Implemented Interfaces:
Layouter, LayoutStage

public class PartitionGridRouterStage
extends AbstractLayoutStage

Layout stage for OrthogonalEdgeRouter that should be applied when routing edges in a partition grid. Note: This stage can only be applied if all nodes are contained within a single partition grid, i.e., edges can never cross the border of the partition grid.

See Also:
PartitionGrid

Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
PartitionGridRouterStage()
          Creates a new instance of this class.
PartitionGridRouterStage(Layouter coreLayouter)
          Creates a new instance of this class.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be laid out by this algorithm.
 void doLayout(LayoutGraph graph)
          Main layout routine.
 
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

PartitionGridRouterStage

public PartitionGridRouterStage()
Creates a new instance of this class.


PartitionGridRouterStage

public PartitionGridRouterStage(Layouter coreLayouter)
Creates a new instance of this class.

Parameters:
coreLayouter - the core layouter invoked by this stage. The coreLayouter must contain an instance of OrthogonalEdgeRouter in its layout pipeline.
Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Description copied from interface: Layouter
Returns true iff the given graph can be laid out by this algorithm. Calling doLayout with the given graph as its argument will only success if this method returns true.


doLayout

public void doLayout(LayoutGraph graph)
Main layout routine.

Precondition:
the coreLayouter must contain an instance of OrthogonalEdgeRouter in its layout pipeline. Furthermore all elements have to lie inside the partition grid.

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