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

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
The edge to return candidates for.
CurrentEdgePortsCandidateProvider
Public Methods
 MethodDefined by
  
DefaultEdgePortsCandidateProvider
  
Returns all source port candidates that may be used for the edge.
DefaultEdgePortsCandidateProvider
  
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
public override function getSourcePortCandidates(context:IInputModeContext, graph:IGraph):Iterable

Returns all source port candidates that may be used for the 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.

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

Returns all target port candidates that may be used for the 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.

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