- I
Remarks
This mode can either be used as a standalone input mode, or as a child mode of GraphEditorInputMode. In the latter case, some child modes of this implementation are disabled:
In addition, the stripeSelection is optionally synchronized with the graphSelection.
Note that if the TableEditorInputMode is used without a GraphEditorInputMode, labels can only be edited interactively if a EditLabelInputMode is added.
See Also
Developer's Guide
Members
Constructors
Properties
Gets or sets a predicate that is queried to determine whether a label can be added to the given IModelItem.
true. If label adding is allowed, pressing Shift+F2 will start the label editor. By default, this feature is enabled.See Also
API
- ADD_LABEL
true. If label editing is allowed, pressing F2 will start the label editor. By default, this feature is enabled.See Also
API
- EDIT_LABEL
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
true. Changing this property only has an effect if synchronizeWithGraphSelection is enabled.Gets or sets a property that determines for which types of items should mouse clicks be handled by this mode.
Gets or sets a predicate that is queried to determine whether the item described by the TableHitTestResult can be clicked.
Gets or sets clicks on which StripeSubregionTypes(s) react to mouse clicks.
See Also
Developer's Guide
Gets or sets the clickInputMode.
If the field has not yet been initialized upon first access, a new instance will be assigned. 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.
Property Value
Gets or sets 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.
See Also
Developer's Guide
Gets the installed controller.
Defined in
MultiplexingInputMode.controllerGets or sets the cursor to use whenever no child mode prefers a different cursor.
nullSee Also
Developer's Guide
API
- adjustCursor
Defined in
MultiplexingInputMode.defaultCursorGets or sets a property that determines which types of items may be deleted using the deleteSelection action.
Gets or sets a predicate that is queried to determine whether a stripe should be deleted during deleteSelection.
Gets or sets a predicate that is queried to determine whether the item described by the TableHitTestResult can be double-clicked.
Gets or sets a predicate that is queried to determine whether the given label or a label owned by the given owner can be edited.
Defined in
MultiplexingInputMode.enabledThe 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
MultiplexingInputMode.exclusiveGets or sets a predicate that is queried by onKeyboardInputModeChanged to determine whether a built-in Command should be installed.
Gets or sets the keyboardInputMode.
If the field has not yet been initialized upon first access, a new instance will be assigned. 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.
Property Value
Gets or sets a property that determines which types of items may have their labels edited.
Gets or sets the event recognizer that determines whether a click is deemed a multi-selection gesture.
Gets the IInputMode that currently owns the mutex.
Property Value
null.Defined in
MultiplexingInputMode.mutexOwnerRetrieves the IInputModeContext this mode has been installed in.
null if this mode is currently not installed. Use createInputModeContext to obtain a context that has this IInputMode as the inputMode.Defined in
MultiplexingInputMode.priorityGets or sets the reparentStripeHandler property.
See Also
Gets or sets the ReparentStripeInputMode that is used to change a stripe's position in the table hierarchy.
0. If the field has not yet been initialized upon first access, a new instance will be assigned. Upon change the onReparentStripeInputModeChanged method will be called.Gets or sets the ResizeStripeInputMode that is used to change the size of a stripe interactively.
0. If the field has not yet been initialized upon first access, a new instance will be assigned. Upon change the onResizeStripeInputModeChanged method will be called.Gets or sets 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.
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, a new instance will be assigned. Upon change, onStripeDropInputModeChanged will be called.
By default, this input mode has a priority of 70.
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.
This feature needs to be disabled temporarily if the selection is changed.
By default, this feature is enabled.
Methods
Adds the given mode.
mode.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 cannot and will not be deactivated if another IInputMode acquires the mutex.
Parameters
- mode: IInputMode
- The input mode to add to this mode.
Throws
- Exception ({ name: 'ArgumentError' })
- If the same
modeis 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 = multiplexingInputModeconst mode = new GraphEditorInputMode()
const customInputMode = new CustomInputMode()
customInputMode.priority = 10
mode.add(customInputMode)Defined in
MultiplexingInputMode.addAdjusts 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.
Defined in
MultiplexingInputMode.adjustCursorDefined in
MultiplexingInputMode.cancelCalled by the child context's lookup method.
Parameters
- type: Constructor
- The type argument passed to lookup.
Return Value
- any
- The result of the lookup query, or
null.
See Also
Actually performs the click or tap on the given item.
Parameters
- tableHitTestResult: TableHitTestResult
- Information about the item that has been clicked.
- evt: ClickEventArgs
- The original event arguments for the click. Setting its handled property to
truewill 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.
Return Value
- IInputModeContext
- A new instance that delegates to the parent's context.
Helper method that yields a suitably configured InputModeEventArgs for this input mode.
Parameters
- context: IInputModeContext
An input mode context that is available in the InputModeEventArgs.
Can be
nullin which case a new context for this instance is created automatically.
Return Value
- InputModeEventArgs
- An input mode event argument that is configured for this instance.
Create a new instance of IStripeSelection the first time property stripeSelection is accessed.
false.Return Value
- IStripeSelection
- A new IStripeSelection instance.
See Also
Deletes a single stripe.
Parameters
- stripe: IStripe
- The stripe to delete.
Actually performs a double click on the given item.
trueParameters
- tableHitTestResult: TableHitTestResult
- The item that has been double-clicked.
- evt: ClickEventArgs
- The original event arguments for the click. Setting its handled property to
truewill indicate that the double click was handled and events on other items in the same location are no longer raised.
Starts label editing by executing EDIT_LABEL.
Parameters
- item: IModelItem
- The item whose label or the label itself that should be edited upon the double click gesture.
Return Value
- boolean
trueiff the request was handled.
See Also
Used as a callback to find the items underneath a certain point.
Parameters
- 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.
Return Value
- StripeSubregion
- The stripe subregions that have been found for the location or
null.
Used as a callback to find the items underneath a certain point.
Parameters
- 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.
Return Value
- IEnumerable<StripeSubregion>
- The stripe subregions that have been found for the location.
Returns a list of all modes managed by this instance sorted by their priority.
Return Value
- IList<IInputMode>
- A list of the modes.
Defined in
MultiplexingInputMode.getSortedModesThis 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 parentInputModeContext 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.
Overrides
MultiplexingInputMode.initializesize and otherwise the default settings of the table where owner belongs to. If size is entered as 0, the owner's default size is used.Parameters
- 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.
Return Value
Installs this mode into the given context that is provided by the canvas.
In general a mode can only be installed into a single canvas at all times.
This method is called to initialize this instance. Implement this method to register the corresponding event handlers for the various input events this mode will listen to.
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 installed.
Parameters
- 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 while the mode is installed.
- controller: ConcurrencyController
- The ConcurrencyController for this mode.
Overrides
MultiplexingInputMode.installInvalidates the canvas this mode is currently installed in.
Defined in
MultiplexingInputMode.invalidateCalled when the clickInputMode property value changes and after initialization of the field.
Parameters
- oldMode: ClickInputMode
- the old value, which may be
nullthe first time - newMode: ClickInputMode
- the new value
Parameters
- evt: ClickEventArgs
- The ClickEventArgs of the event.
- sender: any
- The sender of the event.
Parameters
- evt: ClickEventArgs
- The ClickEventArgs of the event.
- sender: any
- The sender of the event.
null and releases the mutex if the mutex is currently owned by this instance. Also, all concurrent child modes will be disabled.Raises the deleted-item event.
Parameters
- evt: InputModeItemEventArgs<IModelItem>
- The instance containing the event data.
Raises the deleted-selection event.
Parameters
- evt: SelectionEventArgs<IStripe>
- The SelectionEventArgs<T> instance containing the event data.
Raises the deleting-selection event.
Parameters
- evt: SelectionEventArgs<IStripe>
- The SelectionEventArgs<T> instance containing the event data.
Raises the item-clicked event.
true.Parameters
- evt: TableItemClickedEventArgs<IModelItem>
- The ItemClickedEventArgs<T> instance that contains the item that has been clicked.
Raises the item-double-clicked event.
true.Parameters
- evt: TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been double-clicked.
Raises the item-left-clicked event.
true.Parameters
- evt: TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been clicked.
Raises the item-left-double-clicked event.
true.Parameters
- evt: TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been double clicked.
Raises the item-right-clicked event.
true.Parameters
- evt: TableItemClickedEventArgs<IModelItem>
- The ItemClickedEventArgs<T> instance that contains the item that has been clicked.
Raises the item-right-double-clicked event.
true.Parameters
- evt: TableItemClickedEventArgs<IModelItem>
- The TableItemClickedEventArgs<T> instance that contains the item that has been double clicked.
Called when the keyboardInputMode changed.
Parameters
- oldMode: KeyboardInputMode
- The old keyboardInputMode.
- newMode: KeyboardInputMode
- The new keyboardInputMode.
onReparentStripeHandlerChanged
(oldHandler: IReparentStripeHandler, newHandler: IReparentStripeHandler)protectedCalled when the reparentStripeHandler property value changes and after initialization of the field.
onReparentStripeHandlerChanged
(oldHandler: IReparentStripeHandler, newHandler: IReparentStripeHandler)Parameters
- oldHandler: IReparentStripeHandler
- the old value, which may be
nullthe first time - newHandler: IReparentStripeHandler
- the new value
onReparentStripeInputModeChanged
(oldHandler: ReparentStripeInputMode, newHandler: ReparentStripeInputMode)protectedCalled when the reparentStripeInputMode property value changes and after initialization of the field.
onReparentStripeInputModeChanged
(oldHandler: ReparentStripeInputMode, newHandler: ReparentStripeInputMode)Parameters
- oldHandler: ReparentStripeInputMode
- the old value, which may be
nullthe first time - newHandler: ReparentStripeInputMode
- the new value
onResizeStripeInputModeChanged
(oldMode: ResizeStripeInputMode, newMode: ResizeStripeInputMode)protectedCalled when the resizeStripeInputMode property value changes and after initialization of the field.
onResizeStripeInputModeChanged
(oldMode: ResizeStripeInputMode, newMode: ResizeStripeInputMode)Parameters
- oldMode: ResizeStripeInputMode
- the old value, which may be
nullthe first time - newMode: ResizeStripeInputMode
- the new value
Called when the stripeDropInputMode property value changes and after initialization of the field.
Parameters
- oldMode: StripeDropInputMode
- the old value, which may be
nullthe first time - newMode: StripeDropInputMode
- the new value
Removes the given mode from this compound mode.
See Also
Return Value
- boolean
trueif the editing process was successfully stopped, or if there was no edit in progress to stop; otherwise,false.
Defined in
MultiplexingInputMode.tryStopUninstalls this mode from the given context.
Parameters
- context: IInputModeContext
- The context to deregister from. This is the same instance that had been passed to install during installation.
Overrides
MultiplexingInputMode.uninstallEvents
Occurs when an item has been deleted interactively by this mode.
Properties of
InputModeItemEventArgs<IModelItem>- context: IInputModeContext
- Gets the context for the current event.
- item: TModelItem
- Gets the item which has been created or changed.
Occurs after all selected items have been removed in deleteSelection.
Properties of
SelectionEventArgs<IStripe>- context: IInputModeContext
- Gets the context for the current event.
- selection: IObservableCollection<T>
- Gets the selection these event arguments refer to.
See Also
Occurs just before the deleteSelection method starts its work and will be followed by any number of deleted-item events and finalized by a deleted-selection event.
Properties of
SelectionEventArgs<IStripe>- context: IInputModeContext
- Gets the context for the current event.
- selection: IObservableCollection<T>
- Gets the selection these event arguments refer to.
See Also
Occurs when an item has been clicked or tapped.
If one of the event handlers sets the handled property to true the event will not be propagated anymore.
Button-specific and input type specific events (item-left-clicked and item-right-clicked) will be raised before this event. If one of those is marked handled this event will not be raised anymore.
Properties of
TableItemClickedEventArgs<IModelItem>- altKey: boolean
- Gets a value indicating whether the alt modifier was pressed at the time of the click.
- clickCount: number
- Gets the number of clicks associated with this event.
- context: IInputModeContext
- Gets the context for the current event.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier was pressed at the time of the click.
- handled: booleanwritable
- Gets or sets a value indicating whether this instance has been handled.
- item: T
- Gets the item that is the subject of the event.
- location: Point
- Gets the location of the click.
- metaKey: boolean
- Gets a value indicating whether the meta modifier was pressed at the time of the click.
- modifiers: ModifierKeys
- Gets the state of the modifiers at the time of the click.
- originalEventArgs: PointerEventArgs
- Gets the pointer event args that caused this event.
- pointerButtons: PointerButtons
- Gets the PointerButtons that have changed for this event.
- pointerType: PointerType
- Gets the type of the pointer that was the source of this event.
- region: StripeSubregion
- The specific region on a stripe where the click has occurred.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier was pressed at the time of the click.
See Also
Occurs when an item has been double-clicked or double-tapped.
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 clickReportingPolicy property of clickInputMode this event may be preceded by no, one, or two item-clicked events (as well as the corresponding button-specific event).
Button-specific and input-type specific events (item-left-double-clicked and item-right-double-clicked) will be raised before this event. If one of those is marked handled this event will not be raised anymore.
Properties of
TableItemClickedEventArgs<IModelItem>- altKey: boolean
- Gets a value indicating whether the alt modifier was pressed at the time of the click.
- clickCount: number
- Gets the number of clicks associated with this event.
- context: IInputModeContext
- Gets the context for the current event.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier was pressed at the time of the click.
- handled: booleanwritable
- Gets or sets a value indicating whether this instance has been handled.
- item: T
- Gets the item that is the subject of the event.
- location: Point
- Gets the location of the click.
- metaKey: boolean
- Gets a value indicating whether the meta modifier was pressed at the time of the click.
- modifiers: ModifierKeys
- Gets the state of the modifiers at the time of the click.
- originalEventArgs: PointerEventArgs
- Gets the pointer event args that caused this event.
- pointerButtons: PointerButtons
- Gets the PointerButtons that have changed for this event.
- pointerType: PointerType
- Gets the type of the pointer that was the source of this event.
- region: StripeSubregion
- The specific region on a stripe where the click has occurred.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier was pressed at the time of the click.
See Also
Occurs when an item has been left clicked.
true the event will not be propagated anymore. This also means that the item-clicked event will not be raised in that case.Properties of
TableItemClickedEventArgs<IModelItem>- altKey: boolean
- Gets a value indicating whether the alt modifier was pressed at the time of the click.
- clickCount: number
- Gets the number of clicks associated with this event.
- context: IInputModeContext
- Gets the context for the current event.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier was pressed at the time of the click.
- handled: booleanwritable
- Gets or sets a value indicating whether this instance has been handled.
- item: T
- Gets the item that is the subject of the event.
- location: Point
- Gets the location of the click.
- metaKey: boolean
- Gets a value indicating whether the meta modifier was pressed at the time of the click.
- modifiers: ModifierKeys
- Gets the state of the modifiers at the time of the click.
- originalEventArgs: PointerEventArgs
- Gets the pointer event args that caused this event.
- pointerButtons: PointerButtons
- Gets the PointerButtons that have changed for this event.
- pointerType: PointerType
- Gets the type of the pointer that was the source of this event.
- region: StripeSubregion
- The specific region on a stripe where the click has occurred.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier was pressed at the time of the click.
See Also
Occurs when an item has been left double clicked.
true the event will not be propagated anymore. This also means that the item-double-clicked event will not be raised in that case.Properties of
TableItemClickedEventArgs<IModelItem>- altKey: boolean
- Gets a value indicating whether the alt modifier was pressed at the time of the click.
- clickCount: number
- Gets the number of clicks associated with this event.
- context: IInputModeContext
- Gets the context for the current event.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier was pressed at the time of the click.
- handled: booleanwritable
- Gets or sets a value indicating whether this instance has been handled.
- item: T
- Gets the item that is the subject of the event.
- location: Point
- Gets the location of the click.
- metaKey: boolean
- Gets a value indicating whether the meta modifier was pressed at the time of the click.
- modifiers: ModifierKeys
- Gets the state of the modifiers at the time of the click.
- originalEventArgs: PointerEventArgs
- Gets the pointer event args that caused this event.
- pointerButtons: PointerButtons
- Gets the PointerButtons that have changed for this event.
- pointerType: PointerType
- Gets the type of the pointer that was the source of this event.
- region: StripeSubregion
- The specific region on a stripe where the click has occurred.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier was pressed at the time of the click.
See Also
Occurs when an item has been right clicked.
true the event will not be propagated anymore. This also means that the item-clicked event will not be raised in that case.Properties of
TableItemClickedEventArgs<IModelItem>- altKey: boolean
- Gets a value indicating whether the alt modifier was pressed at the time of the click.
- clickCount: number
- Gets the number of clicks associated with this event.
- context: IInputModeContext
- Gets the context for the current event.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier was pressed at the time of the click.
- handled: booleanwritable
- Gets or sets a value indicating whether this instance has been handled.
- item: T
- Gets the item that is the subject of the event.
- location: Point
- Gets the location of the click.
- metaKey: boolean
- Gets a value indicating whether the meta modifier was pressed at the time of the click.
- modifiers: ModifierKeys
- Gets the state of the modifiers at the time of the click.
- originalEventArgs: PointerEventArgs
- Gets the pointer event args that caused this event.
- pointerButtons: PointerButtons
- Gets the PointerButtons that have changed for this event.
- pointerType: PointerType
- Gets the type of the pointer that was the source of this event.
- region: StripeSubregion
- The specific region on a stripe where the click has occurred.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier was pressed at the time of the click.
See Also
Occurs when an item has been right double clicked.
true the event will not be propagated anymore. This also means that the item-double-clicked event will not be raised in that case.Properties of
TableItemClickedEventArgs<IModelItem>- altKey: boolean
- Gets a value indicating whether the alt modifier was pressed at the time of the click.
- clickCount: number
- Gets the number of clicks associated with this event.
- context: IInputModeContext
- Gets the context for the current event.
- ctrlKey: boolean
- Gets a value indicating whether the control modifier was pressed at the time of the click.
- handled: booleanwritable
- Gets or sets a value indicating whether this instance has been handled.
- item: T
- Gets the item that is the subject of the event.
- location: Point
- Gets the location of the click.
- metaKey: boolean
- Gets a value indicating whether the meta modifier was pressed at the time of the click.
- modifiers: ModifierKeys
- Gets the state of the modifiers at the time of the click.
- originalEventArgs: PointerEventArgs
- Gets the pointer event args that caused this event.
- pointerButtons: PointerButtons
- Gets the PointerButtons that have changed for this event.
- pointerType: PointerType
- Gets the type of the pointer that was the source of this event.
- region: StripeSubregion
- The specific region on a stripe where the click has occurred.
- shiftKey: boolean
- Gets a value indicating whether the shift modifier was pressed at the time of the click.