|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ParentPlacementStrategy
Defines an interface for classes that know how to calculate the horizontal
placement of Node
s above their children.
To provide a new parent placement, create a class implementing
ParentPlacementStrategy
public class MyParentPlacementStrategy implements ParentPlacementStrategy { public double calculateNodeLeft(Tree tree) { ... return ...; } }and add a new member to the
ParentPlacement
enumeration.
enum ParentPlacement { ... CENTER_ABOVE_SUBTREE(new CenterParentAboveSubtree(), "Center above the complete width of its subtree"), MY_PARENT_PLACEMENT(new MyParentPlacementStrategy(), "My parent placement"); //<-- Add this line. ... }
Method Summary | |
---|---|
double |
calculateNodeLeft(Tree tree)
Calculate the x-coordinate of the root node of tree in the
coordinate system of tree . |
Method Detail |
---|
double calculateNodeLeft(Tree tree)
tree
in the
coordinate system of tree
.
tree
- the subtree for whose root node the x-coordinate is to be
calculated.
tree
in the
coordinate system of tree
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |