Package | com.yworks.canvas.input |
Class | public class AbstractConcurrentInputMode |
Inheritance | AbstractConcurrentInputMode AbstractInputMode flash.events.EventDispatcher |
Implements | IConcurrentInputMode |
Subclasses | ContextMenuInputMode, DropInputMode, KeyboardInputMode, MouseHoverInputMode, MultiplexingInputMode, StateMachineInputMode, TextEditorInputMode |
IInputMode
that can be used
concurrently with other IConcurrentInputMode
implementations.
Property | Defined By | ||
---|---|---|---|
canvas : CanvasComponent [read-only]
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 [read-only]
The context instance this mode is currently installed in or
null if this instance is not installed. | AbstractInputMode | ||
installed : Boolean [read-only]
Whether this mode is currently installed, i.e
if a call to the canvas property will yield a non-null result. | AbstractInputMode | ||
preferredCursor : Cursor
Gets or sets the cursor this mode would like to have displayed in the CanvasComponent. | AbstractConcurrentInputMode |
Method | Defined By | ||
---|---|---|---|
cancel():void [override]
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 [override]
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 | ||
fireInstalled():void | AbstractInputMode | ||
fireInstalling():void | AbstractInputMode | ||
fireUninstalled():void | AbstractInputMode | ||
fireUninstalling():void | AbstractInputMode | ||
hasMutex():Boolean
Determines whether this instance owns the input mutex. | AbstractConcurrentInputMode | ||
initialize():void
Performs one-time initialization of this instance. | AbstractInputMode | ||
installCore(context:IInputModeContext):void
The implementation of the install() method: installs this mode into
the canvas of the given context. | 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 | ||
uninstallCore(context:IInputModeContext):void
Implementation of uninstall: Uninstalls this mode from the canvas. | AbstractInputMode |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched after the input mode was installed. | AbstractInputMode | |||
Dispatched before the input mode will be installed. | AbstractInputMode | |||
Dispatched when the default cursor changed. | AbstractConcurrentInputMode | |||
Dispatched after the input mode was uninstalled. | AbstractInputMode | |||
Dispatched before the input mode will be uninstalled. | AbstractInputMode |
Constant | Defined By | ||
---|---|---|---|
INSTALLED : String = installed [static]
| AbstractInputMode | ||
INSTALLING : String = installing [static]
| AbstractInputMode | ||
PREFERRED_CURSOR_CHANGED : String = preferredCursorChanged [static] | AbstractConcurrentInputMode | ||
UNINSTALLED : String = uninstalled [static]
| AbstractInputMode | ||
UNINSTALLING : String = uninstalling [static]
| AbstractInputMode |
controller | property |
controller:ConcurrencyController
Gets or injects the ConcurrencyController
for this instance.
public function get controller():ConcurrencyController
public function set controller(value:ConcurrencyController):void
enabled | property |
enabled:Boolean
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
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 |
override public function cancel():void
Releases 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():Boolean
Determines 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.
Parameters
oldValue:Cursor | |
newValue:Cursor |
releaseMutex | () | method |
protected function releaseMutex():void
Releases 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.
Error — If the mutex could not be obtained.
|
stop | () | method |
override public function stop():Boolean
Returns 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 |
mx.events.PropertyChangeEvent
com.yworks.canvas.input.AbstractConcurrentInputMode.PREFERRED_CURSOR_CHANGED
Dispatched when the default cursor changed.
PREFERRED_CURSOR_CHANGED | Constant |
public static const PREFERRED_CURSOR_CHANGED:String = preferredCursorChanged