| Package | com.yworks.canvas.input |
| Class | public class MoveViewportInputMode |
| Inheritance | MoveViewportInputMode StateMachineInputMode AbstractConcurrentInputMode AbstractInputMode flash.events.EventDispatcher |
IInputMode implementation that can
be used to grab and drag the viewport of the control it is installed in.
This implementation will request the InputMutex
as soon as it recognizes a mouse drag.
| Property | Defined by | ||
|---|---|---|---|
![]() | canceledState : State
Returns the canceled state of the state machine.
| StateMachineInputMode | |
![]() | canvas : CanvasComponent
The canvas instance this mode is currently installed in or
null
| AbstractInputMode | |
![]() | controller : ConcurrencyController
Gets or injects the
ConcurrencyController for this instance. | AbstractConcurrentInputMode | |
| dragCursor : Cursor
The cursor to use during the dragging.
| MoveViewportInputMode | ||
| draggedRecognizer : Function
Gets or sets the "dragged" state recognizer.
| MoveViewportInputMode | ||
![]() | enabled : Boolean
Gets or sets the enabled state of this input mode.
| AbstractConcurrentInputMode | |
![]() | inputModeContext : IInputModeContext
The context instance this mode is currently installed in or
null if this instance is not installed. | AbstractInputMode | |
![]() | installed : Boolean
Whether this mode is currently installed, i.e.
| AbstractInputMode | |
![]() | lastMouseEvent : CanvasMouseEvent
Returns the last mouse event.
| StateMachineInputMode | |
![]() | preferredCursor : Cursor
Gets or sets the cursor this mode would like to have displayed in the
CanvasComponent. | AbstractConcurrentInputMode | |
| pressedRecognizer : Function
Gets or sets the "pressed" state recognizer.
| MoveViewportInputMode | ||
| releasedRecognizer : Function
Gets or sets the "released" state recognizer.
| MoveViewportInputMode | ||
![]() | startState : State
Returns the start state of the state machine.
| StateMachineInputMode | |
![]() | stateMachine : StateMachine
Gets the state machine.
| StateMachineInputMode | |
![]() | stoppedState : State
Returns the stopped state of the state machine.
| StateMachineInputMode | |
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| MoveViewportInputMode | ||
|
cancel():void
Cancels navigation.
| MoveViewportInputMode | ||
![]() |
dispose():void
Disposes this input mode.
| AbstractInputMode | |
|
install(context:IInputModeContext):void
| MoveViewportInputMode | ||
![]() |
resetMachine():void
Runs the machine using a special reset event.
| StateMachineInputMode | |
![]() |
run(evt:Event):void
Tries to run the virtual machine using the pair of source and event argument
to determine which transition to take.
| StateMachineInputMode | |
![]() |
stop():Boolean
Runs the machine using a special stop event.
| StateMachineInputMode | |
![]() |
uninstall(context:IInputModeContext):void
Uninstalls this mode from the canvas.
| StateMachineInputMode | |
| Method | Defined by | ||
|---|---|---|---|
|
abort(te:TransitionEvent):void
Called by the state machine when the state changes from prepared to the start state.
| MoveViewportInputMode | ||
|
begin(te:TransitionEvent):void
Called by the state machine to begin the dragging when the mouse is dragged.
| MoveViewportInputMode | ||
![]() |
canRequestMutex():Boolean
Determines whether this instance can request the
InputMutex. | AbstractConcurrentInputMode | |
![]() |
Factory method that creates a canceled
State
for the given machine. | StateMachineInputMode | |
![]() |
Factory method that creates a start
State for the given machine. | StateMachineInputMode | |
![]() |
Factory method that creates the state machine.
| StateMachineInputMode | |
![]() |
Factory method that creates a stopped
State
for the given machine. | StateMachineInputMode | |
|
drag(te:TransitionEvent):void
Called by the state machine to drag the viewport.
| MoveViewportInputMode | ||
|
end(te:TransitionEvent):void
Called by the state machine once the dragging has been finished.
| MoveViewportInputMode | ||
![]() |
hasMutex():Boolean
Determines whether this instance owns the input mutex.
| AbstractConcurrentInputMode | |
![]() |
initialize():void
Performs one-time initialization of this instance.
| AbstractInputMode | |
|
initializeStateMachine(machine:StateMachine, startState:State, canceledState:State, stoppedState:State, finishedState:State):void
Called to initialize the state machine.
| MoveViewportInputMode | ||
![]() |
installListeners():void
Installs all necessary listeners to trigger the
run method. | StateMachineInputMode | |
![]() |
invalidate():void
Convenience method for subclass implementations that invalidates
the canvasComponent this mode is currently installed in.
| AbstractInputMode | |
![]() |
isCancelEvent(evt:Event):Boolean
Method that identifies an event as a cancel event.
| StateMachineInputMode | |
![]() |
isDisabledEvent(evt:Event):Boolean
Method that identifies an event as a disabled event.
| StateMachineInputMode | |
![]() |
isEnabledEvent(evt:Event):Boolean
Method that identifies an event as an enabled event.
| StateMachineInputMode | |
![]() |
isMutexAquiredEvent(evt:Event):Boolean
Method that identifies an event as a mutexAquired event.
| StateMachineInputMode | |
![]() |
isMutexLostEvent(evt:Event):Boolean
Method that identifies an event as a mutexLost event.
| StateMachineInputMode | |
![]() |
isStopEvent(evt:Event):Boolean
Method that identifies an event as a stop event.
| StateMachineInputMode | |
![]() |
onCancelStateEntered(evt:StateChangeEvent):void
Called when the cancel state has been entered.
| StateMachineInputMode | |
![]() |
onDisable():void
Runs the state machine using a disable event.
| StateMachineInputMode | |
![]() |
onDisabled():void
Called when the
enabled property changes to false. | AbstractConcurrentInputMode | |
![]() |
onEnable():void
Runs the state machine using a enable event.
| StateMachineInputMode | |
![]() |
onEnabled():void
Called when the
enabled property changes to true. | AbstractConcurrentInputMode | |
![]() |
onMachineReset():void
| StateMachineInputMode | |
![]() |
onMutexObtained():void
Runs the state machine using a mutex obtained event.
| StateMachineInputMode | |
![]() |
onMutexReleased():void
Runs the state machine using a mutex lost event.
| StateMachineInputMode | |
![]() |
Called when the
preferredCursor property changes. | AbstractConcurrentInputMode | |
![]() |
onRun(evt:Event):void
Callback method that will be called after the state machine has
been run using the arguments provided.
| StateMachineInputMode | |
![]() |
onStopStateEntered(evt:StateChangeEvent):void
Called when the cancel state has been entered.
| StateMachineInputMode | |
|
prepare(te:TransitionEvent):void
Called by the state machine to prepare the marquee selection
when the mouse is pressed.
| MoveViewportInputMode | ||
![]() |
releaseMutex():void
Releases the mutex that is currently owned by this instance.
| AbstractConcurrentInputMode | |
![]() |
requestMutex():void
Requests the
InputMutex from the current controller. | AbstractConcurrentInputMode | |
![]() |
setLastMouseEvent(evt:CanvasMouseEvent):void
| StateMachineInputMode | |
![]() |
setPreferredCursorTransition(cursorClass:Class):Function
Factory method that can be used to obtain an listener
implementation that sets the given
preferredCursor. | StateMachineInputMode | |
![]() |
setResetCursorTransition():Function
Factory method that can be used to obtain a listener implementation
that resets the
preferredCursor. | StateMachineInputMode | |
![]() |
uninstallListeners():void
Uninstalls all listeners, this instance has installed on calling
intallListeners()
| StateMachineInputMode | |
| dragCursor | property |
dragCursor:Cursor [read-write]The cursor to use during the dragging.
The default value is CursorProvider.HAND.
public function get dragCursor():Cursor
public function set dragCursor(value:Cursor):void
| draggedRecognizer | property |
draggedRecognizer:Function [read-write]Gets or sets the "dragged" state recognizer.
This recognizer instance determines when the user is dragging the viewport.
Implementation public function get draggedRecognizer():Function
public function set draggedRecognizer(value:Function):void
| pressedRecognizer | property |
pressedRecognizer:Function [read-write]Gets or sets the "pressed" state recognizer.
This recognizer instance will be used to determine when the user begins the navigation gesture.
Implementation public function get pressedRecognizer():Function
public function set pressedRecognizer(value:Function):void
| releasedRecognizer | property |
releasedRecognizer:Function [read-write]Gets or sets the "released" state recognizer.
This instance determines when the user has finished dragging the viewport.
Implementation public function get releasedRecognizer():Function
public function set releasedRecognizer(value:Function):void
| MoveViewportInputMode | () | constructor |
public function MoveViewportInputMode()Constructor.
| abort | () | method |
protected function abort(te:TransitionEvent):voidCalled by the state machine when the state changes from prepared to the start state.
Parameterste:TransitionEvent |
| begin | () | method |
protected function begin(te:TransitionEvent):voidCalled by the state machine to begin the dragging when the mouse is dragged.
Parameterste:TransitionEvent |
| cancel | () | method |
public override function cancel():voidCancels navigation.
| drag | () | method |
protected function drag(te:TransitionEvent):voidCalled by the state machine to drag the viewport.
Parameterste:TransitionEvent |
| end | () | method |
protected function end(te:TransitionEvent):voidCalled by the state machine once the dragging has been finished.
Parameterste:TransitionEvent |
| initializeStateMachine | () | method |
protected override function initializeStateMachine(machine:StateMachine, startState:State, canceledState:State, stoppedState:State, finishedState:State):voidCalled to initialize the state machine.
Parametersmachine:StateMachine — The machine to initialize and configure
|
|
startState:State — The start state to use.
|
|
canceledState:State — The canceled state to use.
|
|
stoppedState:State — The stopped state to use.
|
|
finishedState:State — The finished state to use.
|
| install | () | method |
public override function install(context:IInputModeContext):voidParameters
context:IInputModeContext |
| prepare | () | method |
protected function prepare(te:TransitionEvent):voidCalled by the state machine to prepare the marquee selection when the mouse is pressed.
Parameterste:TransitionEvent |