Packagecom.yworks.graph.input
Classpublic class TableEditorInputMode
InheritanceTableEditorInputMode Inheritance MultiplexingInputMode Inheritance AbstractConcurrentInputMode Inheritance AbstractInputMode Inheritance flash.events.EventDispatcher

Input mode that can be used to interactively edit a table.

This mode can either be used as a stand alone input mode, or as a child mode of GraphEditorInputMode. In that case, some child modes of this implementation are disabled:

In addition, the StripeSelection is optionally synchronized with the GraphEditorInputMode.graphSelection.

See also

GraphEditorInputMode
StripeSelection
ITable


Public Properties
 PropertyDefined By
  autoRemoveEmptyLabels : Boolean
Whether this mode should automatically remove labels from the table when a label text has been edited and the label text is empty.
TableEditorInputMode
 Inheritedcanvas : CanvasComponent
[read-only] The canvas instance this mode is currently installed in or null
AbstractInputMode
  clickInputMode : ClickInputMode
The ClickInputMode.
TableEditorInputMode
  clickModePriority : int
The priority of the ClickInputMode.
TableEditorInputMode
  clickSelectableItems : uint
Gets or set a property that determines which types of items should be selectable at through mouse clicks.
TableEditorInputMode
  clickSelectableRegions : StripeSubregion
Determines on which StripeSubregion(s) a click should toggle a stripe selection state.
TableEditorInputMode
 Inheritedcontroller : ConcurrencyController
Gets or injects the ConcurrencyController for this instance.
AbstractConcurrentInputMode
 InheriteddefaultCursor : Cursor
The default cursor which is displayed if the active input mode does not have a preferred cursor.
MultiplexingInputMode
  deletableItems : uint
Determines which types of items may be deleted using the deleteSelection method or by pressing the Delete key.
TableEditorInputMode
  deleteCommandRecognizer : Function
Event recognizer for stripe deletion.
TableEditorInputMode
  editLabelCommandRecognizer : Function
Event recognizer for label editing.
TableEditorInputMode
 Inheritedenabled : Boolean
Gets or sets the enabled state of this input mode.
AbstractConcurrentInputMode
 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
  keyboardInputMode : KeyboardInputMode
The keyboard input mode.
TableEditorInputMode
  keyboardModePriority : int
The keyboard mode priority.
TableEditorInputMode
  labelEditableItems : uint
Determines which types of items may have their labels edited.
TableEditorInputMode
  labelEditingAllowed : Boolean
The LabelEditingAllowed property that determines whether the label editor will be automatically invoked if the F2 key is pressed.
TableEditorInputMode
  multiSelectionRecognizer : Function
The event recognizer function that will be queried to decide if a click is deemed a multi selection gesture.
TableEditorInputMode
 InheritedpreferredCursor : Cursor
Gets or sets the cursor this mode would like to have displayed in the CanvasComponent.
AbstractConcurrentInputMode
  reparentStripeHandler : IReparentStripeHandler
The ReparentNodeHandler to use for reparenting.
TableEditorInputMode
  reparentStripeInputMode : ReparentStripeInputMode
The ReparentStripeInputMode that is used to change a stripe's position in the table hierarchy.
TableEditorInputMode
  reparentStripeModePriority : int
The priority for the reparentStripeInputMode.
TableEditorInputMode
  resizeStripeInputMode : ResizeStripeInputMode
The ResizeStripeInputMode that is used to change the size of a stripe interactively.
TableEditorInputMode
  resizeStripeModePriority : int
The priority of the ResizeStripeInputMode.
TableEditorInputMode
  selectableItems : uint
Gets or set a property that determines which types of items should be selectable at all.
TableEditorInputMode
  selectAllCommand : Function
Event recognizer for selecting all stripes.
TableEditorInputMode
  stripeDropInputMode : StripeDropInputMode
The StripeDropInputMode that is used to handle drag and drop operations of stripes onto the canvas.
TableEditorInputMode
  stripeDropModePriority : int
The priority for the reparentStripeInputMode.
TableEditorInputMode
  stripeSelection : IStripeSelection
[read-only] Returns the MainInputMode.selectionModel as an IStripeSelection.
TableEditorInputMode
  synchronizeWithGraphSelection : Boolean
Whether stripeSelection should be synchronized with the GraphEditorInputMode.graphSelection if this instance is installed as a child of a GraphEditorInputMode instance.
TableEditorInputMode
  textEditorInputMode : TextEditorInputMode
The text editor input mode.
TableEditorInputMode
  textEditorModePriority : int
The priority of the TextEditorInputMode.
TableEditorInputMode
Protected Properties
 PropertyDefined By
 InheritedchildController : ConcurrencyController
[read-only] The ConcurrencyController that is used to manage the concurrency of the child input modes.
MultiplexingInputMode
Public Methods
 MethodDefined By
  
Creates a new instance.
TableEditorInputMode
 Inherited
add(inputMode:IInputMode, priority:int = 0):void
Adds an input mode using the given priority to this compound mode.
MultiplexingInputMode
 Inherited
