org.abego.treelayout.util
Class FixedNodeExtentProvider<T>

java.lang.Object
  extended by org.abego.treelayout.util.FixedNodeExtentProvider<T>
Type Parameters:
T -
All Implemented Interfaces:
NodeExtentProvider<T>

public class FixedNodeExtentProvider<T>
extends Object
implements NodeExtentProvider<T>

A NodeExtentProvider returning the same width and height for each node.

Author:
Udo Borkowski (ub@abego.org)

Constructor Summary
FixedNodeExtentProvider()
          see FixedNodeExtentProvider(double, double)
FixedNodeExtentProvider(double width, double height)
          Specifies the constants to be used as the width and height of the nodes.
 
Method Summary
 double getHeight(T treeNode)
          Returns the height of the given treeNode.
 double getWidth(T treeNode)
          Returns the width of the given treeNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedNodeExtentProvider

public FixedNodeExtentProvider(double width,
                               double height)
Specifies the constants to be used as the width and height of the nodes.

Parameters:
width - [default=0]
height - [default=0]

FixedNodeExtentProvider

public FixedNodeExtentProvider()
see FixedNodeExtentProvider(double, double)

Method Detail

getWidth

public double getWidth(T treeNode)
Description copied from interface: NodeExtentProvider
Returns the width of the given treeNode.

Specified by:
getWidth in interface NodeExtentProvider<T>
Returns:
[result >= 0]

getHeight

public double getHeight(T treeNode)
Description copied from interface: NodeExtentProvider
Returns the height of the given treeNode.

Specified by:
getHeight in interface NodeExtentProvider<T>
Returns:
[result >= 0]


Copyright © 2011 abego Software GmbH, Germany. All Rights Reserved.