Packagecom.yworks.graph.input
Classpublic class ResizeStripeInputMode
InheritanceResizeStripeInputMode Inheritance StateMachineInputMode Inheritance AbstractConcurrentInputMode Inheritance AbstractInputMode Inheritance flash.events.EventDispatcher

Specialized input mode that is used to resize a stripe by dragging one of its borders.

By default, adjacent stripes are moved. To redistribute the space instead, use resizeNeighborsRecognizer. Also, by default the content of the stripes is either moved or constrains the minimum available sizes for the stripe resize operations. To completely ignore all content nodes, use ignoreContentRecognizer.



Public Properties
 PropertyDefined By
 InheritedcanceledState : State
[read-only] Returns the canceled state of the state machine.
StateMachineInputMode
  cancelRecognizer : Function
The "cancel" recognizer.
ResizeStripeInputMode
 Inheritedcanvas : CanvasComponent
[read-only] The canvas instance this mode is currently installed in or null
AbstractInputMode
 Inheritedcontroller : ConcurrencyController
Gets or injects the ConcurrencyController for this instance.
AbstractConcurrentInputMode
  draggedRecognizer : Function
The "dragged" recognizer.
ResizeStripeInputMode
 Inheritedenabled : Boolean
Gets or sets the enabled state of this input mode.
AbstractConcurrentInputMode
  ignoreContentRecognizer : Function
The recognizer that changes the behaviour to ignore the content of all stripes instead of moving them or considering for minimum sizes.
ResizeStripeInputMode
 InheritedinputModeContext : IInputModeContext
[read-only] The context instance this mode is currently installed in or null if this instance is not installed.
AbstractInputMode
 Inheritedinstalled : 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
 InheritedlastMouseEvent : CanvasMouseEvent
[read-only] Returns the last mouse event.
StateMachineInputMode
 InheritedpreferredCursor : Cursor
Gets or sets the cursor this mode would like to have displayed in the CanvasComponent.
AbstractConcurrentInputMode
  pressedRecognizer : Function
The "pressed" state recognizer.
ResizeStripeInputMode
  releasedRecognizer : Function
The "released" recognizer.
ResizeStripeInputMode
  resizeNeighborsRecognizer : Function
The recognizer that changes the behaviour to resize adjacent stripes instead of moving them.
ResizeStripeInputMode
 InheritedstartState : State
[read-only] Returns the start state of the state machine.
StateMachineInputMode
 InheritedstateMachine : StateMachine
[read-only] Gets the state machine.
StateMachineInputMode
 InheritedstoppedState : State
[read-only] Returns the stopped state of the state machine.
StateMachineInputMode
Protected Properties
 PropertyDefined By
 Inherited_lastEvent : Event
The last Event that has been delivered to this instance.
StateMachineInputMode
 Inherited_lastMouseEvent : CanvasMouseEvent
The last MouseEvent that has been delivered to this instance.
StateMachineInputMode
 InheritedstopEventRecognizer : Function
[read-only] An event recognizer for the state machine that is triggered if this mode has been stoppped.
StateMachineInputMode
Public Methods
 MethodDefined By
  
Creates a new instance of this input mode.
ResizeStripeInputMode
 Inherited
cancel():void
[override] Runs the machine using the cancel and reset events, releases the input mutex and returns.
StateMachineInputMode
 Inherited
dispose():void
Disposes this input mode.
AbstractInputMode
 Inherited
Installs this mode into the canvas of the given context.
AbstractInputMode
 Inherited
Runs the machine using a special reset event.
StateMachineInputMode
 Inherited
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
 Inherited
stop():Boolean
[override] Runs the machine using a special stop event.
StateMachineInputMode
 Inherited
Uninstalls this mode from the canvas.
AbstractInputMode
Protected Methods
 MethodDefined By
 Inherited
canRequestMutex():Boolean
Determines whether this instance can request the InputMutex.
AbstractConcurrentInputMode
 Inherited
Factory method that creates a canceled State for the given machine.
StateMachineInputMode
  
Creates the resize visualization.
ResizeStripeInputMode
 Inherited
Factory method that creates a start State for the given machine.
StateMachineInputMode
 Inherited
Factory method that creates the state machine.
StateMachineInputMode
 Inherited
Factory method that creates a stopped State for the given machine.
StateMachineInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
hasMutex():Boolean
Determines whether this instance owns the input mutex.
AbstractConcurrentInputMode
 Inherited
initialize():void
Performs one-time initialization of this instance.
AbstractInputMode
  
initializeStateMachine(machine:StateMachine, startState:State, canceledState:State, stoppedState:State, finishedState:State):void
[override] Called to initialize the state machine.
ResizeStripeInputMode
 Inherited
[override] Installs this mode into the given canvas.
StateMachineInputMode
 Inherited
Installs all necessary listeners to trigger the run method.
StateMachineInputMode
 Inherited
