| Package | com.yworks.canvas.input |
| Class | public class AbstractInputMode |
| Inheritance | AbstractInputMode flash.events.EventDispatcher |
| Implements | IInputMode |
| Subclasses | AbstractConcurrentInputMode, MagnifierInputMode, OverviewInputMode |
IInputMode.
| Property | Defined By | ||
|---|---|---|---|
| canvas : CanvasComponent [read-only]
The canvas instance this mode is currently installed in or null
| AbstractInputMode | ||
| 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 | ||
| Method | Defined By | ||
|---|---|---|---|
cancel():void
Cancels the editing of this mode. | AbstractInputMode | ||
dispose():void
Disposes this input mode. | AbstractInputMode | ||
install(context:IInputModeContext):void
Installs this mode into the canvas of the given context. | AbstractInputMode | ||
stop():Boolean
Tries to stop the editing. | AbstractInputMode | ||
uninstall(context:IInputModeContext):void
Uninstalls this mode from the canvas. | AbstractInputMode | ||
| Method | Defined By | ||
|---|---|---|---|
fireInstalled():void | AbstractInputMode | ||
fireInstalling():void | AbstractInputMode | ||
fireUninstalled():void | AbstractInputMode | ||
fireUninstalling():void | AbstractInputMode | ||
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 | ||
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 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 | ||
| UNINSTALLED : String = uninstalled [static]
| AbstractInputMode | ||
| UNINSTALLING : String = uninstalling [static]
| AbstractInputMode | ||
| canvas | property |
canvas:CanvasComponent [read-only]
The canvas instance this mode is currently installed in or null
public function get canvas():CanvasComponent| inputModeContext | property |
inputModeContext:IInputModeContext [read-only]
The context instance this mode is currently installed in or
null if this instance is not installed.
public function get inputModeContext():IInputModeContext| installed | property |
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.
public function get installed():Boolean| cancel | () | method |
public function cancel():void
Cancels the editing of this mode. This implementation does nothing.
Classes that need to perform clean-up should override this method
and invoke super.cancel as the last statement.
| dispose | () | method |
public function dispose():voidDisposes this input mode.
Subclasses should remove all listeners that they have registered.
| fireInstalled | () | method |
protected function fireInstalled():void| fireInstalling | () | method |
protected function fireInstalling():void| fireUninstalled | () | method |
protected function fireUninstalled():void| fireUninstalling | () | method |
protected function fireUninstalling():void| initialize | () | method |
protected function initialize():voidPerforms one-time initialization of this instance. This method should not be invoked by subclasses. This will be done automatically upon first installment of this mode.
This code will be executed only once. The canvas property
will yield null when this code is executed. This method not should
be used to install this mode into a specific canvas.
Subclasses should always call super.initialize() first.
| install | () | method |
public final function install(context:IInputModeContext):voidInstalls this mode into the canvas of the given context.
This method is final. Subclasses should override the method
installCore() instead.
This method fires an INSTALLING event, calls installCore(),
then fires INSTALLED
Parameters
context:IInputModeContext — The context to use for installation.
|
ArgumentError — ArgumentError: if the given context is
null or the input mode is already installed.
|
| installCore | () | method |
protected function installCore(context:IInputModeContext):void
The implementation of the install() method: installs this mode into
the canvas of the given context.
Subclasses should override this method and call super.installCore(context), first.
One-time initialization should be performed in the initialize method.
The install method will call the initialize method the first
time this mode gets installed.
Parameters
context:IInputModeContext — The context to use for installation.
|
| invalidate | () | method |
protected function invalidate():voidConvenience method for subclass implementations that invalidates the canvasComponent this mode is currently installed in.
| stop | () | method |
public function stop():Boolean
Tries to stop the editing. This implementation always return true.
Subclasses that want to prevent a stop or need to do special clean up
should do this here if super.stop() returns true.
A typical implementation should follow this idiom if it wants to stop:
if( super.stop() ) {
//do cleanup
return true;
} else {
return false;
}
Boolean |
| uninstall | () | method |
public final function uninstall(context:IInputModeContext):voidUninstalls this mode from the canvas.
This method is final. Subclasses should override uninstallCore instead.
This method fires an UNINSTALLING event, calls uninstallCore(),
then fires UNINSTALLED
Parameters
context:IInputModeContext — The context to remove this mode from. This is the same instance that
has been passed to install( IInputModeContext ).
|
ArgumentError — ArgumentError: if the given context is
different from the context this mode is installed on.
|
| uninstallCore | () | method |
protected function uninstallCore(context:IInputModeContext):void
Implementation of uninstall: Uninstalls this mode from the canvas.
Subclasses should always call super.uninstallCore( context ) as the last
statement.
Parameters
context:IInputModeContext — The context to remove this mode from. This is the same instance that
has been passed to install( IInputModeContext ).
|
| installed | Event |
flash.events.Eventcom.yworks.canvas.input.INSTALLEDDispatched after the input mode was installed.
| installing | Event |
flash.events.Eventcom.yworks.canvas.input.INSTALLINGDispatched before the input mode will be installed.
Event handlers for this event can be used to configure the input mode before it is installed.
| uninstalled | Event |
flash.events.Eventcom.yworks.canvas.input.UNINSTALLEDDispatched after the input mode was uninstalled.
| uninstalling | Event |
flash.events.Eventcom.yworks.canvas.input.UNINSTALLINGDispatched before the input mode will be uninstalled.
| INSTALLED | Constant |
public static const INSTALLED:String = installed
| INSTALLING | Constant |
public static const INSTALLING:String = installing
| UNINSTALLED | Constant |
public static const UNINSTALLED:String = uninstalled
| UNINSTALLING | Constant |
public static const UNINSTALLING:String = uninstalling