Package | com.yworks.canvas.input |
Class | public class SimpleInputModeContext |
Inheritance | SimpleInputModeContext Object |
Implements | IInputModeContext |
IInputModeContext
.
Property | Defined By | ||
---|---|---|---|
canvasComponent : CanvasComponent [read-only]
Yields the CanvasComponent on which the mode currently acts. | SimpleInputModeContext | ||
parentInputMode : IInputMode [read-only]
Yields the IInputMode which issued the context object. | SimpleInputModeContext |
Method | Defined By | ||
---|---|---|---|
Main constructor that initializes the state of this instance. | SimpleInputModeContext | ||
[static]
Factory method that creates a context that uses the provided parent mode
to retrieve the various values from. | SimpleInputModeContext | ||
[static]
Factory method that creates a context that uses the provided parent mode and lookup decoration callback. | SimpleInputModeContext | ||
[static]
Factory method that creates a context that uses the provided parent mode, parent context, and lookup decoration callback. | SimpleInputModeContext | ||
create4(parent:IInputMode, parentContext:IInputModeContext, lookupCallback:Function):IInputModeContext [static]
Factory method that creates a context that uses the provided parent mode, parent context, and lookup decoration callback. | SimpleInputModeContext | ||
lookup(type:Class):Object
Returns an instance that implements the given type or null. | SimpleInputModeContext |
Constant | Defined By | ||
---|---|---|---|
EMPTY : IInputModeContext [static]
An empty context where both the inputmode and the canvas is null. | SimpleInputModeContext |
canvasComponent | property |
canvasComponent:CanvasComponent
[read-only]
Yields the CanvasComponent
on which the mode currently acts.
This can be null
if the mode is used outside the context of a CanvasControl
.
public function get canvasComponent():CanvasComponent
parentInputMode | property |
parentInputMode:IInputMode
[read-only]
Yields the IInputMode
which issued the context object.
This can be null
if the mode is used outside the context of an IInputMode
.
public function get parentInputMode():IInputMode
SimpleInputModeContext | () | Constructor |
public function SimpleInputModeContext(canvasComponent:CanvasComponent, mode:IInputMode, lookup:ILookup)
Main constructor that initializes the state of this instance.
ParameterscanvasComponent:CanvasComponent — The control to use, may not be null .
| |
mode:IInputMode — The mode to set as the parent. This may be null for the canvas' context.
| |
lookup:ILookup — The lookup to use.
|
create1 | () | method |
public static function create1(parent:AbstractInputMode, lookup:ILookup = null):IInputModeContext
Factory method that creates a context that uses the provided parent mode to retrieve the various values from. If a lookup is passed, it is used as a lookup decoration.
Parameters
parent:AbstractInputMode | |
lookup:ILookup (default = null )
|
IInputModeContext |
create2 | () | method |
public static function create2(parent:AbstractInputMode, lookupCallback:Function):IInputModeContext
Factory method that creates a context that uses the provided parent mode and lookup decoration callback.
Parameters
parent:AbstractInputMode | |
lookupCallback:Function |
IInputModeContext |
create3 | () | method |
public static function create3(parent:IInputMode, parentContext:IInputModeContext, lookup:ILookup):IInputModeContext
Factory method that creates a context that uses the provided parent mode, parent context, and lookup decoration callback.
Parameters
parent:IInputMode | |
parentContext:IInputModeContext | |
lookup:ILookup |
IInputModeContext |
create4 | () | method |
public static function create4(parent:IInputMode, parentContext:IInputModeContext, lookupCallback:Function):IInputModeContext
Factory method that creates a context that uses the provided parent mode, parent context, and lookup decoration callback.
Parameters
parent:IInputMode | |
parentContext:IInputModeContext | |
lookupCallback:Function |
IInputModeContext |
lookup | () | method |
public function lookup(type:Class):Object
Returns an instance that implements the given type or null
.
Typically, this method will be called in order to obtain a different view or
aspect of the current instance. This is quite similar to casting or using
a super type or interface of this instance, but is not limited to inheritance or
compile time constraints. An instance implementing this method is not
required to return non-null
implementations for the types, nor does it
have to return the same instance any time. Also it depends on the
type and context whether the instance returned stays up to date or needs to
be reobtained for subsequent use.
Parameters
type:Class — the type for which an instance shall be returned
|
Object — an instance that is assignable to type or null
|
EMPTY | Constant |
public static const EMPTY:IInputModeContext
An empty context where both the inputmode and the canvas is null. The lookup always yields null, also.