Packagecom.yworks.yfiles.layout
Interfacepublic interface EdgeLayout
Implementors DefaultEdgeLayout

This interface encapsulates the layout information for an edge. The layout information consists of the two end points of the edge layout and a sequence of control points that determine the visual path of the edge.



Public Properties
 PropertyDefined By
  sourcePoint : YPoint
Getter: Returns the relative coordinates of the first end point of this layout that is associated with the source node of the edge.
EdgeLayout
  targetPoint : YPoint
Getter: Returns the relative coordinates of the second end point of this layout that is associated with the target node of the edge.
EdgeLayout
Public Methods
 MethodDefined By
  
addPoint(x:Number, y:Number):void
Adds a control point to the end of the control point sequence.
EdgeLayout
  
Remove all control points from this edge layout.
EdgeLayout
  
getPoint(index:int):YPoint
Returns the control point at position index of the sequence.
EdgeLayout
  
Returns the number of control points of the edge.
EdgeLayout
  
setPoint(index:int, x:Number, y:Number):void
Sets the coordinates of the control point at position index of the sequence.
EdgeLayout
Property Detail
sourcePointproperty
sourcePoint:YPoint

Getter: Returns the relative coordinates of the first end point of this layout that is associated with the source node of the edge. The returned coordinates are relative to the center location of the source node of the edge. To obtain the absolute coordinates of the end point it is therefore necessary to add the center coordinates of the source node layout to the returned value.

Setter: Sets the relative coordinates of the first end point of this layout that is associated with the source node of the edge. The given coordinates must be relative to the center location of the source node of the edge.


Implementation
    public function get sourcePoint():YPoint
    public function set sourcePoint(value:YPoint):void

See also

targetPointproperty 
targetPoint:YPoint

Getter: Returns the relative coordinates of the second end point of this layout that is associated with the target node of the edge. The returned coordinates are relative to the center location of the target node of the edge. To obtain the absolute coordinates of the end point it is therefore necessary to add the center coordinates of the target node layout to the returned value.

Setter: Sets the relative coordinates of the second end point of this layout that is associated with the target node of the edge. The given coordinates must be relative to the center location of the target node of the edge.


Implementation
    public function get targetPoint():YPoint
    public function set targetPoint(value:YPoint):void

See also

Method Detail
addPoint()method
public function addPoint(x:Number, y:Number):void

Adds a control point to the end of the control point sequence.

Parameters

x:Number — the absolute x-coordinate of the control point.
 
y:Number — the absolute y-coordinate of the control point.

clearPoints()method 
public function clearPoints():void

Remove all control points from this edge layout.

getPoint()method 
public function getPoint(index:int):YPoint

Returns the control point at position index of the sequence.

Parameters

index:int — position of the control point in the control point sequence.

Returns
YPoint — the absolute coordinates of the control point at the given index.

See also

pointCount()method 
public function pointCount():int

Returns the number of control points of the edge. The source and target points are not included in the point count.

Returns
int — the number of control points
setPoint()method 
public function setPoint(index:int, x:Number, y:Number):void

Sets the coordinates of the control point at position index of the sequence. The first control point in the sequence has index 0 and the last control point has index pointCount() - 1.

Parameters

index:int — position of the control point in the control point sequence.
 
x:Number — absolute x-coordinate of the control point at the given index.
 
y:Number — absolute y-coordinate of the control point at the given index.