y.layout.orthogonal
Class OrthogonalGroupLayouter

java.lang.Object
  |
  +--y.layout.CanonicMultiStageLayouter
        |
        +--y.layout.orthogonal.OrthogonalGroupLayouter
All Implemented Interfaces:
Layouter

public class OrthogonalGroupLayouter
extends CanonicMultiStageLayouter

This class provides a layout algorithm which produces orthogonal drawings of hierarchically grouped graphs.

Here is a sample output of the layouter.


Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
OrthogonalGroupLayouter()
          Creates a new instance of OrthogonalGroupLayouter
 
Method Summary
protected  boolean canLayoutCore(LayoutGraph graph)
          Subclasses have to provide information whether or not they can layout the given graph.
 void doLayout(LayoutGraph graph)
          Calculates a layout for the given graph.
protected  void doLayoutCore(LayoutGraph graph)
          Subclasses have to provide core layout code in this method.
 int getGrid()
          Returns the grid distance.
 double getLayoutQuality()
          Returns the currently set layout quality.
 void setGrid(int grid)
          Sets the grid distance.
 void setLayoutQuality(double q)
          Sets the desired layout quality.
 
Methods inherited from class y.layout.CanonicMultiStageLayouter
appendStage, calcLayout, calcLayout, canLayout, 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
 

Constructor Detail

OrthogonalGroupLayouter

public OrthogonalGroupLayouter()
Creates a new instance of OrthogonalGroupLayouter

Method Detail

setLayoutQuality

public void setLayoutQuality(double q)
Sets the desired layout quality. Higher quality means less connection crossings and smaller layout area, but also increased computation time.

By default best layout quality (value 1) is set.

Parameters:
q - a value between 0 and 1.

getLayoutQuality

public double getLayoutQuality()
Returns the currently set layout quality.


setGrid

public void setGrid(int grid)
Sets the grid distance.


getGrid

public int getGrid()
Returns the grid distance.


canLayoutCore

protected boolean canLayoutCore(LayoutGraph graph)
Description copied from class: CanonicMultiStageLayouter
Subclasses have to provide information whether or not they can layout the given graph.

Specified by:
canLayoutCore in class CanonicMultiStageLayouter

doLayoutCore

protected void doLayoutCore(LayoutGraph graph)
Description copied from class: CanonicMultiStageLayouter
Subclasses have to provide core layout code in this method.

Specified by:
doLayoutCore in class CanonicMultiStageLayouter

doLayout

public void doLayout(LayoutGraph graph)
Description copied from class: CanonicMultiStageLayouter
Calculates a layout for the given graph. The given graph will not be copied during the layout process and the layout will be immediatelly applied to the given graph. This method is not side effect free in the sense that the order of edges or nodes in the input graph may change during the layout process.

Specified by:
doLayout in interface Layouter
Overrides:
doLayout in class CanonicMultiStageLayouter

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

2003