Packagecom.yworks.graph.model
Interfacepublic interface IEdge extends ILabeledItem, IModelItem, ILookup
Implementors DefaultEdge

The interface used to model edges in an IGraph implementation.

This interface provides read-only access to the properties of an edge. In order to modify the state of an instance use the various methods provided by the IGraph this instance belongs to.

An edge connects to two ports and may consist of a number of bends. Also it can have zero or more labels.

This interface combines the functionality of IPortOwner to get access to the ports that edges can optionally have, ILabeledItem to get access to the labels, and, like all items in an IGraph, edges support the ILookup.lookup method inherited from the IModelItem interface that can be used to query additional aspects of each instance.



Public Properties
 PropertyDefined By
  bends : IBendList
[read-only] Provides access to a collection of IBends that describe the geometry of this edge.
IEdge
 Inheritedlabels : ILabelCollection
[read-only] Provides access to a collection of ILabels that are owned by this instance.
ILabeledItem
  sourcePort : IPort
[read-only] Gets the source port instance this edge is connected to.
IEdge
  style : IEdgeStyle
[read-only] Returns the style that is responsible for the visual representation of this edge in a CanvasComponent.
IEdge
  targetPort : IPort
[read-only] Gets the target port instance this edge is connected to.
IEdge
Public Methods
 MethodDefined By
 Inherited
lookup(type:Class):Object
Returns an instance that implements the given type or null.
ILookup
Property Detail
bendsproperty
bends:IBendList  [read-only]

Provides access to a collection of IBends that describe the geometry of this edge.

This gives access to a read-only live view of the bends, i.e. the collection can change over time, as well as the bends contained in it. If a snapshot of the current state is needed, one needs to copy the collection.

In order to modify the bend collection of an edge, use the various methods in IGraph like IGraph.addBend


Implementation
    public function get bends():IBendList
sourcePortproperty 
sourcePort:IPort  [read-only]

Gets the source port instance this edge is connected to.

Although the notion of source and target port is used for directed edges, it is still up to the client to decide whether the edge should be treated as such.


Implementation
    public function get sourcePort():IPort
styleproperty 
style:IEdgeStyle  [read-only]

Returns the style that is responsible for the visual representation of this edge in a CanvasComponent.

In order to set the style on an instance, use the IGraph.setStyle( IEdge, IEdgeStyle ) method. Note that the style instance associated with an edge instance may be shared between multiple edge instances and that the modification of this style will result in a change of the appearance of all edges that are associated with the same style instance.


Implementation
    public function get style():IEdgeStyle
targetPortproperty 
targetPort:IPort  [read-only]

Gets the target port instance this edge is connected to.

Although the notion of source and target port is used for directed edges, it is still up to the client to decide whether the edge should be treated as such.


Implementation
    public function get targetPort():IPort