Simple implementation of an
IHandleProvider
that can be used for
IEdge
s.
It will return the
IHandle
s for
the source and target ports using
PortRelocationHandle
s.
Note that this implementation also explicitly implements the
IEdgePortHandleProvider
and
that it is recommended to decorate the
IEdgePortHandleProvider
interface with edges
in order to influence the handles of the source and target port of the edge instead of directly decorating and
implementing the
IHandleProvider
interface. The default implementation of the
IHandleProvider
interface in the lookup of the
IEdge
s (see
DefaultEdgeLookup
) will use
the
IEdgePortCandidateProvider
interface to collect the source and target port handles.
edge:IEdge
The edge this provider is working on.
Implementation protected function get edge():IEdge
protected function set edge(value:IEdge):void
graph:IGraph
The graph this provider is working on.
Implementation protected function get graph():IGraph
protected function set graph(value:IGraph):void
public function PortRelocationHandleProvider(graph:IGraph, edge:IEdge)
Initializes a new instance of the PortRelocationHandleProvider
class
using the given graph and edge.
Parameters | graph:IGraph — The graph or null. If the graph is null, the handles will try to
receive the graph from the GraphCanvasComponent it is used in.
|
|
| edge:IEdge — The edge.
|
protected function createPortRelocationHandle(graph:IGraph, edge:IEdge, sourcePort:Boolean):IHandle
Factory method that creates the a PortRelocationHandle
.
Parameters
| graph:IGraph — The graph that contains the edge.
|
|
| edge:IEdge — The edge.
|
|
| sourcePort:Boolean — If set to true , the handle for the source port is sought.
|
Returns public function getHandle(context:IInputModeContext, edge:IEdge, sourceHandle:Boolean):IHandle
Gets an IHandle
implementation for one end of the provided edge.
Parameters
| context:IInputModeContext — The context in which the handle will be used.
|
|
| edge:IEdge — The edge for which an handle is needed.
|
|
| sourceHandle:Boolean — If set to true the handle for the source side/port should be returned.
|
Returns | IHandle — The handle to use for the provided side or null .
|
public function getHandles(context:IInputModeContext):Collection
Returns a collection of zero or more IHandle
implementations
that are associated with this instance.
Parameters
Returns
Wed Oct 7 2015, 04:52 PM +02:00