Search this API

y.layout
Class PartitionLayouter

java.lang.Object
  extended by y.layout.AbstractLayoutStage
      extended by y.layout.PartitionLayouter
All Implemented Interfaces:
Layouter, LayoutStage
Direct Known Subclasses:
CompactOrthogonalLayouter

public class PartitionLayouter
extends AbstractLayoutStage

This layout stage provides a framework for layouts that are based on a divide and conquer approach. The workings of this stage is subdivided into four stages:

  1. The input graph is partitioned into smaller units. Implementations of this phase can be set using method setPartitionFinder(y.layout.PartitionLayouter.PartitionFinder).
  2. Optionally, the graph partitions are laid out by an layout algorithm. Implementations of this phase can be set using method AbstractLayoutStage.setCoreLayouter(y.layout.Layouter).
  3. The graph partitions are independently arranged. Implementations of this phase can be set using method setPartitionPlacer(y.layout.PartitionLayouter.PartitionPlacer).
  4. Edges that connect nodes in different graph partitions will be routed. Implementations of this phase can be set using method setInterEdgeRouter(y.layout.PartitionLayouter.InterEdgeRouter)


Nested Class Summary
static class PartitionLayouter.ChannelInterEdgeRouter
          InterEdgeRouter implementation that routes inter-edges using ChannelEdgeRouter.
static class PartitionLayouter.ComponentPartitionPlacer
          PartitionPlacer implementation that uses ComponentLayouter to place the partitions.
static class PartitionLayouter.EdgeBetweennessPartitionFinder
          PartitionFinder implementation that uses Groups.edgeBetweennessClustering(y.base.Graph, y.base.NodeMap, boolean, int, int, y.base.DataProvider) as partition strategy.
static interface PartitionLayouter.InterEdgeRouter
          Implementations of this interface are responsible for routing inter-edges.
static class PartitionLayouter.OrthogonalInterEdgeRouter
          InterEdgeRouter implementation that routes inter-edges using OrthogonalEdgeRouter.
static interface PartitionLayouter.PartitionFinder
          Implementations of this interface are responsible to partition the input graph.
static interface PartitionLayouter.PartitionPlacer
          Implementations of this interface are responsible for arranging the graph partitions.
 
Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
PartitionLayouter()
           
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns AbstractLayoutStage.canLayoutCore(LayoutGraph).
 void doLayout(LayoutGraph graph)
          Main layout routine that assigns new layout information to the given graph.
 PartitionLayouter.InterEdgeRouter getInterEdgeRouter()
          Returns the currently set InterEdgeRouter instance.
 PartitionLayouter.PartitionFinder getPartitionFinder()
          Returns the currently set PartitionFinder instance.
 PartitionLayouter.PartitionPlacer getPartitionPlacer()
          Returns the currently set PartitionPlacer instance.
 void setInterEdgeRouter(PartitionLayouter.InterEdgeRouter interEdgeRouter)
          Sets the InterEdgeRouter instance to use.
 void setPartitionFinder(PartitionLayouter.PartitionFinder partitionFinder)
          Sets the PartitionFinder instance to use.
 void setPartitionPlacer(PartitionLayouter.PartitionPlacer partitionPlacer)
          Sets the PartitionPlacer instance to use.
 
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

PartitionLayouter

public PartitionLayouter()
Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Returns AbstractLayoutStage.canLayoutCore(LayoutGraph).


doLayout

public void doLayout(LayoutGraph graph)
Main layout routine that assigns new layout information to the given graph.


getPartitionFinder

public PartitionLayouter.PartitionFinder getPartitionFinder()
Returns the currently set PartitionFinder instance.


setPartitionFinder

public void setPartitionFinder(PartitionLayouter.PartitionFinder partitionFinder)
Sets the PartitionFinder instance to use.


getPartitionPlacer

public PartitionLayouter.PartitionPlacer getPartitionPlacer()
Returns the currently set PartitionPlacer instance.


setPartitionPlacer

public void setPartitionPlacer(PartitionLayouter.PartitionPlacer partitionPlacer)
Sets the PartitionPlacer instance to use.


getInterEdgeRouter

public PartitionLayouter.InterEdgeRouter getInterEdgeRouter()
Returns the currently set InterEdgeRouter instance.


setInterEdgeRouter

public void setInterEdgeRouter(PartitionLayouter.InterEdgeRouter interEdgeRouter)
Sets the InterEdgeRouter instance to use.


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