Base interface for a command that can be executed.
Remarks
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.ICommand
See Also
Methods
Determines whether this command be executed with respect to the given parameter and target.
Events
Occurs when the result of a call to canExecute may yield a different result.
Constants
A ICommand that can be executed from within the GraphComponent to add another label to the ILabelOwner that is specified by the command parameter.
Remarks
If the parameter to this command is an ILabelOwner instance, then we will use that item. If the parameter is null
and there is exactly one selected ILabelOwner, then we will use the selected item. If we there is no ILabelOwner found and the GraphEditorInputMode is used, this will trigger the onAddLabel.
The default shortcut for this command is Shift+F2.
See Also
A ICommand that can be executed from within the GraphComponent to adjust the size of group nodes.
Remarks
If the parameter to this command is null
, the sizes of the currently selected group nodes are adjusted. If the parameter is an INode instance, the size of that group node will be adjusted. If the parameter is an IEnumerable<T> instance, then the sizes of all group nodes in that enumeration are adjusted.
The default shortcut for this command is Ctrl-Shift-G.
See Also
A ICommand that CreateEdgeInputMode instances can execute if they have been installed in a CanvasComponent.
Remarks
See Also
An ICommand that can be executed from within the GraphComponent to collapse group nodes.
Remarks
If the parameter to this command is null
, the currently selected group nodes are collapsed. If the parameter is an INode instance, that group node will be collapsed. If the parameter is an IEnumerable<T> instance, then all group nodes in that enumeration are collapsed.
The default shortcut for this command is Ctrl+Subtract or Ctrl+OemMinus.
See Also
An ICommand to copy to the clipboard.
Remarks
GraphViewerInputMode and GraphEditorInputMode handle this command in conjunction with GraphClipboard.
The default shortcuts for this command are Ctrl+C and Ctrl+Ins.
See Also
An ICommand to cut an item and place it in the clipboard.
Remarks
GraphEditorInputMode handles this command in conjunction with GraphClipboard.
The default shortcuts for this command are Ctrl+X and Shift+Del.
See Also
An ICommand to decrease the zoom level.
Remarks
CanvasComponent handles this command to decrease the zoom level by 20%. A different factor from the default 1.2
may be given as the command parameter.
There is no default shortcut for this command.
See Also
An ICommand to delete an item.
Remarks
GraphEditorInputMode handles this command to delete the currently selected items.
The default shortcut for this command is Del.
See Also
An ICommand that can be executed from within the GraphComponent to clear the selection.
Remarks
See Also
A ICommand that can be executed from within the GraphComponent to deselect an item.
Remarks
null
and there is exactly one selected item, then the selected item will be deselected.See Also
An ICommand that can be executed from within the GraphComponent to duplicate items of the current IGraph.
Remarks
A ICommand that can be executed from within the GraphComponent to edit an label.
Remarks
We first determine the item to edit: If the parameter to this command is an IModelItem instance, then we will use that item. If the parameter is null
and there is exactly one selected item, then we will use the selected item.
Then we determine the label to edit from the given item: If the item is an ILabel instance, then that label will be edited. If the item is an ILabelOwner instance with an editable label, then that label will be edited. If the item is an ILabelOwner instance with no editable label, then an new label will be added and edited. Otherwise this will trigger the onEditLabel if GraphEditorInputMode is used.
The default shortcut for this command is F2.
See Also
An ICommand that can be executed from within the GraphComponent to switch the local root of the current IFoldingView view to the given group node.
Remarks
If the parameter to this command is null
, the currently selected group node is entered. If the parameter is an INode instance that is a group node, that group node will be entered.
The default shortcut for this command is Ctrl+Enter.
See Also
An ICommand that can be executed from within the GraphComponent to exit the current local root of the current IFoldingView view to the given parent view.
Remarks
See Also
An ICommand that can be executed from within the GraphComponent to expand group nodes.
Remarks
If the parameter to this command is null
, the currently selected group nodes are expanded. If the parameter is an INode instance, that node will be expanded. If the parameter is an IEnumerable<T> instance, then all group nodes in that enumeration are expanded.
The default shortcut for this command is Ctrl+Add or Ctrl+Oemplus.
See Also
An ICommand to extend the selection downwards.
Remarks
NavigationInputMode handles this command to extend the selection with the next item below.
The default shortcut for this command is Shift+Arrow Down.
See Also
An ICommand to extend the selection to the left.
Remarks
NavigationInputMode handles this command to extend the selection with the next item to the left.
The default shortcut for this command is Shift+Arrow Left.
See Also
An ICommand to extend the selection to the right.
Remarks
NavigationInputMode handles this command to extend the selection with the next item to the right.
The default shortcut for this command is Shift+Arrow Right.
See Also
An ICommand to extend the selection upwards.
Remarks
NavigationInputMode handles this command to extend the selection with the next item above.
The default shortcut for this command is Shift+Arrow Up.
See Also
An ICommand that invokes fitContent if executed.
See Also
The ICommand that performs the fitGraphBounds action.
Remarks
The parameter can be either an Insets or convertible that will be used to create an appropriately sized insets object from.
This command considers margins defined by contentMargins. The margins define the visible whitespace around the actual contentRect.
See Also
An ICommand that can be executed from within the GraphComponent to group the currently selected items.
An ICommand to increase the zoom level.
Remarks
CanvasComponent handles this command to increase the zoom level by 20%. A different factor from the default 1.2
may be given as the command parameter.
There is no default shortcut for this command.
See Also
A ICommand that lowers the visual representations of IModelItems one step to back.
Remarks
Lowers the main canvas objects of IModelItems in their parent group one step to back.
GraphEditorInputMode can execute this command if it is installed in a GraphComponent and. As command parameter the following values are accepted:
null
, in which case the selection is lowered or the currentItem if useCurrentItemForCommands is set.- a single IModelItem that shall be lowered.
- an IEnumerable<IModelItem> which shall be lowered.
See Also
An ICommand to move the selection down.
Remarks
NavigationInputMode handles this command to select the next item below.
The default shortcut for this command is Arrow Down.
See Also
An ICommand to move the focus backwards.
Remarks
NavigationInputMode handles this command to focus the next item to the left.
The default shortcut for this command is Ctrl+Arrow Left.
See Also
An ICommand to move the focus downwards.
Remarks
NavigationInputMode handles this command to focus the next item below.
The default shortcut for this command is Ctrl+Arrow Down.
See Also
An ICommand to move the focus forwards.
Remarks
NavigationInputMode handles this command to focus the next item to the right.
The default shortcut for this command is Ctrl+Arrow Right.
See Also
An ICommand to move the focus up a page.
Remarks
NavigationInputMode handles this command to focus the first child node, if possible.
The default shortcut for this command is Ctrl+Page Down.
See Also
An ICommand to move the focus up a page.
Remarks
NavigationInputMode handles this command to focus the parent node, if possible.
The default shortcut for this command is Ctrl+Page Up.
See Also
An ICommand to move the focus upwards.
Remarks
NavigationInputMode handles this command to focus the next item above.
The default shortcut for this command is Ctrl+Arrow Up.
See Also
An ICommand to move the selection left.
Remarks
NavigationInputMode handles this command to select the next item to the left.
The default shortcut for this command is Arrow Left.
See Also
An ICommand to move the selection right.
Remarks
NavigationInputMode handles this command to select the next item to the right.
The default shortcut for this command is Arrow Right.
See Also
An ICommand to move the selection down a page.
Remarks
NavigationInputMode handles this command to select the first child node, if possible.
The default shortcut for this command is Page Down.
See Also
An ICommand to move the selection up a page.
Remarks
NavigationInputMode handles this command to select the parent node, if possible.
The default shortcut for this command is Page Up.
See Also
An ICommand to move the selection up.
Remarks
NavigationInputMode handles this command to select the next item above.
The default shortcut for this command is Arrow Up.
See Also
An ICommand to open a document.
Remarks
GraphComponent handles this command to open a dialog prompting to open a GraphML file.
The default shortcut for this command is Ctrl+O.
See Also
An ICommand to paste from the clipboard.
Remarks
GraphEditorInputMode handles this command in conjunction with GraphClipboard. The command parameter can be an IPoint to specify a location for pasting.
The default shortcuts for this command are Ctrl+V and Shift+Ins.
See Also
An ICommand to print.
Remarks
This command is not necessarily handled by yFiles. Application writers can handle the command in a manner that makes sense in the context of the application, e.g. printing the currently visible portion of the graph.
The default shortcut for this command is Ctrl+P.
See Also
An ICommand that indicates the intention to print and show a preview of what to print beforehand.
Remarks
This command is not necessarily handled by yFiles. Application writers can handle the command in a manner that makes sense in the context of the application.
The default shortcut for this command is Ctrl+F2.
See Also
A ICommand that raises the visual representations of IModelItems one step to the front.
Remarks
Raises the main canvas objects of IModelItems in their parent group one step to the front.
GraphEditorInputMode can execute this command if it is installed in a GraphComponent. As command parameter the following values are accepted:
null
, in which case the selection is raised or the currentItem if useCurrentItemForCommands is set.- a single IModelItem that shall be raised.
- an IEnumerable<IModelItem> which shall be raised.
See Also
An ICommand to redo a previously undone operation.
Remarks
GraphEditorInputMode handles this command in conjunction with UndoEngine.
The default shortcut for this command is Ctrl+Y.
See Also
An ICommand that reverses the direction of edges.
Remarks
GraphEditorInputMode can execute this command if it is installed in a GraphComponent. The command parameter specifies the edges to be reversed and can be an IEdge, an IEnumerable<IEdge> or null
. If the parameter is null
the currently selected edges will be reversed.
The default shortcut for this command is Ctrl+R.
See Also
An ICommand to save an item.
Remarks
GraphComponent handles this command to open a dialog prompting to save the graph as a GraphML file, if the graph was never saved before, and simply saving to the previous file name if it was.
The default shortcut for this command is Ctrl+S.
See Also
An ICommand to scroll down.
Remarks
CanvasComponent handles this command to move the viewport downwards. By default this is done by a full viewport height. The parameter can be a factor that is applied to the viewport height to move the viewport by a different amount.
The default shortcut for this command is Page Down.
See Also
An ICommand to scroll left.
Remarks
CanvasComponent handles this command to move the viewport to the left. By default this is done by a full viewport width. The parameter can be a factor that is applied to the viewport width to move the viewport by a different amount.
There is no default shortcut for this command.
See Also
An ICommand to scroll right.
Remarks
CanvasComponent handles this command to move the viewport to the right. By default this is done by a full viewport width. The parameter can be a factor that is applied to the viewport width to move the viewport by a different amount.
There is no default shortcut for this command.
See Also
An ICommand to scroll up.
Remarks
CanvasComponent handles this command to move the viewport upwards. By default this is done by a full viewport height. The parameter can be a factor that is applied to the viewport height to move the viewport by a different amount.
The default shortcut for this command is Page Up.
See Also
An ICommand to select all items.
Remarks
GraphEditorInputMode and GraphViewerInputMode handle this command to select all items in the graph.
The default shortcut for this command is Ctrl+A.
See Also
A ICommand that can be executed from within the GraphComponent to select an item.
Remarks
null
and there is exactly one selected item, then that item remains selected. Otherwise the current item will be selected.See Also
An ICommand to extend the selection a page downwards.
Remarks
NavigationInputMode handles this command to extend the selection with the first child node, if possible.
The default shortcut for this command is Shift+Page Down.
See Also
An ICommand to extend the selection a page upwards.
Remarks
NavigationInputMode handles this command to extend the selection with the parent node, if possible.
The default shortcut for this command is Shift+Page Up.
See Also
An ICommand that invokes currentItem if executed.
See Also
A ICommand that brings the visual representations of IModelItems to back.
Remarks
Brings the main canvas objects of IModelItems in their parent group to back.
GraphEditorInputMode can execute this command if it is installed in a GraphComponent. As command parameter the following values are accepted:
null
, in which case the selection is brought to back or the currentItem if useCurrentItemForCommands is set.- a single IModelItem that shall be brought to back.
- an IEnumerable<IModelItem> which shall be brought to back.
See Also
A ICommand that brings the visual representations of IModelItems to the front.
Remarks
Brings the main canvas objects of IModelItems in their parent group to the front.
GraphEditorInputMode can execute this command if it is installed in a GraphComponent. As command parameter the following values are accepted:
null
, in which case the selection is brought to the front or the currentItem if useCurrentItemForCommands is set.- a single IModelItem that shall be brought to the front.
- an IEnumerable<IModelItem> which shall be brought to the front.
See Also
An ICommand that can be executed from within the GraphComponent to toggle the collapsed/expanded state of currently selected group nodes.
Remarks
If the parameter to this command is null
, the currently selected group nodes are toggled. If the parameter is an INode instance, that group node will be toggled. If the parameter is an IEnumerable<T> instance, then all group nodes in that enumeration are toggled.
The default shortcut for this command is Ctrl+Multiply.
See Also
A ICommand that can be executed from within the GraphComponent to toggle the selection state of an item.
Remarks
If the parameter to this command is an IModelItem instance, then the selection state of that item will be toggled. If the parameter is null
and there is exactly one selected item, then the selected item will be deselected. Otherwise the selection state of current item will be toggled.
The default shortcut for this command is Ctrl-Space.
See Also
An ICommand to undo the previous operation.
Remarks
GraphEditorInputMode handles this command in conjunction with UndoEngine.
The default shortcut for this command is Ctrl+Z.
See Also
An ICommand that can be executed from within the GraphComponent to ungroup the currently selected items.
An ICommand that invokes updateContentRect if executed.
See Also
An ICommand to set the zoom level.
Remarks
CanvasComponent handles this command to change the viewport. If the parameter is a Point, the viewport will be centered as that point while not changing the zoom level. If the parameter is a Rect, the viewport will encompass that rectangle and change the zoom level accordingly. If the parameter is an instance of ILookup which returns an instance of IBoundsProvider, that IBoundsProvider will be used to obtain a rectangle, which will be used in the same manner as the Rect mentioned before. This can be used to zoom to a specific IModelItem. Finally, if the parameter is a number, it will be used as the new zoom level to set.
There is no default shortcut for this command.
See Also
An ICommand that changes the zoom and the viewPoint in an animated fashion such that the currentItem becomes fully visible.
Remarks
This command considers margins defined by contentMargins. The margins define the visible whitespace around the rectangle in which the respective item is centered. This way it is also possible to get asymmetric whitespace around the item.
If a viewportLimiter is enabled, its bounds are respected such that it may also happen that the item is not fully visible.
See Also
Static Methods
Creates a new ICommand instance that does nothing.
Remarks
Parameters
A map of options to pass to the method.
- name - string
- The optional name for the command.
Returns
Suggests a re-query of the executability of all commands that are known to the system to adjust the UI to properly reflect the state.