| Package | com.yworks.canvas.input |
| Class | public class MainInputMode |
| Inheritance | MainInputMode MultiplexingInputMode AbstractConcurrentInputMode AbstractInputMode flash.events.EventDispatcher |
| Implements | mx.core.IMXMLObject |
| Subclasses | GraphEditorInputMode |
Actionscript:
var mim:MainInputMode = new MainInputMode();
graphCanvasComponent.inputMode = mim;
Hide MXML SyntaxmoveInputMode property) should be done in
an event handler for the installing event. This event will be fired
before the input mode is installed.
Note that the properties canvas, collectionModel, and
selectionModel are only valid after this input mode is installed.
Initialization operations depending on these properties (e.g. adding an
event listener to the selectionModel) should be done in a
listener for the installed event, which is fired immediately after the
input mode is installed.
| Property | Defined By | ||
|---|---|---|---|
| bridgeUpdateMode : BridgeUpdateMode
Determines how bridges shall be rendered during a move or drag. | MainInputMode | ||
![]() | canvas : CanvasComponent [read-only]
The canvas instance this mode is currently installed in or null
| AbstractInputMode | |
| clickInputMode : ClickInputMode
The ClickInputMode property. | MainInputMode | ||
| clickModeEnabled : Boolean
Whether the click input mode is enabled. | MainInputMode | ||
| clickModePriority : int
The click mode priority. | MainInputMode | ||
| collectionModel : ICollectionModel
Gets or sets the ICollectionModel of the IModelItem
that make up the elements in the view this mode is acting upon. | MainInputMode | ||
| contextMenuInputMode : ContextMenuInputMode
The contextMenuInputMode property. | MainInputMode | ||
| contextMenuModeEnabled : Boolean
Whether the context menu input mode is enabled. | MainInputMode | ||
| contextMenuModePriority : int
The context menu mode priority. | MainInputMode | ||
![]() | controller : ConcurrencyController
Gets or injects the ConcurrencyController for this instance. | AbstractConcurrentInputMode | |
![]() | defaultCursor : Cursor
The default cursor which is displayed if the active input mode
does not have a preferred cursor. | MultiplexingInputMode | |
![]() | enabled : Boolean
Gets or sets the enabled state of this input mode. | AbstractConcurrentInputMode | |
| handleInputMode : HandleInputMode
The HandleInputMode property. | MainInputMode | ||
| handleModeEnabled : Boolean
Whether the handle input mode is enabled. | MainInputMode | ||
| handleModePriority : int
The handle mode priority. | MainInputMode | ||
| inputModeCanvasGroup : ICanvasObjectGroup
The canvas group that can be used by input modes to add temporary top-level
canvas objects to. | MainInputMode | ||
![]() | 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 | |
| keyboardInputMode : KeyboardInputMode
The keyboard input mode. | MainInputMode | ||
| keyboardModeEnabled : Boolean
Whether the keyboard input mode is enabled. | MainInputMode | ||
| keyboardModePriority : int
The keyboard mode priority. | MainInputMode | ||
| marqueeSelectionInputMode : MarqueeSelectionInputMode
The MarqueeSelectionInputMode property. | MainInputMode | ||
| marqueeSelectionModeEnabled : Boolean
Whether the marquee selection input mode is enabled. | MainInputMode | ||
| marqueeSelectionModePriority : int
The marquee selection mode priority. | MainInputMode | ||
| moveInputMode : MoveInputMode
The MoveInputMode property. | MainInputMode | ||
| moveModeEnabled : Boolean
Whether the move input mode is enabled. | MainInputMode | ||
| moveModePriority : int
The move mode priority. | MainInputMode | ||
![]() | preferredCursor : Cursor
Gets or sets the cursor this mode would like to have displayed in the CanvasComponent. | AbstractConcurrentInputMode | |
| selectionModel : ISelectionModel
Gets or sets the selectionModel property
| MainInputMode | ||
| snapContext : SnapContext
The SnapContext instance which handles snapping of moving items to distinct coordinates. | MainInputMode | ||
| Property | Defined By | ||
|---|---|---|---|
![]() | childController : ConcurrencyController [read-only]
The ConcurrencyController that is used to manage the concurrency of
the child input modes. | MultiplexingInputMode | |
| inputModeController : InputModeController [read-only]
Gets or sets the input mode controller helper instance. | MainInputMode | ||
| Method | Defined By | ||
|---|---|---|---|
Constructs a new input mode using the given collection of items and a selection model. | MainInputMode | ||
![]() | add(inputMode:IInputMode, priority:int = 0):void
Adds an input mode using the given priority to this compound mode. | MultiplexingInputMode | |
![]() | addConcurrent(inputMode:IConcurrentInputMode, priority:int):void
Adds an input mode as a concurrent mode using the given priority to this compound mode. | MultiplexingInputMode | |
![]() | adjustCursor():void
Adjusts the cursor of the CanvasControl according to the
current input mutex owner or the first mode in the list
that returns a non-null preferredCursor. | MultiplexingInputMode | |
![]() | cancel():void [override]
Cancels all modes. | MultiplexingInputMode | |
clearSelection():void
Clears the selection on the current selectionModel. | MainInputMode | ||
![]() |
Callback that creates the IInputModeContext for the child modes of this mode. | MultiplexingInputMode | |
createMoveUnselectedInputMode(modifierRecognizer:Function = null):MoveInputMode
Factory method which creates and configures a MoveInputMode
which can move items without selecting them first. | MainInputMode | ||
disableAll():void
Disables all submodes. | MainInputMode | ||
![]() | dispose():void
Disposes this input mode. | AbstractInputMode | |
Returns an ICanvasGroupProvider instance for this input mode
| MainInputMode | ||
![]() |
Finds the IConcurrentInputMode that currently
owns the mutex or null.
| MultiplexingInputMode | |
initialized(document:Object, id:String):void
Called automatically by the MXML compiler when the instance is created
using an MXML tag. | MainInputMode | ||
![]() | install(context:IInputModeContext):void
Installs this mode into the canvas of the given context. | AbstractInputMode | |
Selects the given elements in the editor inside the provided marquee selection rectangle. | MainInputMode | ||
marqueeSelectElements(marqueeRectangle:IRectangle):void
Callback that selects the elements in the editor inside the marquee selection rectangle. | MainInputMode | ||
![]() | remove(mode:IInputMode):void
Removes the given mode from this compound mode. | MultiplexingInputMode | |
setSelected(item:IModelItem, selected:Boolean):void
Uses the selectionModel to select the given item. | MainInputMode | ||
![]() |
Returns a list of all modes managed by this instance in sorted order. | MultiplexingInputMode | |
![]() | stop():Boolean [override]
Tries to stop all modes. | MultiplexingInputMode | |
![]() | 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 | |
childInputModeContextLookup(type:Class):Object [override]
Callback lookup method that will be used by the child IInputModeContext
| MainInputMode | ||
![]() |
Create the ConcurrencyController that is used to manage the concurrency of
the child input modes. | MultiplexingInputMode | |
Factory method for the ClickInputMode property. | MainInputMode | ||
Factory method for the contextMenuInputMode property. | MainInputMode | ||
Factory method for the HandleInputMode property. | MainInputMode | ||
Creates the inputModeController that will
be used to coordinate the selection and the handles, etc. | MainInputMode | ||
Factory method that creates the keyboard input mode instance. | MainInputMode | ||
Factory method for the marqueeSelectionInputMode property. | MainInputMode | ||
Factory method for the MoveInputMode property. | MainInputMode | ||
![]() | 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 [override]
| MainInputMode | ||
installCore(context:IInputModeContext):void [override]
Installs this mode into the given context. | MainInputMode | ||
![]() | invalidate():void
Convenience method for subclass implementations that invalidates
the canvasComponent this mode is currently installed in. | AbstractInputMode | |
Called when the clickInputMode property value changes
and after initialization of the field. | MainInputMode | ||
onClickInputModeClicked(evt:ClickEvent):void
Callback that is triggered once clickInputMode
triggers the ClickInputMode.CLICK
event. | MainInputMode | ||
onCollectionModelChanged(oldCollectionModel:ICollectionModel, newCollectionModel:ICollectionModel):void
Callback that gets triggered once the collectionModel property changes. | MainInputMode | ||
onContextMenuInputModeChanged(oldContextMenuInputMode:ContextMenuInputMode, newContextMenuInputMode:ContextMenuInputMode):void
Called when the contextMenuInputMode property value changes
| MainInputMode | ||
Callback that is triggered on a CanvasContextMenuEvent
| MainInputMode | ||
![]() | onDisabled():void [override]
Called when the AbstractConcurrentInputMode.enabled property changes to
false. | MultiplexingInputMode | |
![]() | onEnabled():void [override]
Called when the AbstractConcurrentInputMode.enabled property changes to true. | MultiplexingInputMode | |
onHandleInputModeChanged(oldHandleInputMode:HandleInputMode, newHandleInputMode:HandleInputMode):void
Called when the handleInputMode property value changes
and after initialization of the field. | MainInputMode | ||
Called when the inputModeCanvasGroup property changes. | MainInputMode | ||
onKeyboardInputModeChanged(oldKeyboardInputMode:KeyboardInputMode, newKeyboardInputMode:KeyboardInputMode):void
Called when the keyboard input mode changed. | MainInputMode | ||
onMarqueeSelectionInputModeChanged(oldMarqueeSelectionInputMode:MarqueeSelectionInputMode, newMarqueeSelectionInputMode:MarqueeSelectionInputMode):void
Called when the marqueeSelectionInputMode property value changes
and after initialization of the field. | MainInputMode | ||
onMarqueeSelectionInputModeMarqueeSelected(evt:Event):void
Callback used by MarqueeSelectionInputMode if the user
has finished creating the marquee selection. | MainInputMode | ||
Called when the moveInputMode property value changes
| MainInputMode | ||
onMoveInputModeDragFinished(evt:Event):void
Callback method that will be triggered when a drag has been finished. | MainInputMode | ||
![]() | 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 | |
Callback that gets triggered once the selectionModel property changes. | MainInputMode | ||
| MainInputMode | |||
![]() | releaseMutex():void
Releases the mutex that is currently owned by this instance. | AbstractConcurrentInputMode | |
![]() |
Potentially replaces the reported by the current owner's preferredCursor property before it is
set on the canvas. | MultiplexingInputMode | |
![]() | requestMutex():void
Requests the InputMutex from the current controller. | AbstractConcurrentInputMode | |
shouldBeMarqueeSelectable(item:IModelItem):Boolean
Callback that determines whether the provided IModelItem should be
selected upon marquee selection. | MainInputMode | ||
shouldBeMovable(item:IModelItem):Boolean
Callback method that is used for InputModeController's shouldBeMovableFunction. | MainInputMode | ||
shouldShowHandles(item:IModelItem):Boolean
Callback method that is used for InputModeController's shouldShowHandlesFunction. | MainInputMode | ||
![]() | uninstallCore(context:IInputModeContext):void [override] | MultiplexingInputMode | |
| bridgeUpdateMode | property |
bridgeUpdateMode:BridgeUpdateModeDetermines how bridges shall be rendered during a move or drag.
Setting this property will update the bridgeUpdateMode property
on the current HandleInputMode and MoveInputMode.
This property can be overridden by setting the bridgeUpdateMode
directly on the submodes. Also, if a new HandleInputMode or
MoveInputMode is set after setting this property the new
mode's bridgeUpdateMode property won't be changed.
If no BridgeManager is set as CanvasComponent.bridgeManager
this setting has no effect.
One of the constants defined in class BridgeUpdateMode:
BridgeUpdateMode.ALWAYS: the bridges will be updated during the drag.BridgeUpdateMode.ON_START_AND_END: the bridges will be removed before
and updated after the drag.BridgeUpdateMode.ON_END: the bridges will be updated after the drag.Note that bridge rendering may dramatically reduce the performance for larger graphs during a move gesture which is why it is disabled per default.
The default value is BridgeUpdateMode.ON_END.
public function get bridgeUpdateMode():BridgeUpdateMode public function set bridgeUpdateMode(value:BridgeUpdateMode):voidSee also
| clickInputMode | property |
clickInputMode:ClickInputModeThe ClickInputMode property.
If the field has not yet been initialized upon first access, the
factory method createClickInputMode will be called.
Upon change the onClickInputModeChanged method will be called.
Setting a new ClickInputMode is not allowed after the
MainInputMode is installed and will throw an exception.
public function get clickInputMode():ClickInputMode public function set clickInputMode(value:ClickInputMode):voidIllegalOperationError — IllegalOperationError: if the mode
is set after the MainInputMode is installed.
|
| clickModeEnabled | property |
clickModeEnabled:BooleanWhether the click input mode is enabled.
The default value is true.
This property can be used as the source for data binding.
public function get clickModeEnabled():Boolean public function set clickModeEnabled(value:Boolean):void| clickModePriority | property |
clickModePriority:intThe click mode priority.
The default value is 10.
public function get clickModePriority():int public function set clickModePriority(value:int):void| collectionModel | property |
collectionModel:ICollectionModel
Gets or sets the ICollectionModel of the IModelItem
that make up the elements in the view this mode is acting upon.
public function get collectionModel():ICollectionModel public function set collectionModel(value:ICollectionModel):void| contextMenuInputMode | property |
contextMenuInputMode:ContextMenuInputMode
The contextMenuInputMode property.
If the field has not yet been initialized upon first access, the
factory method createContextMenuInputMode will be called.
Upon change the onContextMenuInputModeChanged method will be called.
Setting a new ContextMenuInputMode is not allowed after the
MainInputMode is installed and will throw an exception.
public function get contextMenuInputMode():ContextMenuInputMode public function set contextMenuInputMode(value:ContextMenuInputMode):voidIllegalOperationError — IllegalOperationError: if the mode
is set after the MainInputMode is installed.
|
| contextMenuModeEnabled | property |
contextMenuModeEnabled:BooleanWhether the context menu input mode is enabled.
The default value is true.
This property can be used as the source for data binding.
public function get contextMenuModeEnabled():Boolean public function set contextMenuModeEnabled(value:Boolean):void| contextMenuModePriority | property |
contextMenuModePriority:intThe context menu mode priority.
public function get contextMenuModePriority():int public function set contextMenuModePriority(value:int):void| handleInputMode | property |
handleInputMode:HandleInputModeThe HandleInputMode property.
If the field has not yet been initialized upon first access, the
factory method createHandleInputMode will be called.
Upon change the onHandleInputModeChanged method will be called.
Setting a new HandleInputMode is not allowed after the
MainInputMode is installed and will throw an exception.
public function get handleInputMode():HandleInputMode public function set handleInputMode(value:HandleInputMode):voidIllegalOperationError — IllegalOperationError: if the mode
is set after the MainInputMode is installed.
|
| handleModeEnabled | property |
handleModeEnabled:BooleanWhether the handle input mode is enabled.
The default value is true.
This property can be used as the source for data binding.
public function get handleModeEnabled():Boolean public function set handleModeEnabled(value:Boolean):void| handleModePriority | property |
handleModePriority:intThe handle mode priority.
The default value is 0.
public function get handleModePriority():int public function set handleModePriority(value:int):void| inputModeCanvasGroup | property |
inputModeCanvasGroup:ICanvasObjectGroupThe canvas group that can be used by input modes to add temporary top-level canvas objects to.
This group should be placed in front of the content elements in the canvas object tree.
public function get inputModeCanvasGroup():ICanvasObjectGroup public function set inputModeCanvasGroup(value:ICanvasObjectGroup):void| inputModeController | property |
inputModeController:InputModeController [read-only] Gets or sets the input mode controller helper instance.
The input mode controller is an helper object that collects IHandle and
provides meta-IMovable, IReshapeable, and
IHitTestable instances that depend on the current
selection and collection model.
protected function get inputModeController():InputModeController| keyboardInputMode | property |
keyboardInputMode:KeyboardInputModeThe keyboard input mode.
Setting a new KeyboardInputMode is not allowed after the
MainInputMode is installed and will throw an exception.
public function get keyboardInputMode():KeyboardInputMode public function set keyboardInputMode(value:KeyboardInputMode):voidIllegalOperationError — IllegalOperationError: if the mode
is set after the MainInputMode is installed.
|
| keyboardModeEnabled | property |
keyboardModeEnabled:BooleanWhether the keyboard input mode is enabled.
The default value is true.
This property can be used as the source for data binding.
public function get keyboardModeEnabled():Boolean public function set keyboardModeEnabled(value:Boolean):void| keyboardModePriority | property |
keyboardModePriority:intThe keyboard mode priority.
The default value is 0.
public function get keyboardModePriority():int public function set keyboardModePriority(value:int):void| marqueeSelectionInputMode | property |
marqueeSelectionInputMode:MarqueeSelectionInputModeThe MarqueeSelectionInputMode property.
If the field has not yet been initialized upon first access, the
factory method createMarqueeSelectionInputMode will be called.
Upon change the onMarqueeSelectionInputModeChanged method will be called.
Setting a new MarqueeSelectionInputMode is not allowed after the
MainInputMode is installed and will throw an exception.
public function get marqueeSelectionInputMode():MarqueeSelectionInputMode public function set marqueeSelectionInputMode(value:MarqueeSelectionInputMode):voidIllegalOperationError — IllegalOperationError: if the mode
is set after the MainInputMode is installed.
|
| marqueeSelectionModeEnabled | property |
marqueeSelectionModeEnabled:BooleanWhether the marquee selection input mode is enabled.
The default value is true.
This property can be used as the source for data binding.
public function get marqueeSelectionModeEnabled():Boolean public function set marqueeSelectionModeEnabled(value:Boolean):void| marqueeSelectionModePriority | property |
marqueeSelectionModePriority:intThe marquee selection mode priority.
The default value is 50.
public function get marqueeSelectionModePriority():int public function set marqueeSelectionModePriority(value:int):void| moveInputMode | property |
moveInputMode:MoveInputModeThe MoveInputMode property.
If the field has not yet been initialized upon first access, the
factory method createMoveInputMode will be called.
Upon change the onMoveInputModeChanged method will be called.
Setting a new MoveInputMode is not allowed after the
MainInputMode is installed and will throw an exception.
public function get moveInputMode():MoveInputMode public function set moveInputMode(value:MoveInputMode):voidIllegalOperationError — IllegalOperationError: if the mode
is set after the MainInputMode is installed.
|
| moveModeEnabled | property |
moveModeEnabled:BooleanWhether the move input mode is enabled.
The default value is true.
This property can be used as the source for data binding.
public function get moveModeEnabled():Boolean public function set moveModeEnabled(value:Boolean):void| moveModePriority | property |
moveModePriority:intThe move mode priority.
The default value is 40.
public function get moveModePriority():int public function set moveModePriority(value:int):void| selectionModel | property |
selectionModel:ISelectionModelGets or sets the selectionModel property
public function get selectionModel():ISelectionModel public function set selectionModel(value:ISelectionModel):void| snapContext | property |
snapContext:SnapContext
The SnapContext instance which handles snapping of moving items to distinct coordinates.
Setting this property to SnapContext.voidInstance will disable snapping, whereas
setting it to null will make the child modes use the context from their
IInputModeContexts, if available.
Upon change the onSnapContextChanged method is called, which will as a side effect configure
the snap context to display the SnapResults in the CanvasComponent.
The default value is .null
public function get snapContext():SnapContext public function set snapContext(value:SnapContext):voidSee also
| MainInputMode | () | Constructor |
public function MainInputMode(collectionModel:ICollectionModel = null, selectionModel:ISelectionModel = null)Constructs a new input mode using the given collection of items and a selection model.
When no collection and no selection model is provided, they will be set when the input mode
is installed on a GraphCanvasComponent.
collectionModel:ICollectionModel (default = null) — The collection of the items in the control.
| |
selectionModel:ISelectionModel (default = null) — The selection model for the items.
|
| childInputModeContextLookup | () | method |
override protected function childInputModeContextLookup(type:Class):Object
Callback lookup method that will be used by the child IInputModeContext
Parameters
type:Class — The class to lookup
|
Object — An implementation of the given type, or null
|
| clearSelection | () | method |
public function clearSelection():void
Clears the selection on the current selectionModel.
This implementation may be overridden for customizations.
All it does is call selectionModel.clear.
| createClickInputMode | () | method |
protected function createClickInputMode():ClickInputMode
Factory method for the ClickInputMode property. This method will be called
upon first access to the clickInputMode property.
ClickInputMode — A new instance of ClickInputMode
|
| createContextMenuInputMode | () | method |
protected function createContextMenuInputMode():ContextMenuInputMode
Factory method for the contextMenuInputMode property.
This method will be called
upon first access to the contextMenuInputMode property.
ContextMenuInputMode — a new instance of ContextMenuInputMode
|
| createHandleInputMode | () | method |
protected function createHandleInputMode():HandleInputMode
Factory method for the HandleInputMode property. This method will be called
upon first access to the handleInputMode property.
HandleInputMode — A new instance of HandleInputMode
|
| createInputModeController | () | method |
protected function createInputModeController():InputModeController
Creates the inputModeController that will
be used to coordinate the selection and the handles, etc.
The input mode controller is an helper object that collects IHandle and
provides meta-IMovable, IReshapeable, and
IHitTestable instances that depend on the current
selection and collection model.
InputModeController — An instance of InputModeController
|
| createKeyboardInputMode | () | method |
protected function createKeyboardInputMode():KeyboardInputModeFactory method that creates the keyboard input mode instance.
ReturnsKeyboardInputMode — A new instance of KeyboardInputMode
|
| createMarqueeSelectionInputMode | () | method |
protected function createMarqueeSelectionInputMode():MarqueeSelectionInputMode
Factory method for the marqueeSelectionInputMode property. This method will be called
upon first access to the marqueeSelectionInputMode property.
MarqueeSelectionInputMode — a new instance of MarqueeSelectionInputMode
|
| createMoveInputMode | () | method |
protected function createMoveInputMode():MoveInputModeFactory method for the MoveInputMode property.
This method will be called
upon first access to the MoveInputMode property.
MoveInputMode — A new instance of MoveInputMode.
|
| createMoveUnselectedInputMode | () | method |
public function createMoveUnselectedInputMode(modifierRecognizer:Function = null):MoveInputMode
Factory method which creates and configures a MoveInputMode
which can move items without selecting them first.
This input mode cannot be set with the moveInputMode but has to be added
via the addConcurrent() method:
The following code adds the created input mode such that pressing the shift key will deactivate the input mode and thus restore the default behaviour (create edge on drag, move only selected items):
var mr:Function = function( event:Event ):Boolean {
return event is CanvasMouseEvent && !CanvasMouseEvent(event).shiftKey;
};
var moveMode:MoveInputMode = mainInputMode.createMoveUnselectedInputMode(mr);
mainInputMode.addConcurrent(moveMode, mainInputMode.moveModePriority - 10);
If the created input mode should only be active when the shift key is set, set
the modifierRecognizer to EventRecognizers.MOUSE_SHIFT_DOWN
Parameters
modifierRecognizer:Function (default = null) — A function with the signature
function( event:Event ):Boolean which returns true when this
input mode should be active.
|
MoveInputMode |
See also
| disableAll | () | method |
public function disableAll():voidDisables all submodes.
This method disables the submodes
clickInputModecontextMenuInputModehandleInputModekeyboardInputModemarqueeSelectionInputModemoveInputMode| getCanvasGroupProvider | () | method |
public function getCanvasGroupProvider():ICanvasGroupProvider
Returns an ICanvasGroupProvider instance for this input mode
ICanvasGroupProvider — An ICanvasGroupProvider instance for this input mode
|
| initialize | () | method |
override protected function initialize():void
| initialized | () | method |
public function initialized(document:Object, id:String):voidCalled automatically by the MXML compiler when the instance is created using an MXML tag.
This implementation does nothing.
Parameters
document:Object — The MXML document containing this instance.
| |
id:String — The id of this instance.
|
| installCore | () | method |
override protected function installCore(context:IInputModeContext):voidInstalls this mode into the given context.
Installation ususally means registering some event listeners
on the canvasComponent or on canvasComponent.root.
Parameters
context:IInputModeContext — the graph canvas that this instance shall be installed into
|
| marqueeSelect | () | method |
public function marqueeSelect(marqueeRectangle:IRectangle, items:ICollectionModel):voidSelects the given elements in the editor inside the provided marquee selection rectangle.
This implementation iterates over the items
and queries them for an implementation of IMarqueeTestable using
their ILookup.lookup. This instance will be used to determine
whether the item should be selected.
Parameters
marqueeRectangle:IRectangle — The rectangle in world coordinates.
| |
items:ICollectionModel — The items to iterate over.
|
| marqueeSelectElements | () | method |
public function marqueeSelectElements(marqueeRectangle:IRectangle):voidCallback that selects the elements in the editor inside the marquee selection rectangle.
This implementation iterates over all items in the CollectionModel
and queries them for an implementation of IMarqueeTestable using
their ILookup.lookup. This instance will be used to determine
whether the item should be selected.
Parameters
marqueeRectangle:IRectangle — The rectangle in world coordinates.
|
| onClickInputModeChanged | () | method |
protected function onClickInputModeChanged(oldClickInputMode:ClickInputMode, newClickInputMode:ClickInputMode):void
Called when the clickInputMode property value changes
and after initialization of the field.
Parameters
oldClickInputMode:ClickInputMode — the old value
| |
newClickInputMode:ClickInputMode — the new value
|
| onClickInputModeClicked | () | method |
protected function onClickInputModeClicked(evt:ClickEvent):void
Callback that is triggered once clickInputMode
triggers the ClickInputMode.CLICK
event.
Parameters
evt:ClickEvent |
| onCollectionModelChanged | () | method |
protected function onCollectionModelChanged(oldCollectionModel:ICollectionModel, newCollectionModel:ICollectionModel):void
Callback that gets triggered once the collectionModel property changes.
This implementation sets the new collectionModel on the inputModeController
Parameters
oldCollectionModel:ICollectionModel | |
newCollectionModel:ICollectionModel |
| onContextMenuInputModeChanged | () | method |
protected function onContextMenuInputModeChanged(oldContextMenuInputMode:ContextMenuInputMode, newContextMenuInputMode:ContextMenuInputMode):void
Called when the contextMenuInputMode property value changes
Parameters
oldContextMenuInputMode:ContextMenuInputMode — the old value
| |
newContextMenuInputMode:ContextMenuInputMode — the new value
|
| onContextMenuInputModeMenuSelect | () | method |
protected function onContextMenuInputModeMenuSelect(evt:CanvasContextMenuEvent):void
Callback that is triggered on a CanvasContextMenuEvent
Parameters
evt:CanvasContextMenuEvent |
| onHandleInputModeChanged | () | method |
protected function onHandleInputModeChanged(oldHandleInputMode:HandleInputMode, newHandleInputMode:HandleInputMode):void
Called when the handleInputMode property value changes
and after initialization of the field.
Parameters
oldHandleInputMode:HandleInputMode — The old input mode.
| |
newHandleInputMode:HandleInputMode — The new input mode.
|
| onInputModeCanvasGroupChanged | () | method |
protected function onInputModeCanvasGroupChanged(oldGroup:ICanvasObjectGroup, newGroup:ICanvasObjectGroup):void
Called when the inputModeCanvasGroup property changes.
Parameters
oldGroup:ICanvasObjectGroup — The old value.
| |
newGroup:ICanvasObjectGroup — The new value.
|
| onKeyboardInputModeChanged | () | method |
protected function onKeyboardInputModeChanged(oldKeyboardInputMode:KeyboardInputMode, newKeyboardInputMode:KeyboardInputMode):voidCalled when the keyboard input mode changed.
Parameters
oldKeyboardInputMode:KeyboardInputMode — The old keyboard input mode.
| |
newKeyboardInputMode:KeyboardInputMode — The new keyboard input mode.
|
| onMarqueeSelectionInputModeChanged | () | method |
protected function onMarqueeSelectionInputModeChanged(oldMarqueeSelectionInputMode:MarqueeSelectionInputMode, newMarqueeSelectionInputMode:MarqueeSelectionInputMode):void
Called when the marqueeSelectionInputMode property value changes
and after initialization of the field.
Parameters
oldMarqueeSelectionInputMode:MarqueeSelectionInputMode — the old value, which may be null the first time
| |
newMarqueeSelectionInputMode:MarqueeSelectionInputMode — the new value
|
| onMarqueeSelectionInputModeMarqueeSelected | () | method |
protected function onMarqueeSelectionInputModeMarqueeSelected(evt:Event):void
Callback used by MarqueeSelectionInputMode if the user
has finished creating the marquee selection.
This method delegats its work to marqueeSelectElements( IRectangle )
Parameters
evt:Event |
| onMoveInputModeChanged | () | method |
protected function onMoveInputModeChanged(oldMoveInputMode:MoveInputMode, newMoveInputMode:MoveInputMode):void
Called when the moveInputMode property value changes
Parameters
oldMoveInputMode:MoveInputMode — the old value
| |
newMoveInputMode:MoveInputMode — the new value
|
| onMoveInputModeDragFinished | () | method |
protected function onMoveInputModeDragFinished(evt:Event):voidCallback method that will be triggered when a drag has been finished.
Parameters
evt:Event — An event of type com.yworks.canvas.input.MoveInputMode.DRAG_FINISHED
|
| onSelectionModelChanged | () | method |
protected function onSelectionModelChanged(oldSelectionModel:ISelectionModel, newSelectionModel:ISelectionModel):void
Callback that gets triggered once the selectionModel property changes.
This implementation sets the new selectionModel on the inputModeController
Parameters
oldSelectionModel:ISelectionModel — The old value
| |
newSelectionModel:ISelectionModel — The new value
|
| onSnapContextChanged | () | method |
protected function onSnapContextChanged(oldSnapContext:SnapContext, newSnapContext:SnapContext):voidParameters
oldSnapContext:SnapContext | |
newSnapContext:SnapContext |
| setSelected | () | method |
public function setSelected(item:IModelItem, selected:Boolean):void
Uses the selectionModel to select the given item.
Parameters
item:IModelItem — The item to set the selection state on.
| |
selected:Boolean — The new selection state.
|
| shouldBeMarqueeSelectable | () | method |
protected function shouldBeMarqueeSelectable(item:IModelItem):Boolean
Callback that determines whether the provided IModelItem should be
selected upon marquee selection.
This implementation always returns true.
Parameters
item:IModelItem — The item to check.
|
Boolean — Whether to select the item.
|
| shouldBeMovable | () | method |
protected function shouldBeMovable(item:IModelItem):Boolean
Callback method that is used for InputModeController's shouldBeMovableFunction.
This implementation always yields true.
Parameters
item:IModelItem — The item to check
|
Boolean — Whether to make the object movable.
|
| shouldShowHandles | () | method |
protected function shouldShowHandles(item:IModelItem):Boolean
Callback method that is used for InputModeController's shouldShowHandlesFunction.
This implementation always yields true.
Parameters
item:IModelItem — The item to check
|
Boolean — Whether to show the handles for the given item
|
See also