addConcurrent(inputMode:IConcurrentInputMode, priority:int):void
Adds an input mode as a concurrent mode using the given priority to this compound mode.
MultiplexingInputMode
 Inherited
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
 Inherited
cancel():void
[override] Cancels all modes.
MultiplexingInputMode
  
Clears the current selection.
TableEditorInputMode
 Inherited
Callback that creates the IInputModeContext for the child modes of this mode.
MultiplexingInputMode
  
createLabel(stripe:IStripe):void
Interactively creates a new label for the provided stripe.
TableEditorInputMode
  
This method deletes the currently selected stripes.
TableEditorInputMode
  
Deletes a single stripe.
TableEditorInputMode
 Inherited
dispose():void
Disposes this input mode.
AbstractInputMode
  
editLabel(label:ILabel):void
Triggers the editing of the given label.
TableEditorInputMode
  
findStripe(x:Number, y:Number, stripeTypes:uint, subregions:StripeSubregion = null, predicate:Function = null):StripeSubregionDescriptor
Used as a callback to find the item underneath certain coordinates.
TableEditorInputMode
  
findStripes(x:Number, y:Number, stripeTypes:uint, subregions:StripeSubregion = null, predicate:Function = null):Iterable
Used as a callback to find the items underneath certain coordinates.
TableEditorInputMode
  
Convenience method which retrieves the node which is associated with the given table.
TableEditorInputMode
  
Convenience method which retrieves the node which is associated with the given stripe's table.
TableEditorInputMode
 Inherited
Finds the IConcurrentInputMode that currently owns the mutex or null.
MultiplexingInputMode
  
insertChild(owner:IStripe, index:int, size:Number = -1):IStripe
Convenience method that inserts a new stripe as child of the given owner.
TableEditorInputMode
 Inherited
Installs this mode into the canvas of the given context.
AbstractInputMode
 Inherited
remove(mode:IInputMode):void
Removes the given mode from this compound mode.
MultiplexingInputMode
  
selectAll():void
Clears the current selection and selects all stripes in all table instances.
TableEditorInputMode
  
setLabelText(label:ILabel, text:String):void
Sets the label's text after it has been edited using editLabel.
TableEditorInputMode
 Inherited
Returns a list of all modes managed by this instance in sorted order.
MultiplexingInputMode
 Inherited
stop():Boolean
[override] Tries to stop all modes.
MultiplexingInputMode
 Inherited
Uninstalls this mode from the canvas.
AbstractInputMode
Protected Methods
 MethodDefined By
 Inherited
canRequestMutex():Boolean
Determines whether this instance can request the InputMutex.
AbstractConcurrentInputMode
  
childInputModeContextLookup(type:Class):Object
[override]
TableEditorInputMode
 Inherited
Create the ConcurrencyController that is used to manage the concurrency of the child input modes.
MultiplexingInputMode
  
Factory method that creates the click input mode instance.
TableEditorInputMode
  
Factory method that creates the keyboard input mode instance.
TableEditorInputMode
  
Factory method for the reparentStripeHandler property.
TableEditorInputMode
  
Factory method that creates the reparentStripeInputMode lazily the first time the property is accessed.
TableEditorInputMode
  
Factory method that creates the stripeDropInputMode lazily the first time the property is accessed.
TableEditorInputMode
  
Create a new instance of IStripeSelection the first time property stripeSelection is accessed.
TableEditorInputMode
  
Factory method for the TextEditorInputMode property.
TableEditorInputMode
  
doDeleteCommand(evt:Event):void
Called when the KeyboardInputMode has recognized the event which triggers deletion.
TableEditorInputMode
  
doEditLabelCommand(evt:Event):void
Called when the KeyboardInputMode has recognized the event which triggers label editing.
TableEditorInputMode
  
doSelectAllCommand(evt:Event):void
Called when the KeyboardInputMode has recognized the event which triggers selection of all stripes.
TableEditorInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
AbstractInputMode
 Inherited
hasMutex():Boolean
Determines whether this instance owns the input mutex.
AbstractConcurrentInputMode
  
initialize():void
[override]
TableEditorInputMode
  
[override]
TableEditorInputMode
 Inherited
invalidate():void
Convenience method for subclass implementations that invalidates the canvasComponent this mode is currently installed in.
AbstractInputMode
  
onClickInputModeChanged(oldClickInputMode:ClickInputMode, newClickInputMode:ClickInputMode):void
Called when the clickInputMode property value changes and after initialization of the field.
TableEditorInputMode
  
Callback that gets triggered once clickInputMode triggers the ClickEvent.CLICKED event.
TableEditorInputMode
  
Called after a stripe has been deleted.
TableEditorInputMode
  
Called before a stripe will be deleted.
TableEditorInputMode
 Inherited
onDisabled():void
[override] Called when the AbstractConcurrentInputMode.enabled property changes to false.
MultiplexingInputMode
  
