Package | com.yworks.graph.model |
Interface | public interface IEdge extends ILabeledItem, IModelItem, ILookup |
Implementors | DefaultEdge |
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.
Property | Defined By | ||
---|---|---|---|
bends : IBendList [read-only]
Provides access to a collection of IBends that
describe the geometry of this edge. | IEdge | ||
labels : 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 |
bends | property |
bends:IBendList
[read-only]
Provides access to a collection of IBend
s 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
public function get bends():IBendList
sourcePort | property |
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.
public function get sourcePort():IPort
style | property |
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.
public function get style():IEdgeStyle
targetPort | property |
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.
public function get targetPort():IPort