| Package | com.yworks.canvas.input |
| Class | public class AbstractInputMode |
| Inheritance | AbstractInputMode flash.events.EventDispatcher |
| Implements | IInputMode |
| Subclasses | AbstractConcurrentInputMode, MultiplexingInputMode, 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.
| 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 | ||
|---|---|---|---|
|
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 | ||
| 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.
| 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 function install(context:IInputModeContext):voidInstalls this mode into the canvas of the given context.
Subclasses should override this method and call super.install(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.
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 function uninstall(context:IInputModeContext):voidUninstalls this mode from the canvas.
Subclasses should always call super.uninstall( context ) as the last
statement.
context:IInputModeContext — The context to remove this mode from. This is the same instance that has been
passed to install( IInputModeContext ).
|