Callback that is invoked if the F2 key is pressed and labelEditingAllowed is set to true.
TableEditorInputMode
 Inherited
onEnabled():void
[override] Called when the AbstractConcurrentInputMode.enabled property changes to true.
MultiplexingInputMode
  
onKeyboardInputModeChanged(oldKeyboardInputMode:KeyboardInputMode, newKeyboardInputMode:KeyboardInputMode):void
Called when the keyboard input mode changed.
TableEditorInputMode
  
onLabelAdded(label:ILabel):void
Dispatches the GraphEditorEvent.LABEL_CREATED event.
TableEditorInputMode
 Inherited
Called when this instance obtains the InputMutex.
AbstractConcurrentInputMode
 Inherited
Called when this instance released the InputMutex.
AbstractConcurrentInputMode
 Inherited
onPreferredCursorChanged(oldValue:Cursor, newValue:Cursor):void
Called when the preferredCursor property changes.
AbstractConcurrentInputMode
  
onReparentStripeHandlerChanged(oldReparentStripeHandler:IReparentStripeHandler, newReparentStripeHandler:IReparentStripeHandler):void
Called when the reparentStripeHandler property value changes and after initialization of the field.
TableEditorInputMode
  
onReparentStripeInputModeChanged(oldReparentStripeInputMode:ReparentStripeInputMode, newReparentStripeInputMode:ReparentStripeInputMode):void
Called when the reparentStripeInputMode property value changes and after initialization of the field.
TableEditorInputMode
  
onResizeStripeInputModeChanged(oldResizeStripeInputMode:ResizeStripeInputMode, newResizeStripeInputMode:ResizeStripeInputMode):void
Called when the resizeStripeInputMode property value changes and after initialization of the field.
TableEditorInputMode
  
onStripeDropInputModeChanged(oldStripeDropInputMode:StripeDropInputMode, newStripeDropInputMode:StripeDropInputMode):void
Called when the stripeDropInputMode property value changes and after initialization of the field.
TableEditorInputMode
  
onTextEditorInputModeChanged(oldTextEditorInputMode:TextEditorInputMode, newTextEditorInputMode:TextEditorInputMode):void
Called when the textEditorInputMode property value changes and after initialization of the field.
TableEditorInputMode
  
Called when a label's text was edited by the TextEditorInputMode
TableEditorInputMode
  
Called when text editing was cancelled by the TextEditorInputMode.
TableEditorInputMode
 Inherited
Releases the mutex that is currently owned by this instance.
AbstractConcurrentInputMode
 Inherited
Potentially replaces the reported by the current owner's preferredCursor property before it is set on the canvas.
MultiplexingInputMode
 Inherited
Requests the InputMutex from the current controller.
AbstractConcurrentInputMode
  
Callback predicate method that is used by onClickInputModeClicked to determine whether the given item can be click selected.
TableEditorInputMode
  
shouldBeDeleted(item:IStripe):Boolean
TableEditorInputMode
  
Callback method that determines whether the label or the labels of the provided item should be edited in response to onEditLabel.
TableEditorInputMode
  
[override]
TableEditorInputMode
Events
 Event Summary Defined By
  Dispatched when a stripe will be deleted by the user.TableEditorInputMode
 InheritedDispatched after the input mode was installed.AbstractInputMode
 InheritedDispatched before the input mode will be installed.AbstractInputMode
  Dispatched when a label is edited by the user (after pressing F2 key).TableEditorInputMode
  Dispatched when a label is added by the user (after pressing F2 key).TableEditorInputMode
 InheritedDispatched when the default cursor changed.AbstractConcurrentInputMode
  Dispatched when a stripe has been deleted by the user.TableEditorInputMode
 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
 InheritedPREFERRED_CURSOR_CHANGED : String = preferredCursorChanged
[static]
AbstractConcurrentInputMode
 InheritedUNINSTALLED : String = uninstalled
[static]
AbstractInputMode
 InheritedUNINSTALLING : String = uninstalling
[static]
AbstractInputMode
Property Detail
autoRemoveEmptyLabelsproperty
autoRemoveEmptyLabels:Boolean

Whether this mode should automatically remove labels from the table when a label text has been edited and the label text is empty.

If the TableEditorInputMode instance is installed as child mode of a GraphEditorInputMode instance, empty labels will only be removed if this value and the value of GraphEditorInputMode.autoRemoveEmptyLabels are both set to true.

The default value is true.


Implementation
    public function get autoRemoveEmptyLabels():Boolean
    public function set autoRemoveEmptyLabels(value:Boolean):void
clickInputModeproperty 
clickInputMode:ClickInputMode

The ClickInputMode.

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.

If the parent TableEditorInputMode instance is installed as child mode of a GraphEditorInputMode instance, this mode is not used, since all work is delegated to the parent's click input mode instance. This implies that all modifications made to the property value have no effect as long as the parent mode is child of a GraphEditorInputMode instance.


Implementation
    public function get clickInputMode():ClickInputMode
    public function set clickInputMode(value:ClickInputMode):void

