JGraphAddons
v1.0


org.jgraph.layout
Class TreeLayoutAlgorithm

java.lang.Object
  |
  +--org.jgraph.layout.JGraphLayoutAlgorithm
        |
        +--org.jgraph.layout.TreeLayoutAlgorithm

public class TreeLayoutAlgorithm
extends JGraphLayoutAlgorithm

TODO:COMMENT ME!


Field Summary
protected  int alignment
           
protected  boolean centerRoot
           
protected  boolean combineLevelNodes
           
protected  int levelDistance
           
protected  int nodeDistance
           
protected  int orientation
           
 
Fields inherited from class org.jgraph.layout.JGraphLayoutAlgorithm
LAYOUT_ATTRIBUTES
 
Constructor Summary
TreeLayoutAlgorithm()
           
 
Method Summary
 JGraphLayoutSettings createSettings()
          Subclassers may return a new JComponent that allows to configure the layout.
 int getAlignment()
           
 String getHint()
          Get a human readable hint for using this layout.
 int getLevelDistance()
           
 int getNodeDistance()
           
 int getOrientation()
           
 boolean isCenterRoot()
           
 boolean isCombineLevelNodes()
           
 void run(JGraph graph, Object[] cells, int step)
          Executes the layout algorithm.
 void setAlignment(int alignment)
          SwingConstants.TOP SwingConstants.CENTER SwingConstants.BOTTOM
 void setCenterRoot(boolean b)
           
 void setCombineLevelNodes(boolean combineLevelNodes)
           
 void setLevelDistance(int distance)
           
 void setNodeDistance(int distance)
           
 void setOrientation(int orientation)
          SwingConstants.NORTH SwingConstants.EAST SwingConstants.SOUTH SwingConstants.WEST
 String toString()
          Returns the name of this algorithm in human readable form.
 
Methods inherited from class org.jgraph.layout.JGraphLayoutAlgorithm
applyLayout, createDialog, createDialog, getMaximumProgress, getProgress, isAllowedToRun, populateDialog, run, setAllowedToRun, setMaximumProgress, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alignment

protected int alignment

orientation

protected int orientation

levelDistance

protected int levelDistance

nodeDistance

protected int nodeDistance

centerRoot

protected boolean centerRoot

combineLevelNodes

protected boolean combineLevelNodes
Constructor Detail

TreeLayoutAlgorithm

public TreeLayoutAlgorithm()
Method Detail

toString

public String toString()
Returns the name of this algorithm in human readable form.

Overrides:
toString in class Object

getHint

public String getHint()
Get a human readable hint for using this layout.

Overrides:
getHint in class JGraphLayoutAlgorithm

createSettings

public JGraphLayoutSettings createSettings()
Description copied from class: JGraphLayoutAlgorithm
Subclassers may return a new JComponent that allows to configure the layout. The default implementation returns null.
Note: Settings creation may be expensive so the UI should cache the values returned by this method.

Overrides:
createSettings in class JGraphLayoutAlgorithm

setAlignment

public void setAlignment(int alignment)
SwingConstants.TOP SwingConstants.CENTER SwingConstants.BOTTOM

Parameters:
alignment -

setOrientation

public void setOrientation(int orientation)
SwingConstants.NORTH SwingConstants.EAST SwingConstants.SOUTH SwingConstants.WEST


setLevelDistance

public void setLevelDistance(int distance)

setNodeDistance

public void setNodeDistance(int distance)

setCenterRoot

public void setCenterRoot(boolean b)

run

public void run(JGraph graph,
                Object[] cells,
                int step)
Description copied from class: JGraphLayoutAlgorithm
Executes the layout algorithm.

Specified by:
run in class JGraphLayoutAlgorithm

isCombineLevelNodes

public boolean isCombineLevelNodes()
Returns:
Returns the combineLevelNodes.

setCombineLevelNodes

public void setCombineLevelNodes(boolean combineLevelNodes)
Parameters:
combineLevelNodes - The combineLevelNodes to set.

getAlignment

public int getAlignment()
Returns:
Returns the alignment.

isCenterRoot

public boolean isCenterRoot()
Returns:
Returns the centerRoot.

getLevelDistance

public int getLevelDistance()
Returns:
Returns the levelDistance.

getNodeDistance

public int getNodeDistance()
Returns:
Returns the nodeDistance.

getOrientation

public int getOrientation()
Returns:
Returns the orientation.

JGraphAddons
v1.0


Copyright (C) 2003-2004 Gaudenz Alder. All rights reserved.