C

PortCandidateProviderBase
abstract

An abstract base implementation of the IPortCandidateProvider interface.
ImplementsInheritance Hierarchy

Members

Show:

Properties

Gets or sets the style to use for the creation of the port in createInstance.
A value of null will make the implementation use the corresponding current default port style.
final
Gets or sets the tag to assign to the port in createInstance
final

Methods

Adds candidates for all existing ports of the owner to the provided list.
protected

Parameters

owner: IPortOwner
The port owner whose ports should be added.
list: IList<IPortCandidate>
The list to add candidates for existing ports to.

See Also

Developer's Guide
Factory method that creates a candidate that will use the createInstance method of this instance to delegate createPort queries to.
protectedfinal

Parameters

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.

Return Value

PortCandidate
A candidate whose createPort method delegates to this instance's createInstance.

See Also

Developer's Guide
Callback method used by the ports created using the factory methods createCandidate.
This method can be overridden by subclasses to perform more sophisticated port creation logic.
protected

Parameters

context: IInputModeContext
The context in which the instance is created.
candidate: PortCandidate
The candidate to create a port for.

Return Value

IPort
The new port.
Returns all source port candidates that belong to the context of this provider.
The enumerable may contain valid, invalid, and dynamic port candidates.
This implementation simply delegates to getPortCandidates.

Parameters

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

Return Value

IEnumerable<IPortCandidate>
An enumerable over all source port candidates that are associated with the current context.
Returns all target port candidates that belong to the context of this provider.
The enumerable may contain valid, invalid, and dynamic port candidates.
This implementation simply delegates to getPortCandidates.

Parameters

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

Return Value

IEnumerable<IPortCandidate>
An enumerable over all target port candidates that are associated with the current context.
Callback method used by the ports created using the factory methods createCandidate.
This method can be overridden by subclasses to perform more sophisticated candidate creation logic.
protected

Parameters

context: IInputModeContext
The context in which the instance is created.
candidate: PortCandidate
The candidate to create a port for.
suggestedLocation: Point
The location to get a candidate for.

Return Value

IPortCandidate
The new candidate whose validity may not be DYNAMIC.
Creates an enumeration of possibly port candidates.
This method is used as a callback by most of the getter methods in this class. Subclasses should override this method to provide the same candidates for all use-cases.
protectedabstract

Parameters

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

Return Value

IEnumerable<IPortCandidate>
An enumerable collection of port candidates.

See Also

Developer's Guide
Returns all port candidates that apply for the provided opposite port candidate.
The enumerable may contain valid, invalid, and dynamic port candidates.
This implementation simply delegates to getPortCandidates.

Parameters

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

Return Value

IEnumerable<IPortCandidate>
An enumerable over all port candidates that are associated with the given opposite port.
Returns all port candidates that apply for the provided opposite port candidate.
The enumerable may contain valid, invalid, and dynamic port candidates.
This implementation simply delegates to getPortCandidates.

Parameters

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

Return Value

IEnumerable<IPortCandidate>
An enumerable over all port candidates that are associated with the given opposite port.