Package org.abego.treelayout
Class TreeLayout.NormalizedPosition
java.lang.Object
java.awt.geom.Point2D
org.abego.treelayout.TreeLayout.NormalizedPosition
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- TreeLayout<TreeNode>
The algorithm calculates the position starting with the root at 0. I.e.
the left children will get negative positions. However we want the result
to be normalized to (0,0).
TreeLayout<TreeNode>.NormalizedPosition
will normalize the position (given relative to
the root position), taking the current bounds into account. This way the
left most node bounds will start at x = 0, the top most node bounds at y
= 0.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Point2D
Point2D.Double, Point2D.Float
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getX()
double
getY()
void
setLocation
(double x_relativeToRoot, double y_relativeToRoot) Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
-
Field Details
-
x_relativeToRoot
private double x_relativeToRoot -
y_relativeToRoot
private double y_relativeToRoot
-
-
Constructor Details
-
NormalizedPosition
public NormalizedPosition(double x_relativeToRoot, double y_relativeToRoot)
-
-
Method Details