Throws
flash.errors:IllegalOperationError — If an attempt is made to change the instance while this mode is installed. To exchange a mode, first uninstall, then reinstall to ensure that all data is initialized correctly.
clickModePriorityproperty 
clickModePriority:int

The priority of the ClickInputMode.

The default value is 0.


Implementation
    public function get clickModePriority():int
    public function set clickModePriority(value:int):void
clickSelectableItemsproperty 
clickSelectableItems:uint

Gets or set a property that determines which types of items should be selectable at through mouse clicks.

The default value is StripeTypes.ALL.


Implementation
    public function get clickSelectableItems():uint
    public function set clickSelectableItems(value:uint):void

See also

clickSelectableRegionsproperty 
clickSelectableRegions:StripeSubregion

Determines on which StripeSubregion(s) a click should toggle a stripe selection state.

This is independent to clickSelectableItems. By default, only clicks on a stripe StripeSubregion.HEADER are handled.


Implementation
    public function get clickSelectableRegions():StripeSubregion
    public function set clickSelectableRegions(value:StripeSubregion):void
deletableItemsproperty 
deletableItems:uint

Determines which types of items may be deleted using the deleteSelection method or by pressing the Delete key.

The default value is StripeTypes.ALL.


Implementation
    public function get deletableItems():uint
    public function set deletableItems(value:uint):void

See also

deleteCommandRecognizerproperty 
deleteCommandRecognizer:Function

Event recognizer for stripe deletion.

This is a Function with the signature function(event:Event):Boolean which returns true if event should trigger the desired action.

This implementation returns a function which returns true if Delete is pressed without any modifier.

The default value is EventRecognizers.DELETE_PRESSED.


Implementation
    public function get deleteCommandRecognizer():Function
    public function set deleteCommandRecognizer(value:Function):void

See also

editLabelCommandRecognizerproperty 
editLabelCommandRecognizer:Function

Event recognizer for label editing.

This is a Function with the signature function(event:Event):Boolean which returns true if event should trigger the desired action.

This implementation returns a function which returns true if F2 is pressed without any modifier.

The default value is EventRecognizers.F2_PRESSED.


Implementation
    public function get editLabelCommandRecognizer():Function
    public function set editLabelCommandRecognizer(value:Function):void

See also

keyboardInputModeproperty 
keyboardInputMode:KeyboardInputMode

The keyboard input mode.

If the field has not yet been initialized upon first access, the factory method createKeyboardInputMode will be called. Upon change the onKeyboardInputModeChanged method will be called. If the parent TableEditorInputMode instance is installed as child mode of a GraphEditorInputMode instance, this mode is not used, since all work is delegated to the parent's keyboardInputMode instance. This implies that all modifications made to the property value have no effect as long as the parent mode is child of a GraphEditorInputMode instance.


Implementation
    public function get keyboardInputMode():KeyboardInputMode
    public function set keyboardInputMode(value:KeyboardInputMode):void

Throws
flash.errors:IllegalOperationError — If an attempt is made to change the instance while this mode is installed. To exchange a mode, first uninstall, then then reinstall to ensure that all data is initialized correctly.
keyboardModePriorityproperty 
keyboardModePriority:int

The keyboard mode priority.

The default value is 0.


Implementation
    public function get keyboardModePriority():int
    public function set keyboardModePriority(value:int):void
labelEditableItemsproperty 
labelEditableItems:uint

Determines which types of items may have their labels edited.

One or a bitwise combination of the constants defined in GraphItemTypes.

The default is StripeTypes.COLUMN | StripeTypes.ROW which allows for editing the labels of labeled items.


Implementation
    public function get labelEditableItems():uint
    public function set labelEditableItems(value:uint):void

See also

labelEditingAllowedproperty 
labelEditingAllowed:Boolean

The LabelEditingAllowed property that determines whether the label editor will be automatically invoked if the F2 key is pressed.

If the TableEditorInputMode instance is installed as child mode of a GraphEditorInputMode instance, label editing on a table is only allowed if this value and the value of GraphEditorInputMode.autoRemoveEmptyLabels are both set to true. If this flag is set to true pressing F2 will start the label editor.

The default value is true.


Implementation
    public function get labelEditingAllowed():Boolean
    public function set labelEditingAllowed(value:Boolean):void

See also

multiSelectionRecognizerproperty 
multiSelectionRecognizer:Function

The event recognizer function that will be queried to decide if a click is deemed a multi selection gesture.

An event recognizer function takes an Event as its only argument and returns a Boolean that indicates whether the event was recognized.

The default implementation will recognize events of type com.yworks.canvas.input.ClickEvent, if the ctrl key was pressed.


Implementation
    public function get multiSelectionRecognizer():Function
    public function set multiSelectionRecognizer(value:Function):void
reparentStripeHandlerproperty 
reparentStripeHandler:IReparentStripeHandler

The ReparentNodeHandler to use for reparenting.

This handler will be delegated to by an implementation of the IReparentStripeHandler interface that this class puts into the childInputModeContextLookup.

