An abstract convenience implementation of the
IPortCandidateProvider interface.
portOwner:IPortOwner [read-only]
Gets owner of the port candidate.
Implementation
public function get portOwner():IPortOwner
protected function addExistingPorts(list:List):void
Convenience method for subclasses that adds all existing ports
of the portOwner to the provided list.
Parameters
| list:List — The list to add the ports to.
|
protected function createCallbackPort(graph:IGraph, location:IPoint):DefaultPortCandidate
Factory method that creates a simple candidate that will use the createInstance
method of this instance to delegate createInstance of the port candidate to.
Parameters
| graph:IGraph — The graph where the candidate belongs to
|
| |
| location:IPoint — The location of the candidate.
|
Returns
| DefaultPortCandidate —
A candidate whose createInstance method
delegates to this instance's createInstance
|
protected function createInstance(graph:IGraph, candidate:IPortCandidate):IPort
Callback method used by the ports created using the createCallbackPort factory method.
This method can be overridden by subclasses to perform more sophisticated port creation logic.
Parameters
| graph:IGraph — The graph where the candidate belongs to
|
| |
| candidate:IPortCandidate — he candidate to create a port for.
|
Returns
| IPort —
The new canidate or null if the graph is null.
|
public function getCandidateSourcePortCandidates(context:IInputModeContext, graph:IGraph, target:IPortCandidate):Iterable
Convenience implementation that simply delegates to getPortCandidates.
Returns all port candidates that apply for the provided opposite port candidate.
The Iterable may both contain valid and invalid port candidates.
Parameters
| context:IInputModeContext — The context for which the candidates should be provided.
|
| |
| graph:IGraph — The graph for which the candidates should be queried.
|
| |
| target:IPortCandidate — The opposite port candidate.
|
Returns
| Iterable —
An Iterable over all port candidates that are associated with the given opposite port.
|
public function getCandidateTargetPortCandidates(context:IInputModeContext, graph:IGraph, source:IPortCandidate):Iterable
Convenience implementation that simply delegates to getPortCandidates.
Parameters
| context:IInputModeContext — The context for which the candidates should be provided.
|
| |
| graph:IGraph — The graph the candidate belongs to.
|
| |
| source:IPortCandidate — The source port candidate to create a target port candidate for.
|
Returns
| Iterable —
An Iterable over the found candidates.
|
public function getEdgeSourcePortCandidates(context:IInputModeContext, graph:IGraph, edge:IEdge):Iterable
Convenience implementation that simply delegates to getPortCandidates.
Parameters
| context:IInputModeContext — The context for which the candidates should be provided.
|
| |
| graph:IGraph — The graph the candidate belongs to.
|
| |
| edge:IEdge — The edge to create a source port candidate for.
|
Returns
| Iterable —
An Iterable over the found candidates.
|
public function getEdgeTargetPortCandidates(context:IInputModeContext, graph:IGraph, edge:IEdge):Iterable
Convenience implementation that simply delegates to getPortCandidates.
Returns all port candidates that apply for the provided edge.
The Iterable may both contain valid and invalid port candidates.
Parameters
| context:IInputModeContext — The context for which the candidates should be provided.
|
| |
| graph:IGraph — The graph for which the candidates should be queried.
|
| |
| edge:IEdge — The edge for which target port candidates are sought.
|
Returns
| Iterable —
An Iterable over all port candidates that are associated with the given edge.
|
public function getGraphSourcePortCandidates(context:IInputModeContext, graph:IGraph):Iterable
Convenience implementation that simply delegates to getPortCandidates.
Parameters
| context:IInputModeContext — The context for which the candidates should be provided.
|
| |
| graph:IGraph — The graph the candidate belongs to.
|
Returns
| Iterable —
An Iterable over the found candidates.
|
public function getGraphTargetPortCandidates(context:IInputModeContext, graph:IGraph):Iterable
Convenience implementation that simply delegates to getPortCandidates.
Returns all target port candidates that belong to the context of this provider.
The Iterable may both contain valid and invalid port candidates.
Parameters
| context:IInputModeContext — The context for which the candidates should be provided.
|
| |
| graph:IGraph — The graph for which the candidates should be queried.
|
Returns
| Iterable —
An iterable over all source port candidates that are associated with the current context.
|
protected function getPortCandidates(gcontext:IInputModeContext, raph:IGraph):Iterable
Creates an enumeration of possibly port candidates.
This method is used as a callback by most of the getter methods in this class.
Subclasses habe to override this method to provide the same candidates for all
use-cases.
Parameters
Returns
| Iterable —
An iterable collection of port candidates.
|
protected function setPortOwner(value:IPortOwner):void
Sets the owner of the port candidate.
Parameters