Input mode that can be used to interactively edit a table.
Remarks
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 stripe selection is optionally synchronized with the graphSelection.
Type Details
- yfiles module
- view-table
- yfiles-umd modules
- view-table, view
- Legacy UMD name
- yfiles.input.TableEditorInputMode
See Also
Constructors
Default constructor.
Parameters
A map of options to pass to the method.
- resizeStripeInputMode - ResizeStripeInputMode
The ResizeStripeInputMode that is used to change the size of a stripe interactively. This option sets the resizeStripeInputMode property on the created object.
- reparentStripeHandler - IReparentStripeHandler
The reparentStripeHandler property. This option sets the reparentStripeHandler property on the created object.
- reparentStripeInputMode - ReparentStripeInputMode
The ReparentStripeInputMode that is used to change a stripes position in the table hierarchy. This option sets the reparentStripeInputMode property on the created object.
- stripeDropInputMode - StripeDropInputMode
The stripeDropInputMode property that is responsible for handling drag and drop operations of stripes onto the Canvas. This option sets the stripeDropInputMode property on the created object.
- keyboardInputMode - KeyboardInputMode
The keyboardInputMode. This option sets the keyboardInputMode property on the created object.
- textEditorInputMode - TextEditorInputMode
The textEditorInputMode. This option sets the textEditorInputMode property on the created object.
- labelEditableItems - StripeTypes
A property that determines which types of items may have their labels edited. This option sets the labelEditableItems property on the created object.
- autoRemoveEmptyLabels - boolean
A value indicating whether this mode should automatically remove labels from the table when a label text has been edited and the label text is empty. This option sets the autoRemoveEmptyLabels property on the created object.
- clickInputMode - ClickInputMode
The clickInputMode. This option sets the clickInputMode property on the created object.
- deletableItems - StripeTypes
A property that determines which types of items may be deleted using the deleteSelection action. This option sets the deletableItems property on the created object.
- selectableItems - StripeTypes
A property that determines which types of items should be selectable at all. This option sets the selectableItems property on the created object.
- clickSelectableItems - StripeTypes
A property that determines which types of items should be selectable through mouse clicks.. This option sets the clickSelectableItems property on the created object.
- allowEditLabel - boolean
Whether the label editor will be automatically invoked if the F2 key is pressed. This option sets the allowEditLabel property on the created object.
- allowAddLabel - boolean
Whether the label editor will be automatically invoked if the Shift+F2 key is pressed. This option sets the allowAddLabel property on the created object.
- multiSelectionRecognizer - function(Object, EventArgs):boolean
The event recognizer that determines whether a click is deemed a multi selection gesture. This option sets the multiSelectionRecognizer property on the created object.
Signature Details
function(eventSource: any, evt: EventArgs) : boolean
A callback that recognizes events.Given a sender and an event argument, delegates decide whether the event is treated as a match depending on the context.Parameters
- eventSource - any
- The source of the event.
- evt - EventArgs
- The arguments of the event to be decided to handle.
Returns
- boolean
true
if theevt
is considered to be handled.
- clickSelectableRegions - StripeSubregionTypes
Clicks on which StripeSubregionTypes(s) should toggle a stripe selection state. This option sets the clickSelectableRegions property on the created object.
- clickableItems - StripeTypes
A property that determines for which types of items should mouse clicks be handled by this mode. This option sets the clickableItems property on the created object.
- clickableRegions - StripeSubregionTypes
Clicks on which StripeSubregionTypes(s) react to mouse clicks. This option sets the clickableRegions property on the created object.
- synchronizeWithGraphSelection - boolean
A value indicating whether stripeSelection should be synchronized with the graphSelection if this instance is installed as a child of a GraphEditorInputMode instance. This option sets the synchronizeWithGraphSelection property on the created object.
- allowMixedSelection - boolean
Whether to allow mixed selections of graph elements and table elements This option sets the allowMixedSelection property on the created object.
- allowEditLabelOnDoubleClick - boolean
A value determining whether double-clicking should start label editing. This option sets the allowEditLabelOnDoubleClick property on the created object.
- exclusive - boolean
A value indicating whether this mode will be the only one running when it has the mutex. This option sets the exclusive property on the created object.
- enabled - boolean
The enabled state of this input mode. This option sets the enabled property on the created object.
- priority - number
- defaultCursor - Cursor
The cursor to use whenever no child mode prefers a different cursor. This option sets the defaultCursor property on the created object.
Properties
Gets or sets whether the label editor will be automatically invoked if the Shift+F2 key is pressed.
Remarks
true
. If label adding is allowed, true
pressing Shift+F2 will start the label editor. By default this feature is enabled.See Also
Gets or sets whether the label editor will be automatically invoked if the F2 key is pressed.
Remarks
true
. If label editing is allowed, pressing F2 will start the label editor. By default this feature is enabled.See Also
Gets or sets a value determining whether double-clicking should start label editing.
Remarks
If enabled, double-clicking an item will automatically execute the EDIT_LABEL command.
This setting has no effect if label editing is generally disallowed by setting allowEditLabel to false
.
If the TableEditorInputMode instance is installed as child mode of a GraphEditorInputMode instance, editing a label by double clicks is only allowed if both the value of this property and the value of allowEditLabelOnDoubleClick are true
.
The default value is true
.
See Also
Gets or sets whether to allow mixed selections of graph elements and table elements
Remarks
true
. Changing this property only has an effect if synchronizeWithGraphSelection is enabled.Gets or sets a value indicating whether this mode should automatically remove labels from the table when a label text has been edited and the label text is empty.
Remarks
true
.Gets or set a property that determines for which types of items should mouse clicks be handled by this mode.
Gets or sets clicks on which StripeSubregionTypes(s) react to mouse clicks.
Remarks
Gets or sets the clickInputMode.
Remarks
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 clickInputMode 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.
By default this input mode has a priority of 0
.
Throws
- Exception({ name: 'NotSupportedError' })
- If an attempt is made to change the instance while this mode is
. To exchange a mode, first , then to ensure that all data is initialized correctly.
Gets or set a property that determines which types of items should be selectable through mouse clicks..
Gets or sets clicks on which StripeSubregionTypes(s) should toggle a stripe selection state.
Remarks
See Also
Gets the installed controller.
Defined in
Gets or sets the cursor to use whenever no child mode prefers a different cursor.
Remarks
null
See Also
Defined in
Gets or set a property that determines which types of items may be deleted using the deleteSelection action.
Gets or sets the enabled state of this input mode.
Remarks
Defined in
Gets or sets a value indicating whether this mode will be the only one running when it has the mutex.
Remarks
The value of this property will be delegated to the exclusive property of the controller.
If this mode is marked as exclusive and has the mutex, all other modes added to the same MultiplexingInputMode will be deactivated. Otherwise it will always run concurrently with all other modes.
Defined in
Gets the context instance this mode is currently installed in or null
if this instance is not installed.
Remarks
Implements
Gets or sets the keyboardInputMode.
Remarks
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.
By default this input mode has a priority of 0
.
Throws
- Exception({ name: 'NotSupportedError' })
- If an attempt is made to change the instance while this mode is
. To exchange a mode, first , then to ensure that all data is initialized correctly.
Gets or set a property that determines which types of items may have their labels edited.
Remarks
See Also
Gets or sets the event recognizer that determines whether a click is deemed a multi selection gesture.
Remarks
Signature Details
function(eventSource: any, evt: EventArgs) : boolean
Parameters
- eventSource - any
- The source of the event.
- evt - EventArgs
- The arguments of the event to be decided to handle.
Returns
- boolean
true
if theevt
is considered to be handled.
Gets the IInputMode that currently owns the mutex.
Defined in
Gets the priority of this input mode.
Remarks
See Also
Implements
Gets or sets the reparentStripeHandler property.
Remarks
See Also
Gets or sets the ReparentStripeInputMode that is used to change a stripes position in the table hierarchy.
Remarks
0
. 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.Throws
- Exception({ name: 'NotSupportedError' })
- If an attempt is made to change the instance while this mode is
. To exchange a mode, first , then to ensure that all data is initialized correctly.
Gets or sets the ResizeStripeInputMode that is used to change the size of a stripe interactively.
Remarks
0
. 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.Throws
- Exception({ name: 'NotSupportedError' })
- If an attempt is made to change the instance while this mode is
. To exchange a mode, first , then to ensure that all data is initialized correctly.
Gets or set a property that determines which types of items should be selectable at all.
Gets or sets the stripeDropInputMode property that is responsible for handling drag and drop operations of stripes onto the Canvas.
Remarks
The mode by default is disabled and needs 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.
By default this input mode has a priority of 70
.
Throws
- Exception({ name: 'NotSupportedError' })
- If an attempt is made to change the instance while this mode is
. To exchange a mode, first , then to ensure that all data is initialized correctly.
Gets the selected stripes
Gets or sets a value indicating whether stripeSelection should be synchronized with the graphSelection if this instance is installed as a child of a GraphEditorInputMode instance.
Remarks
This feature needs to be disabled temporarily if the selection is changed.
By default, this feature is enabled.
Gets or sets the textEditorInputMode.
Remarks
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 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.
By default this input mode has a priority of 100
.
Throws
- Exception({ name: 'NotSupportedError' })
- If an attempt is made to change the instance while this mode is
. To exchange a mode, first , then to ensure that all data is initialized correctly.
Methods
Adds the given mode
.
Remarks
The input modes will be ordered according to their priority: Input modes with lower priority will be installed earlier.
Input modes will run exclusively if the exclusive property of their installed controller is set to true
. Otherwise they can not and will not be deactivated if another IInputMode acquires the mutex.
Parameters
A map of options to pass to the method.
- mode - IInputMode
- The input mode to add to this mode.
Throws
- Exception({ name: 'ArgumentError' })
- If the same
mode
has is already added to this instance.
Examples
const multiplexingInputMode = new MultiplexingInputMode()
const waitInputMode = new WaitInputMode()
waitInputMode.priority = 0
multiplexingInputMode.add(waitInputMode)
const moveInputMode = new MoveViewportInputMode()
moveInputMode.priority = 5
multiplexingInputMode.add(moveInputMode)
graphComponent.inputMode = multiplexingInputMode
const mode = new GraphEditorInputMode()
const customInputMode = new CustomInputMode()
customInputMode.priority = 10
mode.add(customInputMode)
Defined in
Adds a new label to the given stripe interactively.
Remarks
This will activate the textEditorInputMode to let the user interactively enter the label's text and unless the user cancels label creation the returned Promise<T> will contain the label.
The text that the user enters may be validated before the label is actually added.
This method is similar to createLabel. It differs only when either the LabelAdding event is handled or the owner
has an IEditLabelHelper requests editing an existing label instead of creating a new one. In this case, this method will edit that label instead of adding a new one.
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The item.
Returns
- ↪Promise<ILabel|null>
- A Promise that fulfills with either the newly created label or
null
if the editing was canceled or the text did not validate.
Adjusts the cursor of the CanvasComponent according to the current input mutex owner or the first mode in the list whose ConcurrencyController returns a non-null preferredCursor.
Remarks
Defined in
Cancels all modes.
Implements
Called by the child context's lookup method.
Parameters
A map of options to pass to the method.
Returns
- ↪any
- The result of the lookup query, or
null
.
See Also
Overrides
Clears the current selection.
Actually performs the click on the given item.
Remarks
Parameters
A map of options to pass to the method.
- tableHitTestResult - TableHitTestResult
- Information about the item that has been clicked.
- evt - ClickEventArgs
- The original event arguments for the click. Setting its handled property to
true
will indicate that the click was handled. By default this happens when the clicked item is either selected or focused.
Yields an IInputModeContext for the child modes of this mode.
Remarks
Returns
- ↪IInputModeContext
- A new instance that delegates to the parent's context.
Defined in
Factory method that creates the keyboardInputMode instance.
Helper method that yields a suitably configured InputModeEventArgs for this input mode.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
An input mode context that is available in the InputModeEventArgs.
Can be
null
in which case a new context for this instance is created automatically.
Returns
- ↪InputModeEventArgs
- An input mode event argument that is configured for this instance.
Defined in
Factory method that creates the keyboardInputMode instance.
Interactively creates a new label for the provided stripe.
Remarks
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 label owner.
The text that the user enters may be validated before the label is actually added.
This method is similar to addLabel. It differs only when either the LabelAdding event is handled or the stripe
has an IEditLabelHelper requests editing an existing label instead of creating a new one. In both cases, this method will do nothing and neither adds a new label nor edits an existing one.
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The item to create a new label for.
Returns
Factory method for the reparentStripeHandler property.
Remarks
Returns
- ↪IReparentStripeHandler
- a new instance of IReparentStripeHandler
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.
Factory method that creates the resizeStripeInputMode lazily the first time the property is accessed.
Returns
- ↪ResizeStripeInputMode
- A plain new instance of the ResizeStripeInputMode type, which is initially enabled.
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.
Create a new instance of IStripeSelection the first time property stripeSelection is accessed.
Remarks
false
.Returns
- ↪IStripeSelection
- A new IStripeSelection instance.
Factory method for the textEditorInputMode property.
Remarks
Returns
- ↪TextEditorInputMode
- a new instance of TextEditorInputMode
This method deletes the currently selected stripes.
Remarks
See Also
Actually performs a double-click on the given item.
Remarks
true
Parameters
A map of options to pass to the method.
- tableHitTestResult - TableHitTestResult
- The item that has been double-clicked.
- evt - ClickEventArgs
- The original event arguments for the click. Setting its handled property to
true
will indicate that the double-click was handled and events on other items in the same location are no longer raised.
Actually performs a double-tap on the given item.
Remarks
true
Parameters
A map of options to pass to the method.
- tableHitTestResult - TableHitTestResult
- The item that has been double-tapped.
- evt - TapEventArgs
- The original event arguments for the tap. Setting its handled property to
true
will indicate that the double-tap was handled and events on other items in the same location are no longer raised.
Starts editing of the given label.
Remarks
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. The text that the user enters may be validated before the label is actually edited.
This method will raise the LabelEditing event and query the IEditLabelHelper for the label and its owner, but will ignore the result except for the textEditorInputModeConfigurator property on the LabelEditingEventArgs. Thus editing a label via this method cannot be prevented by event handlers or IEditLabelHelpers.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to edit.
Returns
- ↪Promise<ILabel>
- A Promise of the label that will be resolved with the label or a
null
if the text edit was canceled.
See Also
Starts label editing by executing EDIT_LABEL.
Remarks
Parameters
A map of options to pass to the method.
- item - IModelItem
- The item whose label or the label itself that should be edited upon the double click gesture.
Returns
- ↪boolean
true
iff the request was handled.
See Also
findStripe
(location: Point, stripeTypes: StripeTypes, subregionTypes: StripeSubregionTypes, filter?: function(StripeSubregion):boolean) : StripeSubregionUsed as a callback to find the items underneath a certain point.
Parameters
A map of options to pass to the method.
- location - Point
- The location to test.
- stripeTypes - StripeTypes
- An enumeration value of StripeTypes to specify the stripe type.
- subregionTypes - StripeSubregionTypes
- An enumeration value of StripeSubregionTypes to further restrict the stripe region.
- filter - function(StripeSubregion):boolean
- Additional predicate to further restrict the hit test results.
Signature Details
function(obj: StripeSubregion) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - StripeSubregion
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
Returns
- ↪StripeSubregion
- The stripe subregions that have been found for the location or
null
.
findStripes
(location: Point, stripeTypes: StripeTypes, subregionTypes: StripeSubregionTypes, filter?: function(StripeSubregion):boolean) : IEnumerable<StripeSubregion>Used as a callback to find the items underneath a certain point.
Parameters
A map of options to pass to the method.
- location - Point
- The location to test.
- stripeTypes - StripeTypes
- An enumeration value of StripeTypes to specify the stripe type.
- subregionTypes - StripeSubregionTypes
- An enumeration value of StripeSubregionTypes to further restrict the stripe region.
- filter - function(StripeSubregion):boolean
- Additional predicate to further restrict the hit test results.
Signature Details
function(obj: StripeSubregion) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - StripeSubregion
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
Returns
- ↪IEnumerable<StripeSubregion>
- The stripe subregions that have been found for the location.
Returns a list of all modes managed by this instance in sorted order.
Performs one-time initialization of this instance.
Remarks
This method should not be invoked by subclasses. This will be done automatically upon first installation of this mode.
This code will be executed only once per instance. The inputModeContext property will be null
when this code is executed. This method should not be used to install this mode into a specific canvas. Subclasses should always call base.Initialize()
first.
See Also
Overrides
Inserts a new stripe as child of owner
Remarks
size
and otherwise the default settings of the table where owner
belongs to. If size
is entered as 0
, the owners default size is used.Parameters
A map of options to pass to the method.
- owner - IStripe
- The parent of the new stripe.
- index - number
- The index where to insert the new stripe.
- size - number
- The initial size of the stripe
Returns
Installs this mode into the given context that is provided by the canvas.
Remarks
In general a mode can only be installed into a single canvas at all times.
This method is called to initialize this instance. Subclasses should override this method to register the corresponding event handler delegates for the various input events they need to register with.
When this instance gets uninstalled from the context the same context instance will be passed to it.
Implementations may hold a reference to the context
instance and use it while they are being installed.
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context that this instance shall be installed into. The same instance will be passed to this instance during uninstall. A reference to the context may be kept and queried during the time the mode is installed.
- controller - ConcurrencyController
- The ConcurrencyController for this mode.
See Also
Overrides
Invalidates the canvas this mode is currently installed in.
Defined in
Invoked if the shift+F2 key is pressed and allowAddLabel is set to true
.
Remarks
Called when the clickInputMode property value changes and after initialization of the field.
Parameters
A map of options to pass to the method.
- oldMode - ClickInputMode
- the old value, which may be
null
the first time - newMode - ClickInputMode
- the new value
Called once clickInputMode triggers the Clicked event.
Called once clickInputMode triggers the DoubleClicked event.
Called after the active property of the installed ConcurrencyController has been set to true
.
Remarks
Defined in
Called after the active property of the installed ConcurrencyController has been set to false
.
Remarks
null
and releases the mutex if the mutex is currently owned by this instance. Also, all concurrent child modes will be disabled.Defined in
Raises the DeletedItem event.
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<IModelItem>
- The instance containing the event data.
Raises the DeletedSelection event.
Parameters
A map of options to pass to the method.
- evt - SelectionEventArgs<IStripe>
- The SelectionEventArgs<T> instance containing the event data.
Raises the DeletingSelection event.
Parameters
A map of options to pass to the method.
- evt - SelectionEventArgs<IStripe>
- The SelectionEventArgs<T> instance containing the event data.
Invoked if the F2 key is pressed and allowEditLabel is set to true
.
Remarks
Raises the ItemClicked event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been clicked.
Raises the ItemDoubleClicked event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been double clicked.
Raises the ItemDoubleTapped event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemTappedEventArgs<IModelItem>
- The TableItemTappedEventArgs<T> instance that contains the item that has been double tapped.
Raises the ItemLeftClicked event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been clicked.
Raises the ItemLeftDoubleClicked event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been double clicked.
Raises the ItemRightClicked event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemClickedEventArgs<IModelItem>
- The ItemClickedEventArgs<T> instance that contains the item that has been clicked.
Raises the ItemRightDoubleClicked event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been double clicked.
Raises the ItemTapped event.
Remarks
true
.Parameters
A map of options to pass to the method.
- evt - TableItemTappedEventArgs<IModelItem>
- The TableItemTappedEventArgs<T> instance that contains the item that has been tapped.
Called when the keyboardInputMode changed.
Parameters
A map of options to pass to the method.
- oldMode - KeyboardInputMode
- The old keyboardInputMode.
- newMode - KeyboardInputMode
- The new keyboardInputMode.
Raises the LabelAdded event.
Parameters
A map of options to pass to the method.
- evt - LabelEventArgs
- The ItemEventArgs<T> instance that contains the ILabel that has been added.
Raises the LabelAdding event.
Remarks
evt
as handled.Parameters
A map of options to pass to the method.
- evt - LabelEditingEventArgs
- The event arguments.
Raises the LabelEditing event.
Remarks
evt
as handled.Parameters
A map of options to pass to the method.
- evt - LabelEditingEventArgs
- The event arguments.
Raises the LabelTextChanged event.
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<ILabel>
- The ItemEventArgs<T> instance that contains the ILabel that has changed the text.
Called when the text of a label has been edited.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label that was edited.
- text - string
- The new text.
Raises the LabelTextEditingCanceled event.
Parameters
A map of options to pass to the method.
- evt - LabelEventArgs
- The LabelEventArgs instance containing the event data.
Raises the LabelTextEditingStarted event.
Parameters
A map of options to pass to the method.
- evt - LabelEventArgs
- The LabelEventArgs instance containing the event data.
onReparentStripeHandlerChanged
(oldHandler: IReparentStripeHandler, newHandler: IReparentStripeHandler)Called when the reparentStripeHandler property value changes and after initialization of the field.
Parameters
A map of options to pass to the method.
- oldHandler - IReparentStripeHandler
- the old value, which may be
null
the first time - newHandler - IReparentStripeHandler
- the new value
onReparentStripeInputModeChanged
(oldHandler: ReparentStripeInputMode, newHandler: ReparentStripeInputMode)Called when the reparentStripeInputMode property value changes and after initialization of the field.
Parameters
A map of options to pass to the method.
- oldHandler - ReparentStripeInputMode
- the old value, which may be
null
the first time - newHandler - ReparentStripeInputMode
- the new value
Called when the resizeStripeInputMode property value changes and after initialization of the field.
Parameters
A map of options to pass to the method.
- oldMode - ResizeStripeInputMode
- the old value, which may be
null
the first time - newMode - ResizeStripeInputMode
- the new value
Called when the stripeDropInputMode property value changes and after initialization of the field.
Parameters
A map of options to pass to the method.
- oldMode - StripeDropInputMode
- the old value, which may be
null
the first time - newMode - StripeDropInputMode
- the new value
Called when the textEditorInputMode property value changes and after initialization of the field.
Parameters
A map of options to pass to the method.
- oldMode - TextEditorInputMode
- the old value, which may be
null
the first time - newMode - TextEditorInputMode
- the new value
Raises the ValidateLabelText event.
Parameters
A map of options to pass to the method.
- evt - LabelTextValidatingEventArgs
- The LabelTextValidatingEventArgs instance containing the event data.
Removes the given mode from this compound mode.
Parameters
A map of options to pass to the method.
- mode - IInputMode
- The mode to remove.
Defined in
Clears the current selection and selects all stripes in all table instances.
Remarks
See Also
Predicate that determines whether a label may be added interactively to item
Remarks
false
for its onLabelAdding method.Parameters
A map of options to pass to the method.
- item - IModelItem
- The item to query
Returns
- ↪boolean
true
iff a label may be added
Called to determine whether the item described by tableHitTestResult
can be clicked.
Remarks
Parameters
A map of options to pass to the method.
- tableHitTestResult - TableHitTestResult
- Information about the item to check.
Returns
- ↪boolean
- Whether the item should be clicked in response to a detected mouse click.
Determines whether the given item should be deleted during deleteSelection.
Remarks
Parameters
A map of options to pass to the method.
- stripe - IStripe
- The item.
Returns
- ↪boolean
- Whether to delete that item.
Called to determine whether the item described by tableHitTestResult
can be double clicked.
Remarks
Parameters
A map of options to pass to the method.
- tableHitTestResult - TableHitTestResult
- Information about the item to check.
Returns
- ↪boolean
- Whether the item should be double clicked in response to a detected double click.
Determines whether the label or the labels of the provided item should be edited in response to a command or explicit method call to editLabel or createLabel.
Parameters
A map of options to pass to the method.
- item - IModelItem
- The item.
Returns
- ↪boolean
- Whether to edit the label or the labels for that item.
Called by onKeyboardInputModeChanged to determine which of the built-in ICommands to install.
Remarks
true
, subclasses may override this method to adjust the behavior.Parameters
A map of options to pass to the method.
- command - ICommand
- The command to install.
Returns
- ↪boolean
- Whether to install this command.
Called when the priority of an installed sub mode has changed.
Remarks
Defined in
Actually performs the tap on the given item.
Remarks
Parameters
A map of options to pass to the method.
- tableHitTestResult - TableHitTestResult
- Information about the item that has been tapped.
- evt - TapEventArgs
- The original event arguments for the tap. Setting its handled property to
true
will indicate that the tap was handled. By default this happens when the tapped item is either selected or focused.
Tries to stop all modes.
Returns
- ↪boolean
true
if and only if the editing has been stopped or there was no edit in progress
See Also
Implements
Uninstalls this mode from the given context.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to deregister from. This is the same instance that had been passed to install during installation.
Overrides
Events
Occurs when an item has been deleted interactively by this mode.
Event Registration
addDeletedItemListener(function(this, ItemEventArgs<IModelItem>):void)
Event Deregistration
removeDeletedItemListener(function(this, ItemEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<IModelItem>
- An object that contains the event data.
Occurs after all selected items have been removed in deleteSelection.
See Also
Event Registration
addDeletedSelectionListener(function(this, SelectionEventArgs<IStripe>):void)
Event Deregistration
removeDeletedSelectionListener(function(this, SelectionEventArgs<IStripe>):void)
Signature Details
function(sender: this, evt: SelectionEventArgs<IStripe>)
Parameters
- sender - this
- The source of the event.
- evt - SelectionEventArgs<IStripe>
- An object that contains the event data.
Occurs just before the deleteSelection method starts its work and will be followed by any number of DeletedItem events and finalized by a DeletedSelection event.
See Also
Event Registration
addDeletingSelectionListener(function(this, SelectionEventArgs<IStripe>):void)
Event Deregistration
removeDeletingSelectionListener(function(this, SelectionEventArgs<IStripe>):void)
Signature Details
function(sender: this, evt: SelectionEventArgs<IStripe>)
Parameters
- sender - this
- The source of the event.
- evt - SelectionEventArgs<IStripe>
- An object that contains the event data.
Occurs when an item has been clicked or tapped.
Remarks
If one of the event handlers sets the handled property to true
the event will not be propagated anymore.
This event will also be raised for taps.
Button-specific and input type specific events (ItemLeftClicked, ItemRightClicked and ItemTapped) will be raised before this event. If one of those is marked handled this event will not be raised anymore.
See Also
Event Registration
addItemClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Event Deregistration
removeItemClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemClickedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemClickedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been double clicked.
Remarks
If one of the event handlers sets the handled property to true
the event will not be propagated anymore.
Depending on the value of the doubleClickPolicy property of clickInputMode this event may be preceded by no, one, or two ItemClicked events (as well as the corresponding button-specific event).
Button-specific and input-type specific events (ItemLeftDoubleClicked, ItemRightDoubleClicked and ItemDoubleTapped) will be raised before this event. If one of those is marked handled this event will not be raised anymore.
See Also
Event Registration
addItemDoubleClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Event Deregistration
removeItemDoubleClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemClickedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemClickedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been double tapped.
Remarks
true
the event will not be propagated anymore. This also means that the ItemDoubleClicked event will not be raised in that case.See Also
Event Registration
addItemDoubleTappedListener(function(this, TableItemTappedEventArgs<IModelItem>):void)
Event Deregistration
removeItemDoubleTappedListener(function(this, TableItemTappedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemTappedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemTappedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been left clicked.
Remarks
true
the event will not be propagated anymore. This also means that the ItemClicked event will not be raised in that case.See Also
Event Registration
addItemLeftClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Event Deregistration
removeItemLeftClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemClickedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemClickedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been left double clicked.
Remarks
true
the event will not be propagated anymore. This also means that the ItemDoubleClicked event will not be raised in that case.See Also
Event Registration
addItemLeftDoubleClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Event Deregistration
removeItemLeftDoubleClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemClickedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemClickedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been right clicked.
Remarks
true
the event will not be propagated anymore. This also means that the ItemClicked event will not be raised in that case.See Also
Event Registration
addItemRightClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Event Deregistration
removeItemRightClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemClickedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemClickedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been right double clicked.
Remarks
true
the event will not be propagated anymore. This also means that the ItemDoubleClicked event will not be raised in that case.See Also
Event Registration
addItemRightDoubleClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Event Deregistration
removeItemRightDoubleClickedListener(function(this, TableItemClickedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemClickedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemClickedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when an item has been tapped.
Remarks
true
the event will not be propagated anymore. This also means that the ItemClicked event will not be raised in that case.See Also
Event Registration
addItemTappedListener(function(this, TableItemTappedEventArgs<IModelItem>):void)
Event Deregistration
removeItemTappedListener(function(this, TableItemTappedEventArgs<IModelItem>):void)
Signature Details
function(sender: this, evt: TableItemTappedEventArgs<IModelItem>)
Parameters
- sender - this
- The source of the event.
- evt - TableItemTappedEventArgs<IModelItem>
- An object that contains the event data.
Occurs when this mode has triggered the addition of an ILabel, for instance, in response to createLabel.
Event Registration
addLabelAddedListener(function(this, LabelEventArgs):void)
Event Deregistration
removeLabelAddedListener(function(this, LabelEventArgs):void)
Signature Details
function(sender: this, evt: LabelEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - LabelEventArgs
- An object that contains the event data.
Occurs when a label is about to be added.
Remarks
Event Registration
addLabelAddingListener(function(this, LabelEditingEventArgs):void)
Event Deregistration
removeLabelAddingListener(function(this, LabelEditingEventArgs):void)
Signature Details
function(sender: this, evt: LabelEditingEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - LabelEditingEventArgs
- An object that contains the event data.
Occurs when a label is about to be edited.
Remarks
Event Registration
addLabelEditingListener(function(this, LabelEditingEventArgs):void)
Event Deregistration
removeLabelEditingListener(function(this, LabelEditingEventArgs):void)
Signature Details
function(sender: this, evt: LabelEditingEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - LabelEditingEventArgs
- An object that contains the event data.
Occurs when this mode has triggered the edit of an ILabel, for instance, in response to editLabel.
Event Registration
addLabelTextChangedListener(function(this, ItemEventArgs<ILabel>):void)
Event Deregistration
removeLabelTextChangedListener(function(this, ItemEventArgs<ILabel>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<ILabel>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<ILabel>
- An object that contains the event data.
Occurs when the actual label editing process is canceled.
Remarks
See Also
Event Registration
addLabelTextEditingCanceledListener(function(this, ItemEventArgs<ILabel>):void)
Event Deregistration
removeLabelTextEditingCanceledListener(function(this, ItemEventArgs<ILabel>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<ILabel>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<ILabel>
- An object that contains the event data.
Occurs when the actual label editing process is about to start.
Remarks
See Also
Event Registration
addLabelTextEditingStartedListener(function(this, ItemEventArgs<ILabel>):void)
Event Deregistration
removeLabelTextEditingStartedListener(function(this, ItemEventArgs<ILabel>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<ILabel>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<ILabel>
- An object that contains the event data.
Occurs after label editing to validate the label text for a label that is about to be added or edited.
Remarks
See Also
Event Registration
addValidateLabelTextListener(function(this, LabelTextValidatingEventArgs):void)
Event Deregistration
removeValidateLabelTextListener(function(this, LabelTextValidatingEventArgs):void)
Signature Details
function(sender: this, evt: LabelTextValidatingEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - LabelTextValidatingEventArgs
- An object that contains the event data.