If the field has not yet been initialized upon first access, the factory method createReparentStripeHandler() will be called. Upon change the onReparentStripeHandlerChanged() method will be called.


Implementation
    public function get reparentStripeHandler():IReparentStripeHandler
    public function set reparentStripeHandler(value:IReparentStripeHandler):void

See also

reparentStripeInputModeproperty 
reparentStripeInputMode:ReparentStripeInputMode

The ReparentStripeInputMode that is used to change a stripe's position in the table hierarchy.

The mode by default is enabled with a priority of resizeStripeModePriority. If the field has not yet been initialized upon first access, the factory method createReparentStripeInputMode() will be called. Upon change the onReparentStripeInputModeChanged() method will be called.


Implementation
    public function get reparentStripeInputMode():ReparentStripeInputMode
    public function set reparentStripeInputMode(value:ReparentStripeInputMode):void

Throws
flash.errors:IllegalOperationError — If an attempt is made to change the instance while this mode is installed. To exchange a mode, first uninstall, then reinstall to ensure that all data is initialized correctly.

See also

reparentStripeModePriorityproperty 
reparentStripeModePriority:int

The priority for the reparentStripeInputMode.

The default value is 0.


Implementation
    public function get reparentStripeModePriority():int
    public function set reparentStripeModePriority(value:int):void

See also

resizeStripeInputModeproperty 
resizeStripeInputMode:ResizeStripeInputMode

The ResizeStripeInputMode that is used to change the size of a stripe interactively.

The mode by default is enabled with a priority of resizeStripeInputModePriority. If the field has not yet been initialized upon first access, the factory method createResizeStripeInputMode() will be called. Upon change the onResizeStripeInputModeChanged() method will be called.


Implementation
    public function get resizeStripeInputMode():ResizeStripeInputMode
    public function set resizeStripeInputMode(value:ResizeStripeInputMode):void

Throws
flash.errors:IllegalOperationError — If an attempt is made to change the instance while this mode is installed. To exchange a mode, first uninstall, then reinstall to ensure that all data is initialized correctly.
resizeStripeModePriorityproperty 
resizeStripeModePriority:int

The priority of the ResizeStripeInputMode.

The default value is 0.


Implementation
    public function get resizeStripeModePriority():int
    public function set resizeStripeModePriority(value:int):void
selectableItemsproperty 
selectableItems:uint

Gets or set a property that determines which types of items should be selectable at all.

The default value is StripeTypes.ALL.


Implementation
    public function get selectableItems():uint
    public function set selectableItems(value:uint):void

See also

selectAllCommandproperty 
selectAllCommand:Function

Event recognizer for selecting all stripes.

This is a Function with the signature function(event:Event):Boolean which returns true if event should trigger the desired action.

This implementation returns a function which returns true if Ctrl+A is pressed.

The default value is EventRecognizers.CTRL_A_PRESSED.


Implementation
    public function get selectAllCommand():Function
    public function set selectAllCommand(value:Function):void

See also

stripeDropInputModeproperty 
stripeDropInputMode:StripeDropInputMode

The StripeDropInputMode that is used to handle drag and drop operations of stripes onto the canvas.

The mode by default is disabled and need to be enabled to work, first.. If the field has not yet been initialized upon first access, the factory method createStripeDropInputMode() will be called. Upon change the onStripeDropInputModeChanged() method will be called.


Implementation
    public function get stripeDropInputMode():StripeDropInputMode
    public function set stripeDropInputMode(value:StripeDropInputMode):void

Throws
flash.errors:IllegalOperationError — If an attempt is made to change the instance while this mode is installed. To exchange a mode, first uninstall, then reinstall to ensure that all data is initialized correctly.

See also

stripeDropModePriorityproperty 
stripeDropModePriority:int

The priority for the reparentStripeInputMode.

The default value is 70.


Implementation
    public function get stripeDropModePriority():int
    public function set stripeDropModePriority(value:int):void

See also

stripeSelectionproperty 
stripeSelection:IStripeSelection  [read-only]

Returns the MainInputMode.selectionModel as an IStripeSelection.


Implementation
    public function get stripeSelection():IStripeSelection
synchronizeWithGraphSelectionproperty 
synchronizeWithGraphSelection:Boolean

Whether stripeSelection should be synchronized with the GraphEditorInputMode.graphSelection if this instance is installed as a child of a GraphEditorInputMode instance.

The default value is true.


Implementation
    public function get synchronizeWithGraphSelection():Boolean
    public function set synchronizeWithGraphSelection(value:Boolean):void

See also

textEditorInputModeproperty 
textEditorInputMode:TextEditorInputMode

The text editor input mode.

If the field has not yet been initialized upon first access, the factory method createTextEditorInputMode will be called. Upon change the onTextEditorInputModeChanged() method will be called. If the parent TableEditorInputMode instance is installed as child mode of a GraphEditorInputMode instance, this mode is not used, since all work is delegated to the parent's GraphEditorInputMode.textEditorInputMode instance. This implies that all modifications made to the property value have no effect as long as the parent mode is child of a GraphEditorInputMode instance.