invalidate():void
Convenience method for subclass implementations that invalidates the canvasComponent this mode is currently installed in.
AbstractInputMode
 Inherited
isCancelEvent(evt:Event):Boolean
Method that identifies an event as a cancel event.
StateMachineInputMode
 Inherited
isDisabledEvent(evt:Event):Boolean
Method that identifies an event as a disabled event.
StateMachineInputMode
 Inherited
isEnabledEvent(evt:Event):Boolean
Method that identifies an event as an enabled event.
StateMachineInputMode
 Inherited
isMutexAquiredEvent(evt:Event):Boolean
Method that identifies an event as a mutexAquired event.
StateMachineInputMode
 Inherited
isMutexLostEvent(evt:Event):Boolean
Method that identifies an event as a mutexLost event.
StateMachineInputMode
 Inherited
isStopEvent(evt:Event):Boolean
Method that identifies an event as a stop event.
StateMachineInputMode
  
isValidBegin(e:Event):Boolean
Called to determine whether it is valid to begin the gesture.
ResizeStripeInputMode
 Inherited
Called when the cancel state has been entered.
StateMachineInputMode
 Inherited
onDisable():void
Runs the state machine using a disable event.
StateMachineInputMode
 Inherited
onDisabled():void
Called when the enabled property changes to false.
AbstractConcurrentInputMode
  
Callback triggered when the drag has been canceled.
ResizeStripeInputMode
  
Callback triggered once the drag has been finalized.
ResizeStripeInputMode
  
Callback triggered when the drag is initialized and has started.
ResizeStripeInputMode
  
Callback triggered when the user starts dragging.
ResizeStripeInputMode
 Inherited
onEnable():void
Runs the state machine using a enable event.
StateMachineInputMode
 Inherited
onEnabled():void
Called when the enabled property changes to true.
AbstractConcurrentInputMode
 Inherited
StateMachineInputMode
 Inherited
[override] Runs the state machine using a mutex obtained event.
StateMachineInputMode
 Inherited
[override] Runs the state machine using a mutex lost event.
StateMachineInputMode
 Inherited
onPreferredCursorChanged(oldValue:Cursor, newValue:Cursor):void
Called when the preferredCursor property changes.
AbstractConcurrentInputMode
 Inherited
onRun(evt:Event):void
Callback method that will be called after the state machine has been run using the arguments provided.
StateMachineInputMode
 Inherited
Called when the cancel state has been entered.
StateMachineInputMode
 Inherited
Releases the mutex that is currently owned by this instance.
AbstractConcurrentInputMode
 Inherited
Requests the InputMutex from the current controller.
AbstractConcurrentInputMode
 Inherited
StateMachineInputMode
 Inherited
setPreferredCursorTransition(cursorClass:Class):Function
Factory method that can be used to obtain an listener implementation that sets the given preferredCursor.
StateMachineInputMode
 Inherited
Factory method that can be used to obtain a listener implementation that resets the preferredCursor.
StateMachineInputMode
  
[override] Uninstalls this mode from the canvas.
ResizeStripeInputMode
 Inherited
Uninstalls all listeners, this instance has installed on calling intallListeners()
StateMachineInputMode
Events
 Event Summary Defined By
  Dispatched when the drag has been canceled.ResizeStripeInputMode
  Dispatched when the drag has been finished.ResizeStripeInputMode
  Dispatched when the drag is initialized and has started.ResizeStripeInputMode
  Dispatched when the drag has started.ResizeStripeInputMode
 InheritedDispatched after the input mode was installed.AbstractInputMode
 InheritedDispatched before the input mode will be installed.AbstractInputMode
 InheritedDispatched when the default cursor changed.AbstractConcurrentInputMode
 InheritedDispatched after the input mode was uninstalled.AbstractInputMode
 InheritedDispatched before the input mode will be uninstalled.AbstractInputMode
Public Constants
 ConstantDefined By
 InheritedINSTALLED : String = installed
[static]
AbstractInputMode
 InheritedINSTALLING : String = installing
[static]
AbstractInputMode
  POLICY_CONSIDER_CONTENT : String = ConsiderContent
[static] Describes the policy to use when resizing stripes: Stripes can't be made smaller than their content nodes.
ResizeStripeInputMode
  POLICY_IGNORE_CONTENT : String = IgnoreContent
[static] Describes the policy to use when resizing stripes: Stripe content is ignored when resizing.
ResizeStripeInputMode
 InheritedPREFERRED_CURSOR_CHANGED : String = preferredCursorChanged
[static]
AbstractConcurrentInputMode
 InheritedUNINSTALLED : String = uninstalled
[static]
AbstractInputMode
 InheritedUNINSTALLING : String = uninstalling
[static]
AbstractInputMode
Property Detail
cancelRecognizerproperty
cancelRecognizer:Function

The "cancel" recognizer.

This recognizer recognizes a cancel action during the resize operation.


