JGraphLayout
v1.4.0.2


com.jgraph.layout.tree
Class JGraphTreeLayout.StandardTreeNode

java.lang.Object
  extended bycom.jgraph.layout.tree.JGraphAbstractTreeLayout.TreeNode
      extended bycom.jgraph.layout.tree.JGraphTreeLayout.StandardTreeNode
Enclosing class:
JGraphTreeLayout

protected class JGraphTreeLayout.StandardTreeNode
extends JGraphAbstractTreeLayout.TreeNode

An ADT representing a node in a tree structure.


Field Summary
 
Fields inherited from class com.jgraph.layout.tree.JGraphAbstractTreeLayout.TreeNode
cell, height, width, x, y
 
Constructor Summary
JGraphTreeLayout.StandardTreeNode(Object cell)
          Creates tree node corresponding to the specified cell
 
Method Summary
 Iterator getChildren()
           
 double getHeight()
           
 int getLeftWidth()
           
 List getNodesByLevel()
          Return the nodes of the level of this node
 int getRightWidth()
           
 void setPosition(Point2D parent, double levelHeight)
          Sets the position of this node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGraphTreeLayout.StandardTreeNode

public JGraphTreeLayout.StandardTreeNode(Object cell)
Creates tree node corresponding to the specified cell

Parameters:
cell - the cell this tree node corresponds to
Method Detail

getChildren

public Iterator getChildren()
Returns:
the children of this node

getLeftWidth

public int getLeftWidth()
Returns:
the left-most point of the left contour

getRightWidth

public int getRightWidth()
Returns:
the right-most point of the right contour

getHeight

public double getHeight()
Returns:
the height of this node

setPosition

public void setPosition(Point2D parent,
                        double levelHeight)
Sets the position of this node

Parameters:
parent - the parent of this node
levelHeight - the height of nodes on the same level

getNodesByLevel

public List getNodesByLevel()
Return the nodes of the level of this node

Returns:
collection of nodes of same level

JGraphLayout
v1.4.0.2


Copyright (C) 2005 JGraph.com. All rights reserved.