Implementation
    public function get textEditorInputMode():TextEditorInputMode
    public function set textEditorInputMode(value:TextEditorInputMode):void

Throws
flash.errors:IllegalOperationError — If an attempt is made to change the instance while this mode is installed. To exchange a mode, first uninstall then reinstall this mode to ensure that all data is initialized correctly.
textEditorModePriorityproperty 
textEditorModePriority:int

The priority of the TextEditorInputMode.

The default value is 100.


Implementation
    public function get textEditorModePriority():int
    public function set textEditorModePriority(value:int):void
Constructor Detail
TableEditorInputMode()Constructor
public function TableEditorInputMode()

Creates a new instance.

Method Detail
childInputModeContextLookup()method
override protected function childInputModeContextLookup(type:Class):Object

Parameters

type:Class

Returns
Object
clearSelection()method 
public function clearSelection():void

Clears the current selection.

createClickInputMode()method 
protected function createClickInputMode():ClickInputMode

Factory method that creates the click input mode instance.

Returns
ClickInputMode — The newly created click input mode.
createKeyboardInputMode()method 
protected function createKeyboardInputMode():KeyboardInputMode

Factory method that creates the keyboard input mode instance.

Returns
KeyboardInputMode — A newly generated keyboard input mode instance.
createLabel()method 
public function createLabel(stripe:IStripe):void

Interactively creates a new label for the provided stripe.

This method will invoke the text editor that will let the user edit the text of the label. If the user commits the label text the label will be added to the labeled item.

Parameters

stripe:IStripe — The item to create a new label for.

createReparentStripeHandler()method 
protected function createReparentStripeHandler():IReparentStripeHandler

Factory method for the reparentStripeHandler property. This method will be called upon first access to that property.

Returns
IReparentStripeHandler — A new instance of ReparentStripeHandler
createReparentStripeInputMode()method 
protected function createReparentStripeInputMode():ReparentStripeInputMode

Factory method that creates the reparentStripeInputMode lazily the first time the property is accessed.

Returns
ReparentStripeInputMode — A plain new instance of the ReparentStripeInputMode type, which is initially enabled.

See also

createStripeDropInputMode()method 
protected function createStripeDropInputMode():StripeDropInputMode

Factory method that creates the stripeDropInputMode lazily the first time the property is accessed.

Returns
StripeDropInputMode — A plain new instance of the StripeDropInputMode type, which is initially disabled.

See also

createStripeSelection()method 
protected function createStripeSelection():IStripeSelection

Create a new instance of IStripeSelection the first time property stripeSelection is accessed.

By default, the IStripeSelection.mixedSelectionAllowed property is false.

Returns
IStripeSelection — A new IStripeSelection instance.
createTextEditorInputMode()method 
protected function createTextEditorInputMode():TextEditorInputMode

Factory method for the TextEditorInputMode property.

This method will be called upon first access to the TextEditorInputMode property.

Returns
TextEditorInputMode — A new instance of TextEditorInputMode
deleteSelection()method 
public function deleteSelection():void

This method deletes the currently selected stripes.

For each selected item a GraphEditorEvent.DELETING_STRIPE event is dispatched before it is deleted. After the item has been deleted a GraphEditorEvent.STRIPE_DELETED event is dispatched.

deleteStripe()method 
public function deleteStripe(item:IStripe):void

Deletes a single stripe.

Parameters

item:IStripe — The stripe to delete.

doDeleteCommand()method 
protected function doDeleteCommand(evt:Event):void

Called when the KeyboardInputMode has recognized the event which triggers deletion.

Parameters

evt:Event

See also

doEditLabelCommand()method 
protected function doEditLabelCommand(evt:Event):void

Called when the KeyboardInputMode has recognized the event which triggers label editing.

Parameters

evt:Event

See also

doSelectAllCommand()method 
protected function doSelectAllCommand(evt:Event):void

Called when the KeyboardInputMode has recognized the event which triggers selection of all stripes.

Parameters

evt:Event

See also

editLabel()method 
public function editLabel(label:ILabel):void

Triggers the editing of the given label.

The label must be bound to an IStripe instance for this call to succeed. This implementation uses the TextEditorInputMode to display an editor to edit the label.

Parameters

label:ILabel — The label to edit.

findStripe()method 
public function findStripe(x:Number, y:Number, stripeTypes:uint, subregions:StripeSubregion = null, predicate:Function = null):StripeSubregionDescriptor

Used as a callback to find the item underneath certain coordinates.

Parameters

x:Number — The x coordinate to test.
 
y:Number — The y coordinate to test.
 
stripeTypes:uint — One of the StripeType constants to specify the stripe type.
 
subregions:StripeSubregion (default = null) — An enumeration value of StripeSubregion to further restrict the stripe region. If none is provided the first hit stripe will be returned, regardless of its sub region.
 
