Implements
- I
- I
- I
- I
- I
- I
Remarks
Note that this class is not the one used as the default implementation of a Graph's IEdges and casting them to SimpleEdge will fail. Instances of this class can be used without an accompanying graph instance. All the properties are mutable. An example of a possible use case would be the rendering of an edge into a graphics context: Simply create a SimpleEdge, associate a style with it and use the style's renderer instance to obtain a rendering for the edge.
Members
Show:
Constructors
Creates an edge with a default lookup, and, optionally, the given source and target ports.
Creates an edge with a default lookup, and, optionally, the given source and target ports.
While technically the source and target port can be
null here, this will cause all kinds of issues, e.g. with styles or label models that require the ports to be non-null to work properly.Parameters
Properties
Gets or sets the collection of bends that describe the geometry of this edge.
Gets or sets the collection of bends that describe the geometry of this edge.
conversionfinal
Implements
IEdge.bendsDetermines whether an edge is a self-loop, that is, it starts and ends at the same port owner.
Determines whether an edge is a self-loop, that is, it starts and ends at the same port owner.
Gets or sets the collection of labels that are owned by this instance.
Gets or sets the collection of labels that are owned by this instance.
conversionfinal
Implements
ILabelOwner.labelsGets or sets the collection of ports that are owned by this instance.
Gets or sets the collection of ports that are owned by this instance.
conversionfinal
Implements
IPortOwner.portsGets the source node for the given edge or null.
Gets the source node for the given edge or
null.Gets or sets the source port instance this edge is connected to.
Gets or sets 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.
final
Implements
IEdge.sourcePortGets or sets the style that is responsible for the visual representation of this edge in a CanvasComponent.
Gets or sets the style that is responsible for the visual representation of this edge in a CanvasComponent.
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.
final
Implements
IEdge.styleThe tag is an optional user-defined object which can be used to store arbitrary data related to this item. The item itself just provides the storage for the object.
final
Implements
ITagOwner.tagGets the target node for the given edge or null.
Gets the target node for the given edge or
null.Gets or sets the target port instance this edge is connected to.
Gets or sets 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.
final
Implements
IEdge.targetPortMethods
Gets a EdgeDecorator to modify the ports ILookup.
Gets a EdgeDecorator to modify the ports ILookup.
Typically, this method will be called to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile-time constraints. An instance implementing this method is not required to return non-
null implementations for the types, nor does it have to return the same instance any time. Also, it depends on the type and context whether the instance returned stays up to date or needs to be re-obtained for further use.final
Parameters
- type: Constructor<T>
- the type for which an instance shall be returned
Return Value
- T
- an instance that is assignable to the type or
null
Implements
ILookup.lookupGets the opposite port owner of an IEdge.
Gets the opposite port owner of an IEdge.
Parameters
- owner: IPortOwner
- The owner of the port that the IEdge is connected to.
Return Value
- IPortOwner
- The owner of the opposite port.
Throws
- Exception ({ name: 'ArgumentError' })
- If
owneris neither the source nor target of the edge.
See Also
API
- sourcePort, targetPort
Defined in
IEdge.oppositeParameters
Return Value
- IPort
- The opposite port.
Throws
- Exception ({ name: 'ArgumentError' })
- If
portis neither the source nor target of the edge.
See Also
API
- sourcePort, targetPort