|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.tree.GenericTreeLayouter.SubtreeShape
public static final class GenericTreeLayouter.SubtreeShape
A GenericTreeLayouter.SubtreeShape represents the position and the borders of a subtree. NodePlacers will move
GenericTreeLayouter.SubtreeShapes and use the borders to calculate distances between the subtrees. When two subtrees are placed
in relation to their common root, their GenericTreeLayouter.SubtreeShapes are merged to represent the new subtree.
The borders on each side of the GenericTreeLayouter.SubtreeShape are modeled with BorderLines. The resulting area
includes the borders of each node and edge in the corresponding subtree. It can also contain the bounds of labels
belonging to those nodes and edges.
The GenericTreeLayouter.SubtreeShape also describes a connector defining the location to which the edge from its parent is
attached. It is possible to add some bends (target points) at the end of this edge and include them in the
GenericTreeLayouter.SubtreeShape. During layout calculation, the last target point is the connection point for the edge.
getBorderLine(int),
getConnectorX(),
getConnectorY(),
addBoundsToShape(double, double, double, double),
addTargetPoint(double, double)![]() |
![]() |
![]() |
![]() |
| Field Summary | |
|---|---|
static int |
BORDERLINE_EAST
Side constant that defines the index of the eastern border line. |
static int |
BORDERLINE_NORTH
Side constant that defines the index of the northern border line. |
static int |
BORDERLINE_SOUTH
Side constant that defines the index of the southern border line. |
static int |
BORDERLINE_WEST
Side constant that defines the index of the western border line. |
static byte |
DIRECTION_EAST
A direction constant that describes that the last connector segment points to the right. |
static byte |
DIRECTION_NORTH
A direction constant that describes that the last connector segment points up. |
static byte |
DIRECTION_SOUTH
A direction constant that describes that the last connector segment points down. |
static byte |
DIRECTION_WEST
A direction constant that describes that the last connector segment points to the left. |
| Method Summary | |
|---|---|
void |
addBoundsToShape(double x,
double y,
double width,
double height)
Extends this GenericTreeLayouter.SubtreeShape instance by the given rectangle. |
void |
addEdgeSegments(LayoutGraph graph,
Edge edge)
Adds all edge segments of the given edge to this GenericTreeLayouter.SubtreeShape instance. |
void |
addLineSegment(double x1,
double y1,
double x2,
double y2)
Extends this GenericTreeLayouter.SubtreeShape instance by the given segment. |
void |
addTargetPoint(double x,
double y)
Adds another point to the connector. |
void |
appendTargetPoints(EdgeLayout edgeLayout)
Appends all target points that have previously been added to this shape to the given EdgeLayout instance. |
void |
assignValuesTo(GenericTreeLayouter.SubtreeShape toShape,
AbstractRotatableNodePlacer.Matrix modificationMatrix)
Copies the state of this GenericTreeLayouter.SubtreeShape instance to the given shape applying a modification matrix. |
GenericTreeLayouter.SubtreeShape |
createCopy(AbstractRotatableNodePlacer.Matrix matrix)
Creates a clone of this GenericTreeLayouter.SubtreeShape instance, modifying it using the provided modification matrix. |
BorderLine |
getBorderLine(int index)
Returns the BorderLine instance that describes the GenericTreeLayouter.SubtreeShape at the given side. |
java.awt.geom.Rectangle2D |
getBounds()
Returns the current bounds of this GenericTreeLayouter.SubtreeShape instance. |
byte |
getConnectorDirection()
Returns the direction of the last connector segment. |
double |
getConnectorX()
Returns the current x-coordinate of the connection point to which the layout algorithm connects the ingoing edge. |
double |
getConnectorY()
Returns the current y-coordinate of the connection point to which the layout algorithm connects the ingoing edge. |
java.awt.geom.Rectangle2D.Double |
getCoreBounds()
Returns the bounds of the NodeLayout of the root node of this GenericTreeLayouter.SubtreeShape instance. |
double |
getMaxX()
Returns the current maximum x-coordinate of this GenericTreeLayouter.SubtreeShape instance. |
double |
getMaxY()
Returns the current maximum y-coordinate of this GenericTreeLayouter.SubtreeShape instance. |
double |
getMinX()
Returns the current minimum x-coordinate of this GenericTreeLayouter.SubtreeShape instance. |
double |
getMinY()
Returns the current minimum y-coordinate of this GenericTreeLayouter.SubtreeShape instance. |
double |
getOriginX()
Returns the current x-coordinate of the origin of this GenericTreeLayouter.SubtreeShape instance. |
double |
getOriginY()
Returns the current y-coordinate of the origin of this GenericTreeLayouter.SubtreeShape instance. |
void |
mergeWith(GenericTreeLayouter.SubtreeShape other)
Merges the given GenericTreeLayouter.SubtreeShape instance with this GenericTreeLayouter.SubtreeShape instance. |
void |
move(double dx,
double dy)
Moves this GenericTreeLayouter.SubtreeShape instance and its connector by the given offsets. |
java.lang.String |
toString()
Returns a string representation of the GenericTreeLayouter.SubtreeShape instance. |
void |
updateConnectorShape()
Adds the line segments of the connector to the bounds of this GenericTreeLayouter.SubtreeShape instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte DIRECTION_NORTH
GenericTreeLayouter.SubtreeShape.
getConnectorDirection(),
Constant Field Valuespublic static final byte DIRECTION_EAST
GenericTreeLayouter.SubtreeShape.
getConnectorDirection(),
Constant Field Valuespublic static final byte DIRECTION_SOUTH
GenericTreeLayouter.SubtreeShape.
getConnectorDirection(),
Constant Field Valuespublic static final byte DIRECTION_WEST
GenericTreeLayouter.SubtreeShape.
getConnectorDirection(),
Constant Field Valuespublic static final int BORDERLINE_NORTH
getBorderLine(int),
Constant Field Valuespublic static final int BORDERLINE_EAST
getBorderLine(int),
Constant Field Valuespublic static final int BORDERLINE_SOUTH
getBorderLine(int),
Constant Field Valuespublic static final int BORDERLINE_WEST
getBorderLine(int),
Constant Field Values| Method Detail |
|---|
public java.awt.geom.Rectangle2D.Double getCoreBounds()
NodeLayout of the root node of this GenericTreeLayouter.SubtreeShape instance.
public java.awt.geom.Rectangle2D getBounds()
GenericTreeLayouter.SubtreeShape instance.
public double getConnectorX()
The connection point can change when target points are added to the GenericTreeLayouter.SubtreeShape instance.
addTargetPoint(double, double),
appendTargetPoints(EdgeLayout)public double getConnectorY()
The connection point can change when target points are added to the GenericTreeLayouter.SubtreeShape instance.
addTargetPoint(double, double),
appendTargetPoints(EdgeLayout)public void updateConnectorShape()
GenericTreeLayouter.SubtreeShape instance.
The line segments result from the target points.
addTargetPoint(double, double)
public void addTargetPoint(double x,
double y)
x - the current x-coordinate of the pointy - the current y-coordinate of the point
public void addEdgeSegments(LayoutGraph graph,
Edge edge)
GenericTreeLayouter.SubtreeShape instance. The border lines are updated.
graph - the input graphedge - the given edgegetBorderLine(int),
addLineSegment(double, double, double, double)public void appendTargetPoints(EdgeLayout edgeLayout)
EdgeLayout instance.
This method is used by NodePlacer instances for the final edge paths.
edgeLayout - the EdgeLayout that will be modifiedaddTargetPoint(double, double)public byte getConnectorDirection()
DIRECTION_NORTH,DIRECTION_EAST,DIRECTION_SOUTH or
DIRECTION_WEST
public void addLineSegment(double x1,
double y1,
double x2,
double y2)
GenericTreeLayouter.SubtreeShape instance by the given segment.
The border lines are updated with this segment.
x1 - the x-coordinate of the first point of the segmenty1 - the y-coordinate of the first point of the segmentx2 - the x-coordinate of the second point of the segmenty2 - the y-coordinate of the second point of the segmentgetBorderLine(int),
addEdgeSegments(LayoutGraph, Edge),
updateConnectorShape()
public void addBoundsToShape(double x,
double y,
double width,
double height)
GenericTreeLayouter.SubtreeShape instance by the given rectangle.
The border lines are updated with this segment.
x - the x-coordinate of the upper-left corner of the rectangley - the y-coordinate of the upper-left corner of the rectanglewidth - the width of the rectangleheight - the height of the rectanglegetBorderLine(int)public void mergeWith(GenericTreeLayouter.SubtreeShape other)
GenericTreeLayouter.SubtreeShape instance with this GenericTreeLayouter.SubtreeShape instance.
The border lines are updated.
other - the GenericTreeLayouter.SubtreeShape to be merged with this GenericTreeLayouter.SubtreeShapepublic double getMinX()
GenericTreeLayouter.SubtreeShape instance.
GenericTreeLayouter.SubtreeShapepublic double getMinY()
GenericTreeLayouter.SubtreeShape instance.
GenericTreeLayouter.SubtreeShapepublic double getMaxX()
GenericTreeLayouter.SubtreeShape instance.
GenericTreeLayouter.SubtreeShapepublic double getMaxY()
GenericTreeLayouter.SubtreeShape instance.
GenericTreeLayouter.SubtreeShapepublic BorderLine getBorderLine(int index)
BorderLine instance that describes the GenericTreeLayouter.SubtreeShape at the given side.
index - one of the predefined borderline directions
BorderLine instance for the given side
java.lang.IllegalArgumentException - if the given index is invalid
public void move(double dx,
double dy)
GenericTreeLayouter.SubtreeShape instance and its connector by the given offsets.
Border lines are updated.
dx - the delta x-offset by which this shape will be moveddy - the delta y-offset by which this shape will be movedpublic double getOriginX()
GenericTreeLayouter.SubtreeShape instance.
The origin is defined as the upper left corner of the NodeLayout of the local root of this shape.
public double getOriginY()
GenericTreeLayouter.SubtreeShape instance.
The origin is defined as the upper left corner of the NodeLayout of the local root of this shape.
public GenericTreeLayouter.SubtreeShape createCopy(AbstractRotatableNodePlacer.Matrix matrix)
GenericTreeLayouter.SubtreeShape instance, modifying it using the provided modification matrix.
matrix - the matrix that defines the modification for the new instance
GenericTreeLayouter.SubtreeShape instanceAbstractRotatableNodePlacer.Matrix.DEFAULT
public void assignValuesTo(GenericTreeLayouter.SubtreeShape toShape,
AbstractRotatableNodePlacer.Matrix modificationMatrix)
GenericTreeLayouter.SubtreeShape instance to the given shape applying a modification matrix.
toShape - the given shape that gets the assigned valuesmodificationMatrix - the matrix that may add geometrical modificationspublic java.lang.String toString()
GenericTreeLayouter.SubtreeShape instance.
toString in class java.lang.ObjectGenericTreeLayouter.SubtreeShape instance
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||