predicate:Function (default = null) — A function with the signature function(descriptor:StripeSubregionDescriptor):Boolean which returns true if the given descriptor describes a valid hit.

Returns
StripeSubregionDescriptor — The stripe subregions that have been found for the location or null.

See also

findStripes()method 
public function findStripes(x:Number, y:Number, stripeTypes:uint, subregions:StripeSubregion = null, predicate:Function = null):Iterable

Used as a callback to find the items underneath certain coordinates.

Parameters

x:Number — The x coordinate to test.
 
y:Number — The y coordinate to test.
 
stripeTypes:uint — One of the StripeType constants to specify the stripe type.
 
subregions:StripeSubregion (default = null) — An enumeration value of StripeSubregion to further restrict the stripe region. If none is provided the first hit stripe will be returned, regardless of its sub region.
 
predicate:Function (default = null) — A function with the signature function(descriptor:StripeSubregionDescriptor):Boolean which returns true if the given descriptor describes a valid hit.

Returns
Iterable — The stripe subregions that have been found for the location or an empty Iterable.

See also

findTableNode()method 
public function findTableNode(table:ITable):INode

Convenience method which retrieves the node which is associated with the given table.

The node can only be retrieved if it is in the graph which is associated with the GraphCanvasComponent this input mode is installed in.

Parameters

table:ITable — The table to get the associated node for.

Returns
INode — The node which is associated with the given table.
findTableNodeForStripe()method 
public function findTableNodeForStripe(stripe:IStripe):INode

Convenience method which retrieves the node which is associated with the given stripe's table.

The node can only be retrieved if it is in the graph which is associated with the GraphCanvasComponent this input mode is installed in.

Parameters

stripe:IStripe — The stripe to get the associated node for.

Returns
INode — The node which is associated with the given stripe's table.
initialize()method 
override protected function initialize():void

insertChild()method 
public function insertChild(owner:IStripe, index:int, size:Number = -1):IStripe

Convenience method that inserts a new stripe as child of the given owner.

Parameters

owner:IStripe — The parent of the new stripe.
 
index:int — The index where to insert the new stripe.
 
size:Number (default = -1) — The initial size of the stripe. If none is provided the default size will be set.

Returns
IStripe — The newly inserted stripe.
installCore()method 
override protected function installCore(context:IInputModeContext):void

Parameters

context:IInputModeContext

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, which may be null the first time.
 
newClickInputMode:ClickInputMode — The new value.

onClickInputModeClicked()method 
protected function onClickInputModeClicked(e:ClickEvent):void

Callback that gets triggered once clickInputMode triggers the ClickEvent.CLICKED event.

Parameters

e:ClickEvent — The click event.

See also

onDeletedItem()method 
protected function onDeletedItem(item:IStripe):void

Called after a stripe has been deleted.

Dispatches the GraphEditorEvent.STRIPE_DELETED event.

Parameters

item:IStripe — The stripe which will be deleted.

onDeletingItem()method 
protected function onDeletingItem(item:IStripe):void

Called before a stripe will be deleted.

Dispatches the GraphEditorEvent.DELETING_STRIPE event.

Parameters

item:IStripe — The stripe which will be deleted.

onEditLabel()method 
protected function onEditLabel():void

Callback that is invoked if the F2 key is pressed and labelEditingAllowed is set to true.

This method determines the label to edit and delegates to editLabel .

onKeyboardInputModeChanged()method 
protected function onKeyboardInputModeChanged(oldKeyboardInputMode:KeyboardInputMode, newKeyboardInputMode:KeyboardInputMode):void

Called when the keyboard input mode changed.

Parameters

oldKeyboardInputMode:KeyboardInputMode — The old keyboard input mode.
 
newKeyboardInputMode:KeyboardInputMode — The new keyboard input mode.

onLabelAdded()method 
protected function onLabelAdded(label:ILabel):void

Dispatches the GraphEditorEvent.LABEL_CREATED event.

Parameters

label:ILabel — The label that has been added.

onReparentStripeHandlerChanged()method 
protected function onReparentStripeHandlerChanged(oldReparentStripeHandler:IReparentStripeHandler, newReparentStripeHandler:IReparentStripeHandler):void

Called when the reparentStripeHandler property value changes and after initialization of the field.

Parameters

oldReparentStripeHandler:IReparentStripeHandler — The old value, which may be null the first time.
 
newReparentStripeHandler:IReparentStripeHandler — The new value.

onReparentStripeInputModeChanged()method 
protected function onReparentStripeInputModeChanged(oldReparentStripeInputMode:ReparentStripeInputMode, newReparentStripeInputMode:ReparentStripeInputMode):void

Called when the reparentStripeInputMode property value changes and after initialization of the field.

Parameters

oldReparentStripeInputMode:ReparentStripeInputMode — The old value, which may be null the first time.
 
newReparentStripeInputMode:ReparentStripeInputMode — The new value.

