y.layout.circular
Class CircularLayouter

java.lang.Object
  |
  +--y.layout.CanonicMultiStageLayouter
        |
        +--y.layout.circular.CircularLayouter
All Implemented Interfaces:
Layouter

public class CircularLayouter
extends CanonicMultiStageLayouter

Circular style layouter. This layouter either places all nodes on a cycle or or applies some cunning scheme to partition the graph in disjoint node sets each of which will be layed out on a separate cycle. The separate cycles themselves are arranged using a BalloonLayouter.

Here is an sample output of the layouter using the CircularLayouter.BCC_COMPACT layout style.


Field Summary
static byte BCC_COMPACT
          Layout style specifier.
static byte BCC_ISOLATED
          Layout style specifier.
static byte SINGLE_CYCLE
          Layout style specifier.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
CircularLayouter()
           
 
Method Summary
 boolean canLayoutCore(LayoutGraph graph)
          Always returns true.
 void doLayoutCore(LayoutGraph graph)
          Core layout routine.
 BalloonLayouter getBalloonLayouter()
          Returns the BalloonLayouter used for laying out arranging separate node cycles Configuring that layouter has effect upon the arrangement of separate node cycles within the overall layout.
 byte getLayoutStyle()
          Returns the layout style for this layouter.
 int getMaximalDeviationAngle()
          Returns the maximal deviation angle allowed for an edge.
 SingleCycleLayouter getSingleCycleLayouter()
          Returns the SingleCycleLayouter used for laying out single node cycles Configuring that layouter has effects upon single cycle layouts
 void setLayoutStyle(byte style)
          Sets the layout style for this layouter.
 void setMaximalDeviationAngle(int deviationAngle)
          Sets the maximal deviation angle allowed for an edge.
 
Methods inherited from class y.layout.CanonicMultiStageLayouter
appendStage, calcLayout, calcLayout, canLayout, doLayout, doLayout, enableOnlyCore, getComponentLayouter, getGroupNodeHider, getLabelLayouter, getLayoutOrientation, getOrientationLayouter, getParallelEdgeLayouter, getSelfLoopLayouter, getSubgraphLayouter, isComponentLayouterEnabled, isGroupNodeHidingEnabled, isLabelLayouterEnabled, isOrientationLayouterEnabled, isParallelEdgeLayouterEnabled, isSelfLoopLayouterEnabled, isSubgraphLayouterEnabled, prependStage, removeStage, setComponentLayouter, setComponentLayouterEnabled, setGroupNodeHider, setGroupNodeHidingEnabled, setLabelLayouter, setLabelLayouterEnabled, setLayoutOrientation, setOrientationLayouter, setOrientationLayouterEnabled, setParallelEdgeLayouter, setParallelEdgeLayouterEnabled, setSelfLoopLayouter, setSelfLoopLayouterEnabled, setSubgraphLayouter, setSubgraphLayouterEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BCC_COMPACT

public static byte BCC_COMPACT
Layout style specifier. In this layout style the nodes within a biconnected component of the input graph will be put on a separate cycle. If a node belongs to more biconnected components, it will be assigned to the one that seems to be more suitable.


BCC_ISOLATED

public static byte BCC_ISOLATED
Layout style specifier. In this layout style the nodes within a biconnected component of the input graph will be put on a separate cycle. If a node belongs to more biconnected components, it will be assigned to no component cycle. Instead it will be layed out in between all of it's biconnected component cycles..


SINGLE_CYCLE

public static byte SINGLE_CYCLE
Layout style specifier. In this layout style all nodes of the input graph will be put on one single cycle.

Constructor Detail

CircularLayouter

public CircularLayouter()
Method Detail

setMaximalDeviationAngle

public void setMaximalDeviationAngle(int deviationAngle)
Sets the maximal deviation angle allowed for an edge. The deviation angle for an edge is the difference between its optimal radiation angle away from the parent cycle and its actual radiation angle.

By default a maximal deviation angle of 90 degrees is applied.

Parameters:
deviationAngle - the deviation angle given in degrees.

getMaximalDeviationAngle

public int getMaximalDeviationAngle()
Returns the maximal deviation angle allowed for an edge.

See Also:
CircularLayouter.setMaximalDeviationAngle(int)

setLayoutStyle

public void setLayoutStyle(byte style)
Sets the layout style for this layouter. Allowed layout styles are CircularLayouter.SINGLE_CYCLE and CircularLayouter.BCC_COMPACT

By default CircularLayouter.BCC_COMPACT is used as layout style


getLayoutStyle

public byte getLayoutStyle()
Returns the layout style for this layouter.

See Also:
CircularLayouter.setLayoutStyle(byte)

getSingleCycleLayouter

public SingleCycleLayouter getSingleCycleLayouter()
Returns the SingleCycleLayouter used for laying out single node cycles

Configuring that layouter has effects upon single cycle layouts


getBalloonLayouter

public BalloonLayouter getBalloonLayouter()
Returns the BalloonLayouter used for laying out arranging separate node cycles

Configuring that layouter has effect upon the arrangement of separate node cycles within the overall layout.


canLayoutCore

public boolean canLayoutCore(LayoutGraph graph)
Always returns true. Yes we can handle anything!

Specified by:
canLayoutCore in class CanonicMultiStageLayouter

doLayoutCore

public void doLayoutCore(LayoutGraph graph)
Core layout routine.

Specified by:
doLayoutCore in class CanonicMultiStageLayouter

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

2003