C

ConcurrencyController

A controller class that manages a single IInputMode implementation.
Inheritance Hierarchy

Remarks

The controller will be passed to its associated IInputMode in the input mode's install method. The associated mode can request an input mutex to deactivate other modes added to the same MultiplexingInputMode and using exclusive controllers. Releasing the mutex will reactivate the controller of other modes.

See Also

API

IInputMode, MultiplexingInputMode

Members

No filters for this type

Constructors

Creates an instance that can be used to install the given mode.
The returned ConcurrencyController is not synchronized with any other one so the mode will effectively run in a non-exclusive mode.

Parameters

mode: IInputMode
The mode, the ConcurrencyController shall be created for.

Properties

Gets if this controller is active.

An IInputMode should only handle events and gestures if this property on its associated ConcurrencyController is set to true.

If this controller is set as non-exclusive by its input mode it is active iff it is enabled. Otherwise, it has to be enabled and no other input mode may have the input mutex.

readonlyfinal

Property Value

true if the associated input mode should handle events and gestures.

See Also

API
active-changed
Gets or sets if this controller is enabled.

The default state is disabled. A disabled controller is always inactive.

When the controller is installed and the input mode is ready for editing, it has to set this property to true if it wants to use the input mutex.

final

See Also

API
active, active-changed
Gets or sets a value indicating whether this controller will be the only one running when it has the mutex.

If this controller is marked as exclusive and has the mutex, all controllers of other modes added to the same MultiplexingInputMode will be deactivated. Otherwise, it will always run concurrently with all other controllers.

Changing this property will temporarily disable the controller.

final
Gets the current owner of the input mutex or null if no mode currently owns the mutex.
readonlyfinal
Gets or sets the cursor the associated mode of this controller would like to have displayed in the CanvasComponent.
To indicate that the mode does not have any preferences, the property should be set to null.
conversionfinal

See Also

Developer's Guide

Methods

Determines if the mutex can be successfully requested currently.
This will return true, iff this instance is active and doesn't hold the mutex.
final

Return Value

boolean
Whether a call to requestMutex would currently succeed.
Determines whether this instance owns the input mutex.
The instance owns the input mutex if it has successfully requested the mutex in the past and not yet released it.
final

Return Value

boolean
Whether this instance has the input mutex.
Triggers a priority-changed event with EMPTY.
This method should be called by the associated mode if its priority has changed.
final
Releases the input mutex.
Modes should call this method when they have finished editing the contents exclusively. This will reactivate those modes whose controller that had been deactivated at the time the mutex has been requested.
final
Can be called to request an input mutex for the input mode.
Modes should call this method to request exclusive editing for a canvas control. canRequestMutex should be called before requesting the mutex. If the mutex cannot be obtained, this method will trigger an exception.
final

Throws

Exception ({ name: 'Error' })
If the mutex could not be obtained.

Events

Occurs the active property changes.
This event is invoked with EMPTY per default.

Properties of

EventArgs
Occurs when the mutex has been successfully obtained.
This event is invoked with EMPTY per default.

Properties of

EventArgs
Occurs when the mutex has been released.
This event is invoked with EMPTY per default.

Properties of

EventArgs
Occurs when the preferredCursor property changes.
MultiplexingInputMode listens to property changes of the controller of its sub modes. properties. This event is invoked with EMPTY per default.

Properties of

EventArgs
Occurs when onPriorityChanged is called by the associated mode.
MultiplexingInputMode listens to priority changes of the controller of its sub modes.

Properties of

EventArgs