|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.DefaultEdgeLayout
public class DefaultEdgeLayout
This class is a default implementation of the EdgeLayout interface.
Constructor Summary | |
---|---|
DefaultEdgeLayout()
Creates a new DefaultEdgeLayout. |
|
DefaultEdgeLayout(EdgeLayout layout)
Creates a new DefaultEdgeLayout which is the copy of another EdgeLayout. |
Method Summary | |
---|---|
void |
addPoint(double x,
double y)
Adds a control point to the end of the control point sequence. |
void |
clearPoints()
Remove all control points from this edge layout. |
YPoint |
getPoint(int index)
Returns the control point at position index of
the sequence. |
YPoint |
getSourcePoint()
Returns the relative coordinates of the first end point of this layout that is associated with the source node of the edge. |
YPoint |
getTargetPoint()
Returns the relative coordinates of the second end point of this layout that is associated with the target node of the edge. |
int |
pointCount()
Returns the number of control points of the edge. |
void |
setPoint(int index,
double x,
double y)
Sets the coordinates of the control point at position index of
the sequence. |
void |
setSourcePoint(YPoint point)
Sets the relative coordinates of the first end point of this layout that is associated with the source node of the edge. |
void |
setTargetPoint(YPoint point)
Sets the relative coordinates of the second end point of this layout that is associated with the target node of the edge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultEdgeLayout()
public DefaultEdgeLayout(EdgeLayout layout)
layout
- another edge layoutMethod Detail |
---|
public int pointCount()
EdgeLayout
pointCount
in interface EdgeLayout
public YPoint getPoint(int index)
EdgeLayout
index
of
the sequence.
getPoint
in interface EdgeLayout
index
- 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
index
of
the sequence.
The first control point in the sequence has index 0
and the last control point has index pointCount() - 1.
setPoint
in interface EdgeLayout
index
- position of the control point in the control point sequence.x
- absolute x-coordinate of the control point at the given index.y
- absolute y-coordinate of the control point at the given index.public void addPoint(double x, double y)
EdgeLayout
addPoint
in interface EdgeLayout
x
- the absolute x-coordinate of the control point.y
- the absolute y-coordinate of the control point.public void clearPoints()
EdgeLayout
clearPoints
in interface EdgeLayout
public YPoint getSourcePoint()
EdgeLayout
getSourcePoint
in interface EdgeLayout
LayoutGraph.getCenterX(y.base.Node)
,
LayoutGraph.getCenterY(y.base.Node)
,
NodeLayout.getX()
,
NodeLayout.getWidth()
public YPoint getTargetPoint()
EdgeLayout
getTargetPoint
in interface EdgeLayout
LayoutGraph.getCenterX(y.base.Node)
,
LayoutGraph.getCenterY(y.base.Node)
,
NodeLayout.getX()
,
NodeLayout.getWidth()
public void setSourcePoint(YPoint point)
EdgeLayout
setSourcePoint
in interface EdgeLayout
point
- the relative coordinates of the source point.EdgeLayout.getTargetPoint()
public void setTargetPoint(YPoint point)
EdgeLayout
setTargetPoint
in interface EdgeLayout
point
- the relative coordinates of the source point.EdgeLayout.getTargetPoint()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |