| Package | com.yworks.graph.model |
| Class | public class DefaultEdge |
| Inheritance | DefaultEdge AbstractLabeledItem AbstractModelItem |
| Implements | IEdge, ITagOwner |
IEdge
interface that can be used stand-alone.
| Property | Defined by | ||
|---|---|---|---|
| bends : IBendList
Provides access to a collection of
IBends that
describe the geometry of this edge. | DefaultEdge | ||
![]() | labels : ILabelCollection
The collection for the labels.
| AbstractLabeledItem | |
| ports : IPortCollection
[read-only]
| DefaultEdge | ||
| sourcePort : IPort
Gets the source port instance this edge is connected to.
| DefaultEdge | ||
| style : IEdgeStyle
Returns the style that is responsible for the visual representation
of this edge in a
CanvasComponent. | DefaultEdge | ||
| tag : Object
Gets or sets the tag associated with this instance.
| DefaultEdge | ||
| targetPort : IPort
Gets the target port instance this edge is connected to.
| DefaultEdge | ||
| Method | Defined by | ||
|---|---|---|---|
|
DefaultEdge(labelCollection:ILabelCollection, sourcePort:IPort = null, targetPort:IPort = null, bends:IBendList = null, lookup:ILookup = null)
Creates an edge
using the given source and target ports, bend and label collections and lookup implementation.
| DefaultEdge | ||
![]() |
Returns the currently set
ILookup delegate. | AbstractModelItem | |
|
lookup(type:Class):Object
Returns an instance that implements the given type or
null. | DefaultEdge | ||
![]() |
registerLookup(type:Class, instance:Object):void
Register an implementation for the given type that should be returned
when
lookup is called with this given type. | AbstractModelItem | |
![]() |
setLookupImplementation(newLookup:ILookup):void
Sets the
ILookup implementation used for
lookup calls on this instance. | AbstractModelItem | |
|
toString():String
| DefaultEdge | ||
| bends | property |
bends:IBendList [read-write]
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
public function get bends():IBendList
public function set bends(value:IBendList):void
| ports | property |
| sourcePort | property |
sourcePort:IPort [read-write]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
public function set sourcePort(value:IPort):void
| style | property |
style:IEdgeStyle [read-write]
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
public function set style(value:IEdgeStyle):void
| tag | property |
tag:Object [read-write]Gets or sets the tag associated with this instance.
The implementation itself does not normally depend on the tag associated with it. It serves as storage for the object only.
Implementation public function get tag():Object
public function set tag(value:Object):void
| targetPort | property |
targetPort:IPort [read-write]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
public function set targetPort(value:IPort):void
| DefaultEdge | () | constructor |
public function DefaultEdge(labelCollection:ILabelCollection, sourcePort:IPort = null, targetPort:IPort = null, bends:IBendList = null, lookup:ILookup = null)Creates an edge using the given source and target ports, bend and label collections and lookup implementation.
ParameterslabelCollection:ILabelCollection |
|
sourcePort:IPort (default = null) |
|
targetPort:IPort (default = null) |
|
bends:IBendList (default = null) |
|
lookup:ILookup (default = null) |
| lookup | () | method |
public override function lookup(type:Class):Object
Returns an instance that implements the given type or null.
Typically, this method will be called in order 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 reobtained for subsequent use.
type:Class — the type for which an instance shall be returned
|
Object — an instance that is assignable to type or null
|
| toString | () | method |
public function toString():StringReturns
String |