An abstract base implementation of the IPortCandidateProvider interface.
Type Details
- yfiles module
- view-editor
- yfiles-umd modules
- view-editor, view-table, view
- Legacy UMD name
- yfiles.input.PortCandidateProviderBase
See Also
Properties
Gets or sets the style to use for the creation of the port in createInstance.
Remarks
null
will make the implementation use the corresponding current default port style.Gets or sets the tag to assign to the port in createInstance
Methods
Adds candidates for all existing ports of the owner
to the provided list.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The port owner whose ports should be added.
- list - IList<IPortCandidate>
- The list to add candidates for existing ports to.
See Also
createCandidate
(owner: IPortOwner, locationParameter: IPortLocationModelParameter, valid?: boolean) : DefaultPortCandidateFactory method that creates a candidate that will use the createInstance method of this instance to delegate createPort queries to.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The owner to use for the candidate.
- locationParameter - IPortLocationModelParameter
- The location of the candidate. This instance is assigned by reference to the candidate.
- valid - boolean
- Whether the port should be VALID.
Returns
- ↪DefaultPortCandidate
- A candidate whose createPort method delegates to this instance's createInstance.
See Also
Callback method used by the ports created using the factory methods createCandidate.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context in which the instance is created.
- candidate - DefaultPortCandidate
- The candidate to create a port for.
Returns
- ↪IPort
- The new port.
Returns all source port candidates that belong to the context of this provider.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the candidates should be provided.
Returns
- ↪IEnumerable<IPortCandidate>
- An enumerable over all source port candidates that are associated with the current context.
See Also
Implements
Returns all target port candidates that belong to the context of this provider.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the candidates should be provided.
Returns
- ↪IEnumerable<IPortCandidate>
- An enumerable over all target port candidates that are associated with the current context.
See Also
Implements
getPortCandidateAt
(context: IInputModeContext, candidate: DefaultPortCandidate, suggestedLocation: Point) : IPortCandidateCallback method used by the ports created using the factory methods createCandidate.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context in which the instance is created.
- candidate - DefaultPortCandidate
- The candidate to create a port for.
- suggestedLocation - Point
- The location to get a candidate for.
Returns
Creates an enumeration of possibly port candidates.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the candidates should be provided.
Returns
- ↪IEnumerable<IPortCandidate>
- An enumerable collection of port candidates.
See Also
getSourcePortCandidates
(context: IInputModeContext, target: IPortCandidate) : IEnumerable<IPortCandidate>Returns all port candidates that apply for the provided opposite port candidate.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the candidates should be provided.
- target - IPortCandidate
- The opposite port candidate.
Returns
- ↪IEnumerable<IPortCandidate>
- An enumerable over all port candidates that are associated with the given opposite port.
See Also
Implements
getTargetPortCandidates
(context: IInputModeContext, source: IPortCandidate) : IEnumerable<IPortCandidate>Returns all port candidates that apply for the provided opposite port candidate.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context for which the candidates should be provided.
- source - IPortCandidate
- The opposite port candidate.
Returns
- ↪IEnumerable<IPortCandidate>
- An enumerable over all port candidates that are associated with the given opposite port.