| Package | com.yworks.canvas.input |
| Class | public class AbstractConcurrentInputMode |
| Inheritance | AbstractConcurrentInputMode AbstractInputMode flash.events.EventDispatcher |
| Implements | IConcurrentInputMode |
| Subclasses | ContextMenuInputMode, KeyboardInputMode, MouseHoverInputMode, StateMachineInputMode, TextEditorInputMode |
IInputMode that can be used
concurrently with other IConcurrentInputMode implementations.
| Property | Defined by | ||
|---|---|---|---|
![]() | canvas : CanvasComponent
The canvas instance this mode is currently installed in or
null
| AbstractInputMode | |
| controller : ConcurrencyController
Gets or injects the
ConcurrencyController for this instance. | AbstractConcurrentInputMode | ||
| enabled : Boolean
Gets or sets the enabled state of this input mode.
| AbstractConcurrentInputMode | ||
![]() | inputModeContext : IInputModeContext
The context instance this mode is currently installed in or
null if this instance is not installed. | AbstractInputMode | |
![]() | installed : Boolean
Whether this mode is currently installed, i.e.
| AbstractInputMode | |
| preferredCursor : Cursor
Gets or sets the cursor this mode would like to have displayed in the
CanvasComponent. | AbstractConcurrentInputMode | ||
| Method | Defined by | ||
|---|---|---|---|
|
cancel():void
Releases the mutex if this input mode currently
owns the mutex.
| AbstractConcurrentInputMode | ||
![]() |
dispose():void
Disposes this input mode.
| AbstractInputMode | |
![]() |
install(context:IInputModeContext):void
Installs this mode into the canvas of the given context.
| AbstractInputMode | |
|
stop():Boolean
Returns true if this input mode doesn't own
the mutex.
| AbstractConcurrentInputMode | ||
![]() |
uninstall(context:IInputModeContext):void
Uninstalls this mode from the canvas.
| AbstractInputMode | |
| Method | Defined by | ||
|---|---|---|---|
|
canRequestMutex():Boolean
Determines whether this instance can request the
InputMutex. | AbstractConcurrentInputMode | ||
|
hasMutex():Boolean
Determines whether this instance owns the input mutex.
| AbstractConcurrentInputMode | ||
![]() |
initialize():void
Performs one-time initialization of this instance.
| AbstractInputMode | |
![]() |
invalidate():void
Convenience method for subclass implementations that invalidates
the canvasComponent this mode is currently installed in.
| AbstractInputMode | |
|
onDisabled():void
Called when the
enabled property changes to false. | AbstractConcurrentInputMode | ||
|
onEnabled():void
Called when the
enabled property changes to true. | AbstractConcurrentInputMode | ||
|
onMutexObtained():void
Called when this instance obtains the
InputMutex. | AbstractConcurrentInputMode | ||
|
onMutexReleased():void
Called when this instance released the
InputMutex. | AbstractConcurrentInputMode | ||
|
Called when the
preferredCursor property changes. | AbstractConcurrentInputMode | ||
|
releaseMutex():void
Releases the mutex that is currently owned by this instance.
| AbstractConcurrentInputMode | ||
|
requestMutex():void
Requests the
InputMutex from the current controller. | AbstractConcurrentInputMode | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when the default cursor changed. | AbstractConcurrentInputMode | |||
| Constant | Defined by | ||
|---|---|---|---|
| PREFERRED_CURSOR_CHANGED : String = "preferredCursorChanged" [static]
| AbstractConcurrentInputMode | ||
| controller | property |
controller:ConcurrencyController [read-write]
Gets or injects the ConcurrencyController for this instance.
public function get controller():ConcurrencyController
public function set controller(value:ConcurrencyController):void
| enabled | property |
enabled:Boolean [read-write]Gets or sets the enabled state of this input mode.
The controller will disable this mode if another mode acquires the input mutex.
Also clients can use this property to disable or reenable this instance.
A disabled instance should never try to acquire the input mutex.
This will call the onEnabled or onDisabled
methods respectively. A disabled mode cannot be enabled if another
mode currently owns the input mutex.
public function get enabled():Boolean
public function set enabled(value:Boolean):void
| preferredCursor | property |
preferredCursor:Cursor [read-write]
Gets or sets the cursor this mode would like to have displayed in the CanvasComponent.
To indicate that this mode does not have any preferences implementations should
return null.
This will trigger the onPreferredCursorChanged method.
public function get preferredCursor():Cursor
public function set preferredCursor(value:Cursor):void
| cancel | () | method |
public override function cancel():voidReleases the mutex if this input mode currently owns the mutex.
See also
| canRequestMutex | () | method |
protected function canRequestMutex():Boolean
Determines whether this instance can request the InputMutex.
This will return true, iff the no controller has been injected or
the controller allows requesting the mutex.
Boolean — Whether a call to requestMutex would currently succeed.
|
| hasMutex | () | method |
protected function hasMutex():BooleanDetermines whether this instance owns the input mutex.
If no controller had been associated with this instance upon the call
to requestMutex this method will return true, too.
Boolean — true if no controller is associated with this instance
|
| onDisabled | () | method |
protected function onDisabled():void
Called when the enabled property changes to false.
This implementation sets the preferredCursor property to null.
| onEnabled | () | method |
protected function onEnabled():void
Called when the enabled property changes to true.
| onMutexObtained | () | method |
protected function onMutexObtained():void
Called when this instance obtains the InputMutex.
If no controller had been associated with this instance upon the call
to requestMutex this method will be called, too.
| onMutexReleased | () | method |
protected function onMutexReleased():void
Called when this instance released the InputMutex.
If no controller had been associated with this instance upon the call
to requestMutex this method will be called, too.
| onPreferredCursorChanged | () | method |
protected function onPreferredCursorChanged(oldValue:Cursor, newValue:Cursor):void
Called when the preferredCursor property changes.
oldValue:Cursor |
|
newValue:Cursor |
| releaseMutex | () | method |
protected function releaseMutex():voidReleases the mutex that is currently owned by this instance.
This will trigger the onMutexReleased method if this
instance previously owned the mutex.
| requestMutex | () | method |
protected function requestMutex():void
Requests the InputMutex from the current controller.
This implementation will call the OnMutexObtained method if the mutex has
been successfully obtained or if there is no controller associated
with this mode currently.
If the mutex cannot be obtained this method will trigger an Error.
— If the mutex could not be obtained.
|
| stop | () | method |
public override function stop():BooleanReturns true if this input mode doesn't own the mutex.
ReturnsBoolean — true iff this mode doesn't own the mutex and
super.stop() returns true.
|
See also
| preferredCursorChanged | event |
| PREFERRED_CURSOR_CHANGED | constant |
public static const PREFERRED_CURSOR_CHANGED:String = "preferredCursorChanged"