| Package | com.yworks.graph.input |
| Class | public class TableEditorInputMode |
| Inheritance | TableEditorInputMode MultiplexingInputMode AbstractConcurrentInputMode AbstractInputMode flash.events.EventDispatcher |
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:
clickInputMode
textEditorInputMode
keyboardInputMode
StripeSelection is optionally synchronized with the
GraphEditorInputMode.graphSelection.
See also
| Property | Defined 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 | ||
![]() | canvas : 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 | ||
![]() | 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 | |
| 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 | ||
![]() | enabled : Boolean
Gets or sets the enabled state of this input mode. | AbstractConcurrentInputMode | |
![]() | 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. | 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 | ||
![]() | preferredCursor : 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 | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance. | TableEditorInputMode | ||
![]() | 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 current selection. | TableEditorInputMode | ||
![]() |
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 | ||
deleteSelection():void
This method deletes the currently selected stripes. | TableEditorInputMode | ||
deleteStripe(item:IStripe):void
Deletes a single stripe. | TableEditorInputMode | ||
![]() | dispose():void
Disposes this input mode. | AbstractInputMode | |
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 | ||
![]() |
Finds the IConcurrentInputMode that currently
owns the mutex or null.
| MultiplexingInputMode | |
Convenience method that inserts a new stripe as child of the given owner. | TableEditorInputMode | ||
![]() | install(context:IInputModeContext):void
Installs this mode into the canvas of the given context. | AbstractInputMode | |
![]() | 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 | ||
![]() |
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] | TableEditorInputMode | ||
![]() |
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 | ||
![]() | 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] | TableEditorInputMode | ||
installCore(context:IInputModeContext):void [override] | TableEditorInputMode | ||
![]() | 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. | TableEditorInputMode | ||
onClickInputModeClicked(e:ClickEvent):void
Callback that gets triggered once clickInputMode
triggers the ClickEvent.CLICKED event. | TableEditorInputMode | ||
onDeletedItem(item:IStripe):void
Called after a stripe has been deleted. | TableEditorInputMode | ||
onDeletingItem(item:IStripe):void
Called before a stripe will be deleted. | TableEditorInputMode | ||
![]() | onDisabled():void [override]
Called when the AbstractConcurrentInputMode.enabled property changes to
false. | MultiplexingInputMode | |
onEditLabel():void
Callback that is invoked if the F2 key is pressed and labelEditingAllowed is
set to true. | TableEditorInputMode | ||
![]() | 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 | ||
![]() | 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 | |
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 | ||
onTextEditorInputModeTextEdited(evt:Event):void
Called when a label's text was edited by the TextEditorInputMode
| TableEditorInputMode | ||
onTextEditorInputModeTextEditingCanceled(evt:Event):void
Called when text editing was cancelled by the TextEditorInputMode. | TableEditorInputMode | ||
![]() | 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 | |
shouldBeClickSelected(item:StripeSubregionDescriptor):Boolean
Callback predicate method that is used by onClickInputModeClicked
to determine whether the given item can be click selected. | TableEditorInputMode | ||
shouldBeDeleted(item:IStripe):Boolean | TableEditorInputMode | ||
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. | TableEditorInputMode | ||
uninstallCore(context:IInputModeContext):void [override] | TableEditorInputMode | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when a stripe will be deleted by the user. | TableEditorInputMode | |||
![]() | Dispatched after the input mode was installed. | AbstractInputMode | ||
![]() | Dispatched 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 | |||
![]() | Dispatched when the default cursor changed. | AbstractConcurrentInputMode | ||
| Dispatched when a stripe has been deleted by the user. | TableEditorInputMode | |||
![]() | Dispatched after the input mode was uninstalled. | AbstractInputMode | ||
![]() | Dispatched before the input mode will be uninstalled. | AbstractInputMode | ||
| autoRemoveEmptyLabels | property |
autoRemoveEmptyLabels:BooleanWhether 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.
public function get autoRemoveEmptyLabels():Boolean public function set autoRemoveEmptyLabels(value:Boolean):void| clickInputMode | property |
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.
public function get clickInputMode():ClickInputMode public function set clickInputMode(value:ClickInputMode):voidflash.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.
|
| clickModePriority | property |
clickModePriority:intThe priority of the ClickInputMode.
The default value is 0.
public function get clickModePriority():int public function set clickModePriority(value:int):void| clickSelectableItems | property |
clickSelectableItems:uintGets or set a property that determines which types of items should be selectable at through mouse clicks.
The default value is StripeTypes.ALL.
public function get clickSelectableItems():uint public function set clickSelectableItems(value:uint):voidSee also
| clickSelectableRegions | property |
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.
public function get clickSelectableRegions():StripeSubregion public function set clickSelectableRegions(value:StripeSubregion):void| deletableItems | property |
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.
public function get deletableItems():uint public function set deletableItems(value:uint):voidSee also
| deleteCommandRecognizer | property |
deleteCommandRecognizer:FunctionEvent 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.
public function get deleteCommandRecognizer():Function public function set deleteCommandRecognizer(value:Function):voidSee also
| editLabelCommandRecognizer | property |
editLabelCommandRecognizer:FunctionEvent 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.
public function get editLabelCommandRecognizer():Function public function set editLabelCommandRecognizer(value:Function):voidSee also
| keyboardInputMode | property |
keyboardInputMode:KeyboardInputModeThe 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.
public function get keyboardInputMode():KeyboardInputMode public function set keyboardInputMode(value:KeyboardInputMode):voidflash.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.
|
| keyboardModePriority | property |
keyboardModePriority:intThe keyboard mode priority.
The default value is 0.
public function get keyboardModePriority():int public function set keyboardModePriority(value:int):void| labelEditableItems | property |
labelEditableItems:uintDetermines 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.
public function get labelEditableItems():uint public function set labelEditableItems(value:uint):voidSee also
| labelEditingAllowed | property |
labelEditingAllowed:BooleanThe 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.
public function get labelEditingAllowed():Boolean public function set labelEditingAllowed(value:Boolean):voidSee also
| multiSelectionRecognizer | property |
multiSelectionRecognizer:FunctionThe 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.
public function get multiSelectionRecognizer():Function public function set multiSelectionRecognizer(value:Function):void| reparentStripeHandler | property |
reparentStripeHandler:IReparentStripeHandlerThe 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.
public function get reparentStripeHandler():IReparentStripeHandler public function set reparentStripeHandler(value:IReparentStripeHandler):voidSee also
| reparentStripeInputMode | property |
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.
public function get reparentStripeInputMode():ReparentStripeInputMode public function set reparentStripeInputMode(value:ReparentStripeInputMode):voidflash.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
| reparentStripeModePriority | property |
reparentStripeModePriority:int
The priority for the reparentStripeInputMode.
The default value is 0.
public function get reparentStripeModePriority():int public function set reparentStripeModePriority(value:int):voidSee also
| resizeStripeInputMode | property |
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.
public function get resizeStripeInputMode():ResizeStripeInputMode public function set resizeStripeInputMode(value:ResizeStripeInputMode):voidflash.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.
|
| resizeStripeModePriority | property |
resizeStripeModePriority:intThe priority of the ResizeStripeInputMode.
The default value is 0.
public function get resizeStripeModePriority():int public function set resizeStripeModePriority(value:int):void| selectableItems | property |
selectableItems:uintGets or set a property that determines which types of items should be selectable at all.
The default value is StripeTypes.ALL.
public function get selectableItems():uint public function set selectableItems(value:uint):voidSee also
| selectAllCommand | property |
selectAllCommand:FunctionEvent 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.
public function get selectAllCommand():Function public function set selectAllCommand(value:Function):voidSee also
| stripeDropInputMode | property |
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.
public function get stripeDropInputMode():StripeDropInputMode public function set stripeDropInputMode(value:StripeDropInputMode):voidflash.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
| stripeDropModePriority | property |
stripeDropModePriority:int
The priority for the reparentStripeInputMode.
The default value is 70.
public function get stripeDropModePriority():int public function set stripeDropModePriority(value:int):voidSee also
| stripeSelection | property |
stripeSelection:IStripeSelection [read-only]
Returns the MainInputMode.selectionModel as an
IStripeSelection.
public function get stripeSelection():IStripeSelection| synchronizeWithGraphSelection | property |
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.
public function get synchronizeWithGraphSelection():Boolean public function set synchronizeWithGraphSelection(value:Boolean):voidSee also
| textEditorInputMode | property |
textEditorInputMode:TextEditorInputModeThe 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.
public function get textEditorInputMode():TextEditorInputMode public function set textEditorInputMode(value:TextEditorInputMode):voidflash.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.
|
| textEditorModePriority | property |
textEditorModePriority:intThe priority of the TextEditorInputMode.
The default value is 100.
public function get textEditorModePriority():int public function set textEditorModePriority(value:int):void| TableEditorInputMode | () | Constructor |
public function TableEditorInputMode()Creates a new instance.
| childInputModeContextLookup | () | method |
override protected function childInputModeContextLookup(type:Class):Object
Parameters
type:Class |
Object |
| clearSelection | () | method |
public function clearSelection():voidClears the current selection.
| createClickInputMode | () | method |
protected function createClickInputMode():ClickInputModeFactory method that creates the click input mode instance.
ReturnsClickInputMode — The newly created click input mode.
|
| createKeyboardInputMode | () | method |
protected function createKeyboardInputMode():KeyboardInputModeFactory method that creates the keyboard input mode instance.
ReturnsKeyboardInputMode — A newly generated keyboard input mode instance.
|
| createLabel | () | method |
public function createLabel(stripe:IStripe):voidInteractively 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.
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.
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.
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.
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.
TextEditorInputMode — A new instance of TextEditorInputMode
|
| deleteSelection | () | method |
public function deleteSelection():voidThis 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):voidDeletes 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):voidTriggers 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):StripeSubregionDescriptorUsed 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.
|
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):IterableUsed 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.
|
Iterable — The stripe subregions that have been found for the location or an empty Iterable.
|
See also
| findTableNode | () | method |
public function findTableNode(table:ITable):INodeConvenience 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.
|
INode — The node which is associated with the given table.
|
| findTableNodeForStripe | () | method |
public function findTableNodeForStripe(stripe:IStripe):INodeConvenience 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.
|
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):IStripeConvenience 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.
|
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):voidCalled 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):voidCalled 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):voidCalled 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():voidClears 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.
|
Boolean — true if the item can be click selected.
|
| shouldBeDeleted | () | method |
| 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.
|
Boolean — Whether to edit the label or the labels for that item.
|
See also
| shouldLabelBeEditedInternal | () | method |
yworks_internal function shouldLabelBeEditedInternal(item:IModelItem):BooleanParameters
item:IModelItem |
Boolean |
| uninstallCore | () | method |
override protected function uninstallCore(context:IInputModeContext):void
Parameters
context:IInputModeContext |
| deletingStripe | Event |
com.yworks.graph.input.GraphEditorEventcom.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.
TableEditorInputMode.
| labelChanged | Event |
com.yworks.graph.input.GraphEditorEventcom.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.
| labelCreated | Event |
com.yworks.graph.input.GraphEditorEventcom.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.
| stripeDeleted | Event |
com.yworks.graph.input.GraphEditorEventcom.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.
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.