Package org.abego.treelayout.util
Class FixedNodeExtentProvider<T>
- java.lang.Object
-
- org.abego.treelayout.util.FixedNodeExtentProvider<T>
-
- Type Parameters:
T- Type of elements used as nodes in the tree
- All Implemented Interfaces:
NodeExtentProvider<T>
public class FixedNodeExtentProvider<T> extends Object implements NodeExtentProvider<T>
ANodeExtentProviderreturning the same width and height for each node.- Author:
- Udo Borkowski (ub@abego.org)
-
-
Constructor Summary
Constructors Constructor Description FixedNodeExtentProvider()FixedNodeExtentProvider(double width, double height)Specifies the constants to be used as the width and height of the nodes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetHeight(T treeNode)Returns the height of the given treeNode.doublegetWidth(T treeNode)Returns the width of the given treeNode.
-
-
-
Method Detail
-
getWidth
public double getWidth(T treeNode)
Description copied from interface:NodeExtentProviderReturns the width of the given treeNode.- Specified by:
getWidthin interfaceNodeExtentProvider<T>- Parameters:
treeNode-- Returns:
- [result >= 0]
-
getHeight
public double getHeight(T treeNode)
Description copied from interface:NodeExtentProviderReturns the height of the given treeNode.- Specified by:
getHeightin interfaceNodeExtentProvider<T>- Parameters:
treeNode-- Returns:
- [result >= 0]
-
-