com.jgraph.layout.tree

Class JGraphAbstractTreeLayout.TreeNode

protected class JGraphAbstractTreeLayout.TreeNode extends Object

An ADT representing a node in a tree structure.
Field Summary
protected Objectcell
The graph cell this node corresponds to
protected doubleheight
The height of this node
protected doublewidth
The width of this node
protected doublex
The position location of this node
protected doubley
Constructor Summary
TreeNode(Object cell)
Creates tree node corresponding to the specified cell
Method Summary
doublegetWidth()
protected voidrouteEdges(Point2D parent)
Routes edges between level so the edge descends halfway down to the next level of cells, moves across to above the cell and then descends to join the cell
voidsetWidth(double width)

Field Detail

cell

protected Object cell
The graph cell this node corresponds to

height

protected double height
The height of this node

width

protected double width
The width of this node

x

protected double x
The position location of this node

y

protected double y

Constructor Detail

TreeNode

public TreeNode(Object cell)
Creates tree node corresponding to the specified cell

Parameters: cell the cell this tree node corresponds to

Method Detail

getWidth

public double getWidth()

Returns: the width

routeEdges

protected void routeEdges(Point2D parent)
Routes edges between level so the edge descends halfway down to the next level of cells, moves across to above the cell and then descends to join the cell

setWidth

public void setWidth(double width)

Parameters: width the width to set

Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.