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

PartitionGridRouterStage adds support for PartitionGrid to OrthogonalEdgeRouter.

Concept

Before the edge routing algorithm is invoked, the PartitionGrid information is modeled in the graph. Edges should not be routed back and forth between two PartitionCells. The graph structure is restored after the edges have been routed.


Graph containing a PartitionGrid

 
PartitionGridRouterStage will not have an effect with edge routing algorithms other than OrthogonalEdgeRouter.
See Also:
OrthogonalEdgeRouter, PartitionGrid
 

Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
PartitionGridRouterStage()
          Creates a new instance of PartitionGridRouterStage.
PartitionGridRouterStage(Layouter coreLayouter)
          Creates a new instance of PartitionGridRouterStage using the given core layout algorithm.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Accepts all graphs that are accepted by the core layout algorithm.
 void doLayout(LayoutGraph graph)
          Handles partition grids for the core layout algorithm.
 
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 PartitionGridRouterStage.

 
PartitionGridRouterStage will not have an effect with edge routing algorithms other than OrthogonalEdgeRouter. An according core layout algorithm must be set.

PartitionGridRouterStage

public PartitionGridRouterStage(Layouter coreLayouter)
Creates a new instance of PartitionGridRouterStage using the given core layout algorithm.

 
The core layout algorithm must contain an instance of OrthogonalEdgeRouter in its layout pipeline. Also, the scope of this routing algorithm needs to contain all edges of the graph.
Parameters:
coreLayouter - the core layout algorithm
Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Accepts all graphs that are accepted by the core layout algorithm.

Parameters:
graph - the input graph
Returns:
true if the core layout algorithm can handle the graph, false otherwise
See Also:
Layouter.doLayout(LayoutGraph)

doLayout

public void doLayout(LayoutGraph graph)
Handles partition grids for the core layout algorithm.

Precondition:
The core layout algorithm must be an instance of OrthogonalEdgeRouter or at least must have such an instance in its layout pipeline.
Parameters:
graph - the input graph
See Also:
Layouter.canLayout(LayoutGraph)

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