Package | com.yworks.graph.model |
Class | public class DefaultEdge |
Inheritance | DefaultEdge AbstractLabeledItem AbstractModelItem Object |
Implements | IEdge, ITagOwner, com.yworks.graph.model.IZOrderOwner |
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 | ||
zOrder : int
The z-order of a model item which determines its render order in comparison to other model items. | 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 [override]
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
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
public function set bends(value:IBendList):void
ports | property |
sourcePort | property |
sourcePort:IPort
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
public function set sourcePort(value:IPort):void
style | property |
style:IEdgeStyle
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
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.
public function get tag():Object
public function set tag(value:Object):void
targetPort | property |
targetPort:IPort
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
public function set targetPort(value:IPort):void
zOrder | property |
zOrder:int
The z-order of a model item which determines its render order in comparison to other model items.
public function get zOrder():int
public function set zOrder(value:int):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 |
override public 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.
Parameters
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():String
Returns
String |