|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.DefaultEdgeLayout
public class DefaultEdgeLayout
DefaultEdgeLayout is the default implementation of the EdgeLayout interface.
The layout information consists of the two end points of the EdgeLayout and a sequence of control points
that determine the visual path of the edge.
![]() |
![]() |
| Constructor Summary | |
|---|---|
DefaultEdgeLayout()
Creates a new DefaultEdgeLayout instance. |
|
DefaultEdgeLayout(EdgeLayout layout)
Creates a new DefaultEdgeLayout which copies the given EdgeLayout. |
|
| Method Summary | |
|---|---|
void |
addPoint(double x,
double y)
Adds a control point to the end of the control point sequence. |
void |
clearPoints()
Removes all control points from this edge layout. |
YPoint |
getPoint(int index)
Returns the control point at the given position in the sequence of control points. |
YPoint |
getSourcePoint()
Returns the relative coordinates of the first end point of this layout. |
YPoint |
getTargetPoint()
Returns the relative coordinates of the second end point of this layout. |
int |
pointCount()
Returns the number of control points of the edge. |
void |
setPoint(int index,
double x,
double y)
Sets the absolute coordinates of the control point at the given position in the sequence of control points. |
void |
setSourcePoint(YPoint point)
Sets the relative coordinates of the first end point of this layout. |
void |
setTargetPoint(YPoint point)
Sets the relative coordinates of the second end point of this layout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultEdgeLayout()
DefaultEdgeLayout instance.
public DefaultEdgeLayout(EdgeLayout layout)
DefaultEdgeLayout which copies the given EdgeLayout.
layout - the EdgeLayout that is copied| Method Detail |
|---|
public int pointCount()
EdgeLayoutThe source and target points are not included in the point count.
pointCount in interface EdgeLayoutpublic YPoint getPoint(int index)
EdgeLayout
The first control point in the sequence has index 0 and the last control point has index
EdgeLayout.pointCount() -1.
getPoint in interface EdgeLayoutindex - the position of the control point in the control point sequence
EdgeLayout.setPoint(int, double, double)
public void setPoint(int index,
double x,
double y)
EdgeLayout
The first control point in the sequence has index 0 and the last control point has index
EdgeLayout.pointCount() -1.
setPoint in interface EdgeLayoutindex - the position of the changing control point in the sequencex - the new absolute x-coordinate of the control point at the given indexy - the new absolute y-coordinate of the control point at the given index
public void addPoint(double x,
double y)
EdgeLayout
addPoint in interface EdgeLayoutx - the absolute x-coordinate of the new control pointy - the absolute y-coordinate of the new control pointpublic void clearPoints()
EdgeLayout
The EdgeLayout still keeps the source point and the
target point.
clearPoints in interface EdgeLayoutpublic YPoint getSourcePoint()
EdgeLayout
These coordinates are relative to the center location of the edge's
source node. To obtain the absolute coordinates of the end point, the
relative coordinates have to be added to the center coordinates of the
source NodeLayout.
getSourcePoint in interface EdgeLayoutLayoutGraph.getCenterX(y.base.Node),
LayoutGraph.getCenterY(y.base.Node),
NodeLayout.getX(),
NodeLayout.getY()public YPoint getTargetPoint()
EdgeLayout
These coordinates are relative to the center location of the edge's
target node. To obtain the absolute coordinates of the end point, the
relative coordinates have to be added to the center coordinates of the
target NodeLayout.
getTargetPoint in interface EdgeLayoutLayoutGraph.getCenterX(y.base.Node),
LayoutGraph.getCenterY(y.base.Node),
NodeLayout.getX(),
NodeLayout.getY()public void setSourcePoint(YPoint point)
EdgeLayout
These coordinates are relative to the center location of the edge's
source node. To obtain the absolute coordinates of the end point, the
relative coordinates have to be added to the center coordinates of the
source NodeLayout.
setSourcePoint in interface EdgeLayoutpoint - the new relative coordinates of the source pointLayoutGraph.getCenterX(y.base.Node),
LayoutGraph.getCenterY(y.base.Node),
NodeLayout.getX(),
NodeLayout.getY()public void setTargetPoint(YPoint point)
EdgeLayout
These coordinates are relative to the center location of the edge's
target node. To obtain the absolute coordinates of the end point, the
relative coordinates have to be added to the center coordinates of the
target NodeLayout.
setTargetPoint in interface EdgeLayoutpoint - the new relative coordinates of the target pointLayoutGraph.getCenterX(y.base.Node),
LayoutGraph.getCenterY(y.base.Node),
NodeLayout.getX(),
NodeLayout.getY()
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||