Packagecom.yworks.graph.model
Classpublic class CurrentEdgePortsCandidateProvider
InheritanceCurrentEdgePortsCandidateProvider Inheritance Object
Implements IEdgePortCandidateProvider
Subclasses DefaultEdgePortsCandidateProvider

An implementation of the IEdgePortCandidateProvider interface that returns the current source and target ports



Protected Properties
 PropertyDefined By
  edge : IEdge
[read-only] The edge to return candidates for.
CurrentEdgePortsCandidateProvider
Public Methods
 MethodDefined By
  
Creates a new instance.
CurrentEdgePortsCandidateProvider
  
Returns all source port candidates that may be used for the edge.
CurrentEdgePortsCandidateProvider
  
Returns all target port candidates that may be used for the edge.
CurrentEdgePortsCandidateProvider
Protected Methods
 MethodDefined By
  
Creates a candidate from the given existing port instance.
CurrentEdgePortsCandidateProvider
Property Detail
edgeproperty
edge:IEdge  [read-only]

The edge to return candidates for.


Implementation
    protected function get edge():IEdge
Constructor Detail
CurrentEdgePortsCandidateProvider()Constructor
public function CurrentEdgePortsCandidateProvider(edge:IEdge)

Creates a new instance.

Parameters
edge:IEdge — The edge to get the port candidates for.
Method Detail
createCandidate()method
protected function createCandidate(context:IInputModeContext, port:IPort):DefaultPortCandidate

Creates a candidate from the given existing port instance.

Parameters

context:IInputModeContext — The context.
 
port:IPort — The port to create a candidate for.

Returns
DefaultPortCandidate — A candidate for the given port.
getSourcePortCandidates()method 
public function getSourcePortCandidates(context:IInputModeContext):Iterable

Returns all source port candidates that may be used for the edge.

The iterable may contain valid, invalid and dynamic port candidates.

Parameters

context:IInputModeContext — The context for which the candidates should be provided.

Returns
Iterable — An iterable over all source port candidates that are associated with the current context edge.
getTargetPortCandidates()method 
public function getTargetPortCandidates(context:IInputModeContext):Iterable

Returns all target port candidates that may be used for the edge.

The iterable may contain valid, invalid and dynamic port candidates.

Parameters

context:IInputModeContext — The context for which the candidates should be provided.

Returns
Iterable — An iterable over all target port candidates that are associated with the current context edge.