jcreek.cke.graph.layout
Class TreeLayout

java.lang.Object
  extended byjcreek.cke.graph.layout.TreeLayout
All Implemented Interfaces:
Layout

public class TreeLayout
extends java.lang.Object
implements Layout


Field Summary
static char LAYOUT_DIRECTION_DOWN
           
static char LAYOUT_DIRECTION_LEFT
           
static char LAYOUT_DIRECTION_RIGHT
           
static char LAYOUT_DIRECTION_UP
           
 
Constructor Summary
TreeLayout(char orient)
           
 
Method Summary
protected  Graph createTree(Graph graph)
           
 Node getRoot()
           
protected  void initializeData(Node node, int level)
           
 void layout(Graph graph, java.awt.Rectangle bounds)
          Lay out the graph within the supplied bounds.
 void setRoot(Node node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAYOUT_DIRECTION_RIGHT

public static final char LAYOUT_DIRECTION_RIGHT
See Also:
Constant Field Values

LAYOUT_DIRECTION_LEFT

public static final char LAYOUT_DIRECTION_LEFT
See Also:
Constant Field Values

LAYOUT_DIRECTION_UP

public static final char LAYOUT_DIRECTION_UP
See Also:
Constant Field Values

LAYOUT_DIRECTION_DOWN

public static final char LAYOUT_DIRECTION_DOWN
See Also:
Constant Field Values
Constructor Detail

TreeLayout

public TreeLayout(char orient)
Method Detail

setRoot

public void setRoot(Node node)

getRoot

public Node getRoot()

layout

public void layout(Graph graph,
                   java.awt.Rectangle bounds)
Description copied from interface: Layout
Lay out the graph within the supplied bounds.

Specified by:
layout in interface Layout

createTree

protected Graph createTree(Graph graph)

initializeData

protected void initializeData(Node node,
                              int level)


Created at IDI, NTNU by the Artificial Intelligence and Learning group