Implementation
    public function get cancelRecognizer():Function
    public function set cancelRecognizer(value:Function):void
draggedRecognizerproperty 
draggedRecognizer:Function

The "dragged" recognizer.

This recognizer instance determines when the user is dragging the mouse to resize the stripe.


Implementation
    public function get draggedRecognizer():Function
    public function set draggedRecognizer(value:Function):void
ignoreContentRecognizerproperty 
ignoreContentRecognizer:Function

The recognizer that changes the behaviour to ignore the content of all stripes instead of moving them or considering for minimum sizes.

If this recognizer recognizes its gesture, the behavior will be to completely ignore all stripe contents.


Implementation
    public function get ignoreContentRecognizer():Function
    public function set ignoreContentRecognizer(value:Function):void
pressedRecognizerproperty 
pressedRecognizer:Function

The "pressed" state recognizer.

This recognizer instance will be used to determine when the user begins to resize the stripe.


Implementation
    public function get pressedRecognizer():Function
    public function set pressedRecognizer(value:Function):void
releasedRecognizerproperty 
releasedRecognizer:Function

The "released" recognizer.

This instance determines when the user has finished the resize operation.


Implementation
    public function get releasedRecognizer():Function
    public function set releasedRecognizer(value:Function):void
resizeNeighborsRecognizerproperty 
resizeNeighborsRecognizer:Function

The recognizer that changes the behaviour to resize adjacent stripes instead of moving them.

If this recognizer recognizes its gesture, the behavior will be to resize adjacent stripes instead of moving them (which is the default).


Implementation
    public function get resizeNeighborsRecognizer():Function
    public function set resizeNeighborsRecognizer(value:Function):void
Constructor Detail
ResizeStripeInputMode()Constructor
public function ResizeStripeInputMode()

Creates a new instance of this input mode.

Method Detail
createResizeVisualization()method
protected function createResizeVisualization(tableItem:IStripe, ctx:IInputModeContext):IDisplayObjectCreator

Creates the resize visualization.

Parameters

tableItem:IStripe — The table item to resize.
 
ctx:IInputModeContext — The current input mode context.

Returns
IDisplayObjectCreator — A display object creator that visualizes the resize gesture.
initializeStateMachine()method 
override protected function initializeStateMachine(machine:StateMachine, startState:State, canceledState:State, stoppedState:State, finishedState:State):void

Called to initialize the state machine.

This implementation does nothing.

Parameters

machine: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.

isValidBegin()method 
protected function isValidBegin(e:Event):Boolean

Called to determine whether it is valid to begin the gesture.

This implementation checks whether a stripe border has been hit at the current mouse position.

Parameters

e:Event — The event to test.

Returns
Booleantrue iff a stripe border has been hit at the last mouse location.
onDragCanceled()method 
protected function onDragCanceled():void

Callback triggered when the drag has been canceled.

This method dispatches the dragCanceled event.

onDragFinished()method 
protected function onDragFinished():void

Callback triggered once the drag has been finalized.

This method dispatches the dragFinished event.

onDragStarted()method 
protected function onDragStarted():void

Callback triggered when the drag is initialized and has started.

This method dispatches the dragStarted event.

onDragStarting()method 
protected function onDragStarting():void

Callback triggered when the user starts dragging.

This method dispatches the dragStarting event.

uninstallCore()method 
override protected function uninstallCore(context:IInputModeContext):void

Uninstalls this mode from the canvas.

Subclasses should always call super.uninstallCore( canvas ) as the last statement. This implementation calls uninstallListeners.

Parameters

context:IInputModeContext — The canvas component to uninstall this input mode from.

Event Detail
dragCanceled Event
Event Object Type: com.yworks.canvas.input.DragEvent
DragEvent.type property = com.yworks.canvas.input.DragEvent.DRAG_CANCELED

Dispatched when the drag has been canceled.

dragFinished Event  
Event Object Type: com.yworks.canvas.input.DragEvent
DragEvent.type property = com.yworks.canvas.input.DragEvent.DRAG_FINISHED

Dispatched when the drag has been finished.

dragStarted Event  
Event Object Type: com.yworks.canvas.input.DragEvent
DragEvent.type property = com.yworks.canvas.input.DragEvent.DRAG_STARTED

Dispatched when the drag is initialized and has started.

dragStarting Event  
Event Object Type: com.yworks.canvas.input.DragEvent
DragEvent.type property = com.yworks.canvas.input.DragEvent.DRAG_STARTING

Dispatched when the drag has started.

Constant Detail
POLICY_CONSIDER_CONTENTConstant
public static const POLICY_CONSIDER_CONTENT:String = ConsiderContent

Describes the policy to use when resizing stripes: Stripes can't be made smaller than their content nodes.

POLICY_IGNORE_CONTENTConstant 
public static const POLICY_IGNORE_CONTENT:String = IgnoreContent

Describes the policy to use when resizing stripes: Stripe content is ignored when resizing.