Packagecom.yworks.graph.model
Interfacepublic interface IPortCandidateProvider
Implementors AbstractPortCandidateProvider, CompositePortCandidateProvider, EmptyPortsCandidateProvider

This interface can be used to query IPortCandidates for a specific IPortOwner with respect to a given opposite IPortCandidate or IEdge.

Implementations of this interface may be queried using the lookup method of IPortOwner implementations like INode.



Public Methods
 MethodDefined By
  
Returns the source port candidates for the current node which apply for the provided (opposite) target port candidate.
IPortCandidateProvider
  
Returns the target port candidates for the current node which apply for the provided (opposite) source port candidate.
IPortCandidateProvider
  
Returns all port candidates the provided edge's source side can connect to.
IPortCandidateProvider
  
Returns all port candidates the provided edge's target side can connect to.
IPortCandidateProvider
  
Returns all source port candidates that belong to the context of this provider.
IPortCandidateProvider
  
Returns all target port candidates that belong to the context of this provider.
IPortCandidateProvider
Method Detail
getCandidateSourcePortCandidates()method
public function getCandidateSourcePortCandidates(context:IInputModeContext, target:IPortCandidate):Iterable

Returns the source port candidates for the current node which apply for the provided (opposite) target port candidate.

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

This method is currently not queried by library classes.

Parameters

context:IInputModeContext — The context for which the candidates should be provided.
 
target:IPortCandidate — The opposite port candidate.

Returns
Iterable — An Iterable over all port candidates that are associated with the given opposite port.

See also

getCandidateTargetPortCandidates()method 
public function getCandidateTargetPortCandidates(context:IInputModeContext, source:IPortCandidate):Iterable

Returns the target port candidates for the current node which apply for the provided (opposite) source port candidate.

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

This method is used during edge creation to collect possible target locations.

Parameters

context:IInputModeContext — The context for which the candidates should be provided.
 
source:IPortCandidate — The opposite port candidate.

Returns
Iterable — An Iterable over all port candidates that are associated with the given opposite port.
getEdgeSourcePortCandidates()method 
public function getEdgeSourcePortCandidates(context:IInputModeContext, edge:IEdge):Iterable

Returns all port candidates the provided edge's source side can connect to.

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

This method is used during relocation of the source side of an existing edge to collect possible locations at the current source node. Note that if using the AllCandidatesEdgePortCandidateProvider for edge relocation, getGraphSourcePortCandidates is used instead of this method to return possible source locations.

Parameters

context:IInputModeContext — The context for which the candidates should be provided.
 
edge:IEdge — The edge for which source port candidates are sought.

Returns
Iterable — An Iterable over all port candidates that are associated with the given edge.

See also

getEdgeTargetPortCandidates()method 
public function getEdgeTargetPortCandidates(context:IInputModeContext, edge:IEdge):Iterable

Returns all port candidates the provided edge's target side can connect to.

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

This method is used during relocation of the target side of an existing edge to collect possible locations at the current target node. Note that if using the AllCandidatesEdgePortCandidateProvider for edge relocation, getGraphTargetPortCandidates is used instead of this method to return possible target locations.

Parameters

context:IInputModeContext — The context for which the candidates should be provided.
 
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.

See also

getGraphSourcePortCandidates()method 
public function getGraphSourcePortCandidates(context:IInputModeContext):Iterable

Returns all source port candidates that belong to the context of this provider.

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

This method is used during edge creation to collect possible start points. In addition if using the AllCandidatesEdgePortCandidateProvider for edge relocation, this method is used instead of getEdgeSourcePortCandidates to return possible source and target locations.

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.

See also

getGraphTargetPortCandidates()method 
public function getGraphTargetPortCandidates(context:IInputModeContext):Iterable

Returns all target port candidates that belong to the context of this provider.

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

This method is not used per default. Note however that if using the AllCandidatesEdgePortCandidateProvider for edge relocation, this method is used instead of getEdgeTargetPortCandidates to return possible target locations.

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.

See also