onResizeStripeInputModeChanged()method 
protected function onResizeStripeInputModeChanged(oldResizeStripeInputMode:ResizeStripeInputMode, newResizeStripeInputMode:ResizeStripeInputMode):void

Called when the resizeStripeInputMode property value changes and after initialization of the field.

Parameters

oldResizeStripeInputMode:ResizeStripeInputMode — The old value, which may be null the first time.
 
newResizeStripeInputMode:ResizeStripeInputMode — The new value.

onStripeDropInputModeChanged()method 
protected function onStripeDropInputModeChanged(oldStripeDropInputMode:StripeDropInputMode, newStripeDropInputMode:StripeDropInputMode):void

Called when the stripeDropInputMode property value changes and after initialization of the field.

Parameters

oldStripeDropInputMode:StripeDropInputMode — The old value, which may be null the first time.
 
newStripeDropInputMode:StripeDropInputMode — The new value.

onTextEditorInputModeChanged()method 
protected function onTextEditorInputModeChanged(oldTextEditorInputMode:TextEditorInputMode, newTextEditorInputMode:TextEditorInputMode):void

Called when the textEditorInputMode property value changes and after initialization of the field.

Parameters

oldTextEditorInputMode:TextEditorInputMode — The old value, which may be null the first time.
 
newTextEditorInputMode:TextEditorInputMode — The new value.

onTextEditorInputModeTextEdited()method 
protected function onTextEditorInputModeTextEdited(evt:Event):void

Called when a label's text was edited by the TextEditorInputMode

Parameters

evt:Event

onTextEditorInputModeTextEditingCanceled()method 
protected function onTextEditorInputModeTextEditingCanceled(evt:Event):void

Called when text editing was cancelled by the TextEditorInputMode.

Parameters

evt:Event

selectAll()method 
public function selectAll():void

Clears the current selection and selects all stripes in all table instances.

By default, this method will be called in response to a Ctrl-A-key press recognized by keyboardInputMode.

setLabelText()method 
public function setLabelText(label:ILabel, text:String):void

Sets the label's text after it has been edited using editLabel.

This method gets called by onTextEditorInputModeTextEdited and depending on autoRemoveEmptyLabels it will either set the label's text or remove it from the graph.

Parameters

label:ILabel — The label to set the text or remove.
 
text:String — The new text.

shouldBeClickSelected()method 
protected function shouldBeClickSelected(item:StripeSubregionDescriptor):Boolean

Callback predicate method that is used by onClickInputModeClicked to determine whether the given item can be click selected.

Parameters

item:StripeSubregionDescriptor — The descriptor of the item which was clicked.

Returns
Booleantrue if the item can be click selected.
shouldBeDeleted()method 
protected function shouldBeDeleted(item:IStripe):Boolean

Parameters

item:IStripe

Returns
Boolean
shouldLabelBeEdited()method 
protected function shouldLabelBeEdited(item:IModelItem):Boolean

Callback method that determines whether the label or the labels of the provided item should be edited in response to onEditLabel.

This implementation returns true if the type of the given item is among the labelEditableItems.

Parameters

item:IModelItem — The item.

Returns
Boolean — Whether to edit the label or the labels for that item.

See also

shouldLabelBeEditedInternal()method 
yworks_internal function shouldLabelBeEditedInternal(item:IModelItem):Boolean

Parameters

item:IModelItem

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

Parameters

context:IInputModeContext

Event Detail
deletingStripe Event
Event Object Type: com.yworks.graph.input.GraphEditorEvent
GraphEditorEvent.type property = com.yworks.graph.input.GraphEditorEvent.DELETING_STRIPE

Dispatched when a stripe will be deleted by the user. The item property of the event contains the stripe which will be deleted.

Dispatched when a stripe of a table node will be deleted by the TableEditorInputMode.
labelChanged Event  
Event Object Type: com.yworks.graph.input.GraphEditorEvent
GraphEditorEvent.type property = com.yworks.graph.input.GraphEditorEvent.LABEL_CHANGED

Dispatched when a label is edited by the user (after pressing F2 key). The item property of the event contains the changed label.

Dispatched when a label has been edited.
labelCreated Event  
Event Object Type: com.yworks.graph.input.GraphEditorEvent
GraphEditorEvent.type property = com.yworks.graph.input.GraphEditorEvent.LABEL_CREATED

Dispatched when a label is added by the user (after pressing F2 key). The item property of the event contains the newly added label.

Dispatched when a new label has been created.
stripeDeleted Event  
Event Object Type: com.yworks.graph.input.GraphEditorEvent
GraphEditorEvent.type property = com.yworks.graph.input.GraphEditorEvent.STRIPE_DELETED

Dispatched when a stripe has been deleted by the user. The item property of the event contains the deleted stripe. Note that at the time this event is dispatched the stripe is no longer part of the table.

Dispatched when a stripe of a table node has been deleted by the TableEditorInputMode.

This event will only be dispatched for stripes which will be deleted by direct user interaction, i.e. which were selected when the delete key was pressed. It will not be dispatched if a stripe is removed because its table is removed.