Packagecom.yworks.graph.model
Classpublic class DefaultEdgePortsCandidateProvider
InheritanceDefaultEdgePortsCandidateProvider Inheritance CurrentEdgePortsCandidateProvider Inheritance Object

An implementation of the IEdgePortCandidateProvider interface that returns the candidates provided by the source and target node's IPortCandidateProvider implementations or the existing edge's port, if no such provider is registered.

This implementation uses the lookup mechanism of the nodes to query the providers.



Protected Properties
 PropertyDefined By
 Inheritededge : IEdge
[read-only] The edge to return candidates for.
CurrentEdgePortsCandidateProvider
Public Methods
 MethodDefined By
  
DefaultEdgePortsCandidateProvider
  
[override] Returns all source port candidates that may be used for the edge.
DefaultEdgePortsCandidateProvider
  
[override] Returns all target port candidates that may be used for the edge.
DefaultEdgePortsCandidateProvider
Protected Methods
 MethodDefined By
 Inherited
Creates a candidate from the given existing port instance.
CurrentEdgePortsCandidateProvider
Constructor Detail
DefaultEdgePortsCandidateProvider()Constructor
public function DefaultEdgePortsCandidateProvider(edge:IEdge)



Parameters
edge:IEdge
Method Detail
getSourcePortCandidates()method
override 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 
override 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.