public interface ICommand
Implementations of this interface are provided by the library. Use createCommand(String)
to conveniently create
your own implementation of this interface that can then be used with
KeyboardInputMode.addCommandBinding(ICommand, KeyboardInputMode.ExecuteCommandHandler, KeyboardInputMode.CanExecuteCommandHandler)
addCommandBinding}.
createCommand(String)
Modifier and Type | Field and Description |
---|---|
static ICommand |
ADD_LABEL
A
ICommand that can be executed from within the GraphControl
to add another label
to the ILabelOwner that is specified by the
Parameter . |
static ICommand |
ADJUST_GROUP_NODE_SIZE
A
ICommand that can be executed from within the GraphControl
to
adjust the size of the selected group nodes . |
static ICommand |
BEGIN_EDGE_CREATION
This is an
ICommand that CreateEdgeInputMode instances can execute if they
have been installed
in a CanvasControl . |
static ICommand |
CLOSE
A
ICommand to close a document. |
static ICommand |
COLLAPSE_GROUP
|
static ICommand |
COPY
A
ICommand to copy to the clipboard. |
static ICommand |
CUT
A
ICommand to cut an item and place it in the clipboard. |
static ICommand |
DECREASE_ZOOM
A
ICommand to decrease the zoom level. |
static ICommand |
DELETE
A
ICommand to delete an item. |
static ICommand |
DESELECT_ALL
|
static ICommand |
DESELECT_ITEM
A
ICommand that can be executed from within the GraphControl
to deselect the item that is specified by the
Parameter . |
static ICommand |
DUPLICATE
A
ICommand that can be executed from within the GraphControl
to duplicate items
of the current IGraph . |
static ICommand |
EDIT_LABEL
A
ICommand that can be executed from within the GraphControl
to edit the label
that is specified by the Parameter . |
static ICommand |
ENTER_GROUP
A
ICommand that can be executed from within the GraphControl
to switch the local root of the current IFoldingView
view to the given group node. |
static ICommand |
EXIT_GROUP
A
ICommand that can be executed from within the GraphControl
to exit the current local root of the current IFoldingView
view to the given parent view. |
static ICommand |
EXPAND_GROUP
|
static ICommand |
EXTEND_SELECTION_DOWN
A
ICommand to extend the selection downwards. |
static ICommand |
EXTEND_SELECTION_LEFT
A
ICommand to extend the selection to the left. |
static ICommand |
EXTEND_SELECTION_RIGHT
A
ICommand to extend the selection to the right. |
static ICommand |
EXTEND_SELECTION_UP
A
ICommand to extend the selection upwards. |
static ICommand |
FIT_CONTENT
A
ICommand that invokes fitContent if executed. |
static ICommand |
FIT_GRAPH_BOUNDS
The
ICommand that performs the GraphControl.fitGraphBounds(com.yworks.yfiles.geometry.InsetsD)
action. |
static ICommand |
GROUP_SELECTION
|
static ICommand |
HELP
A
ICommand to open help. |
static ICommand |
INCREASE_ZOOM
A
ICommand to increase the zoom level. |
static ICommand |
MOVE_DOWN
A
ICommand to move the selection down. |
static ICommand |
MOVE_FOCUS_BACK
A
ICommand to move the focus backwards. |
static ICommand |
MOVE_FOCUS_DOWN
A
ICommand to move the focus downwards. |
static ICommand |
MOVE_FOCUS_FORWARD
A
ICommand to move the focus forwards. |
static ICommand |
MOVE_FOCUS_PAGE_DOWN
A
ICommand to move the focus up a page. |
static ICommand |
MOVE_FOCUS_PAGE_UP
A
ICommand to move the focus up a page. |
static ICommand |
MOVE_FOCUS_UP
A
ICommand to move the focus upwards. |
static ICommand |
MOVE_LEFT
A
ICommand to move the selection left. |
static ICommand |
MOVE_RIGHT
A
ICommand to move the selection right. |
static ICommand |
MOVE_TO_PAGE_DOWN
A
ICommand to move the selection down a page. |
static ICommand |
MOVE_TO_PAGE_UP
A
ICommand to move the selection up a page. |
static ICommand |
MOVE_UP
A
ICommand to move the selection up. |
static ICommand |
NEW
A
ICommand to create a new document. |
static ICommand |
OPEN
A
ICommand to open a document. |
static ICommand |
PASTE
A
ICommand to paste from the clipboard. |
static ICommand |
PRINT
A
ICommand to print. |
static ICommand |
PRINT_PREVIEW
A
ICommand that indicates the intention to print and show a preview of what to print beforehand. |
static ICommand |
PROPERTIES
A
ICommand to show properties of an item. |
static ICommand |
REDO
A
ICommand to redo a previously undone operation. |
static ICommand |
REVERSE_EDGE
A
ICommand that reverses the direction of edges. |
static ICommand |
SAVE
A
ICommand to save an item. |
static ICommand |
SAVE_AS
A
ICommand to save an item under a new name. |
static ICommand |
SCROLL_PAGE_DOWN
A
ICommand to scroll down. |
static ICommand |
SCROLL_PAGE_LEFT
A
ICommand to scroll left. |
static ICommand |
SCROLL_PAGE_RIGHT
A
ICommand to scroll right. |
static ICommand |
SCROLL_PAGE_UP
A
ICommand to scroll up. |
static ICommand |
SELECT_ALL
A
ICommand to select all items. |
static ICommand |
SELECT_ITEM
A
ICommand that can be executed from within the GraphControl
to select the item that is specified by the
Parameter . |
static ICommand |
SELECT_TO_PAGE_DOWN
A
ICommand to extend the selection a page downwards. |
static ICommand |
SELECT_TO_PAGE_UP
A
ICommand to extend the selection a page upwards. |
static ICommand |
SET_CURRENT_ITEM
A
ICommand that invokes CurrentItem if executed. |
static ICommand |
TOGGLE_EXPANSION_STATE
A
ICommand that can be executed from within the GraphControl
to toggle
the collapsed/expanded state of currently selected group nodes. |
static ICommand |
TOGGLE_ITEM_SELECTION
A
ICommand that can be executed from within the GraphControl
to toggle the selection state of the item that is specified by the
Parameter . |
static ICommand |
UNDO
A
ICommand to undo the previous operation. |
static ICommand |
UNGROUP_SELECTION
A
ICommand that can be executed from within the GraphControl
to ungroup the currently selected items . |
static ICommand |
UPDATE_CONTENT_RECT
A
ICommand that invokes updateContentRect
if executed. |
static ICommand |
ZOOM
A
ICommand to set the zoom level. |
static ICommand |
ZOOM_TO_CURRENT_ITEM
A
ICommand that changes the Zoom and the ViewPoint
in an animated fashion such that the CurrentItem becomes
fully visible. |
Modifier and Type | Method and Description |
---|---|
void |
addCanExecuteChangedListener(IEventHandler canExecuteChangedEvent)
Adds the given listener for the
CanExecuteChanged event that occurs when the result of a call to canExecute(Object, Object)
may yield a different result. |
default boolean |
canExecute()
Determines whether this command be executed with respect to the given parameter and target.
|
default boolean |
canExecute(Object parameter)
Determines whether this command be executed with respect to the given parameter and target.
|
boolean |
canExecute(Object parameter,
Object target)
Determines whether this command be executed with respect to the given parameter and target.
|
static ICommand |
createCommand()
Creates a new
ICommand instance that does nothing. |
static ICommand |
createCommand(String name)
Creates a new
ICommand instance that does nothing. |
default void |
execute()
Executes this command with respect to the given parameter and target.
|
default void |
execute(Object parameter)
Executes this command with respect to the given parameter and target.
|
void |
execute(Object parameter,
Object target)
Executes this command with respect to the given parameter and target.
|
String |
getName()
Gets an optional identifier for this command.
|
static void |
invalidateRequerySuggested()
Suggests a requery of the
executability of all
routed commands that are known to the system to adjust the UI to properly reflect the state. |
static void |
processInput(Object sender,
boolean keyDown,
IEventArgs eventArgs) |
void |
removeCanExecuteChangedListener(IEventHandler canExecuteChangedEvent)
Removes the given listener for the
CanExecuteChanged event that occurs when the result of a call to canExecute(Object, Object)
may yield a different result. |
static final ICommand ADD_LABEL
ICommand
that can be executed
from within the GraphControl
to add another label
to the ILabelOwner
that is specified by the
Parameter
.
If no Parameter
is set, this will trigger
the GraphEditorInputMode.onAddLabel()
if GraphEditorInputMode
is used.
static final ICommand ADJUST_GROUP_NODE_SIZE
ICommand
that can be executed
from within the GraphControl
to
adjust the size of the selected group nodes
.
The default keyboard binding for this command is ctrl-shift-G.
static final ICommand BEGIN_EDGE_CREATION
ICommand
that CreateEdgeInputMode
instances can execute if they
have been installed
in a CanvasControl
.
If this command gets executed, the Parameter
is inspected to see if it is set to either an IPortCandidate
, an
IPort
, or an INode
that is an element in the
currently edited graph instance. If so, method CreateEdgeInputMode.doStartEdgeCreation(com.yworks.yfiles.view.input.IPortCandidate)
will be invoked and the user can finish the edge creation gesture.
static final ICommand CLOSE
ICommand
to close a document.
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. closing the current window.
There is no default shortcut for this command.
static final ICommand COLLAPSE_GROUP
ICommand
that can be executed
from within the GraphControl
to collapse
group
nodes.
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 Iterable
instance, then all group nodes in that enumeration are collapsed.
static final ICommand COPY
ICommand
to copy to the clipboard.
GraphViewerInputMode
and GraphEditorInputMode
handle this command in conjunction with GraphClipboard
.
The default shortcuts for this command are Ctrl+C and Ctrl+Ins on Windows and Linux and Command+C and Command+Ins on Mac OS.
static final ICommand CUT
ICommand
to cut an item and place it in the clipboard.
GraphEditorInputMode
handles this command in conjunction with
GraphClipboard
.
The default shortcuts for this command are Ctrl+X and Shift+Del on Windows and Linux and Command+X and Shift+Del on Mac OS.
static final ICommand DECREASE_ZOOM
ICommand
to decrease the zoom level.
CanvasControl
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.
INCREASE_ZOOM
,
ZOOM
static final ICommand DELETE
ICommand
to delete an item.
GraphEditorInputMode
handles this command to delete the currently selected items.
The default shortcut for this command is Del.
static final ICommand DESELECT_ALL
static final ICommand DESELECT_ITEM
ICommand
that can be executed
from within the GraphControl
to deselect the item that is specified by the
Parameter
.static final ICommand DUPLICATE
ICommand
that can be executed
from within the GraphControl
to duplicate items
of the current IGraph
.static final ICommand EDIT_LABEL
ICommand
that can be executed
from within the GraphControl
to edit the label
that is specified by the Parameter
.
If no Parameter
is set, this will trigger
the GraphEditorInputMode.onEditLabel()
if GraphEditorInputMode
is used.
static final ICommand ENTER_GROUP
ICommand
that can be executed
from within the GraphControl
to switch the local root
of the current IFoldingView
view to the given group node.static final ICommand EXIT_GROUP
ICommand
that can be executed
from within the GraphControl
to exit the current local root
of the current IFoldingView
view to the given parent view.static final ICommand EXPAND_GROUP
ICommand
that can be executed
from within the GraphControl
to expand
group
nodes.
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 Iterable
instance, then all group nodes in that enumeration are expanded.
static final ICommand EXTEND_SELECTION_DOWN
ICommand
to extend the selection downwards.
NavigationInputMode
handles this command to extend the selection with the next item
below.
The default shortcut for this command is Shift+↓.
static final ICommand EXTEND_SELECTION_LEFT
ICommand
to extend the selection to the left.
NavigationInputMode
handles this command to extend the selection with the next item
to the left.
The default shortcut for this command is Shift+←.
static final ICommand EXTEND_SELECTION_RIGHT
ICommand
to extend the selection to the right.
NavigationInputMode
handles this command to extend the selection with the next item
to the right.
The default shortcut for this command is Shift+→.
static final ICommand EXTEND_SELECTION_UP
ICommand
to extend the selection upwards.
NavigationInputMode
handles this command to extend the selection with the next item
above.
The default shortcut for this command is Shift+↑.
static final ICommand FIT_CONTENT
ICommand
that invokes fitContent
if executed.static final ICommand FIT_GRAPH_BOUNDS
ICommand
that performs the GraphControl.fitGraphBounds(com.yworks.yfiles.geometry.InsetsD)
action.
The parameter can be either an InsetsD
or convertible that will be used to create an
appropriately sized insets object from.
static final ICommand GROUP_SELECTION
static final ICommand HELP
ICommand
to open help.
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. showing the online help.
The default shortcut for this command is F1.
static final ICommand INCREASE_ZOOM
ICommand
to increase the zoom level.
CanvasControl
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.
DECREASE_ZOOM
,
ZOOM
static final ICommand MOVE_DOWN
ICommand
to move the selection down.
NavigationInputMode
handles this command to select the next item below.
The default shortcut for this command is ↓.
MOVE_UP
,
MOVE_LEFT
,
MOVE_RIGHT
,
MOVE_TO_PAGE_UP
,
MOVE_TO_PAGE_DOWN
static final ICommand MOVE_FOCUS_BACK
ICommand
to move the focus backwards.
NavigationInputMode
handles this command to focus the next item to the left.
The default shortcut for this command is Ctrl+← on Windows and Linux and Command+← on Mac OS.
static final ICommand MOVE_FOCUS_DOWN
ICommand
to move the focus downwards.
NavigationInputMode
handles this command to focus the next item below.
The default shortcut for this command is Ctrl+↓ on Windows and Linux and Command+↓ on Mac OS.
static final ICommand MOVE_FOCUS_FORWARD
ICommand
to move the focus forwards.
NavigationInputMode
handles this command to focus the next item to the right.
The default shortcut for this command is Ctrl+→ on Windows and Linux and Command+→ on Mac OS.
static final ICommand MOVE_FOCUS_PAGE_DOWN
ICommand
to move the focus up a page.
NavigationInputMode
handles this command to focus the first child node, if
possible.
The default shortcut for this command is Ctrl+Page↓ on Windows and Linux and Command+↓ on Mac OS.
static final ICommand MOVE_FOCUS_PAGE_UP
ICommand
to move the focus up a page.
NavigationInputMode
handles this command to focus the parent node, if possible.
The default shortcut for this command is Ctrl+Page↑ on Windows and Linux and Command+↑ on Mac OS.
static final ICommand MOVE_FOCUS_UP
ICommand
to move the focus upwards.
NavigationInputMode
handles this command to focus the next item above.
The default shortcut for this command is Ctrl+↑ on Windows and Linux and Command+↑ on Mac OS.
static final ICommand MOVE_LEFT
ICommand
to move the selection left.
NavigationInputMode
handles this command to select the next item to the left.
The default shortcut for this command is ←.
MOVE_UP
,
MOVE_DOWN
,
MOVE_RIGHT
,
MOVE_TO_PAGE_UP
,
MOVE_TO_PAGE_DOWN
static final ICommand MOVE_RIGHT
ICommand
to move the selection right.
NavigationInputMode
handles this command to select the next item to the right.
The default shortcut for this command is →.
MOVE_UP
,
MOVE_DOWN
,
MOVE_LEFT
,
MOVE_TO_PAGE_UP
,
MOVE_TO_PAGE_DOWN
static final ICommand MOVE_TO_PAGE_DOWN
ICommand
to move the selection down a page.
NavigationInputMode
handles this command to select the first child node, if
possible.
The default shortcut for this command is Page↓.
MOVE_UP
,
MOVE_DOWN
,
MOVE_LEFT
,
MOVE_RIGHT
,
MOVE_TO_PAGE_UP
static final ICommand MOVE_TO_PAGE_UP
ICommand
to move the selection up a page.
NavigationInputMode
handles this command to select the parent node, if possible.
The default shortcut for this command is Page↑.
MOVE_UP
,
MOVE_DOWN
,
MOVE_LEFT
,
MOVE_RIGHT
,
MOVE_TO_PAGE_DOWN
static final ICommand MOVE_UP
ICommand
to move the selection up.
NavigationInputMode
handles this command to select the next item above.
The default shortcut for this command is ↑.
MOVE_DOWN
,
MOVE_LEFT
,
MOVE_RIGHT
,
MOVE_TO_PAGE_UP
,
MOVE_TO_PAGE_DOWN
static final ICommand NEW
ICommand
to create a new document.
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. creating a new graph.
The default shortcut for this command is Ctrl+N on Windows and Linux and Command+N on Mac OS.
static final ICommand OPEN
ICommand
to open a document.
GraphControl
handles this command to open a dialog prompting to open a GraphML file.
The default shortcut for this command is Ctrl+O on Windows and Linux and Command+O on Mac OS.
static final ICommand PASTE
ICommand
to paste from the clipboard.
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 on Windows and Linux and Command+V and Shift+Ins on Mac OS.
static final ICommand PRINT
ICommand
to print.
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 on Windows and Linux and Command+P on Mac OS.
PRINT_PREVIEW
static final ICommand PRINT_PREVIEW
ICommand
that indicates the intention to print and show a preview of what to print beforehand.
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 on Windows and Linux and Command+F2 on Mac OS.
PRINT
static final ICommand PROPERTIES
ICommand
to show properties of an item.
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.
There is no default shortcut for this command.
static final ICommand REDO
ICommand
to redo a previously undone operation.
GraphEditorInputMode
handles this command in conjunction with
UndoEngine
.
The default shortcut for this command is Ctrl+Y on Windows and Linux and Command+Y on Mac OS.
UNDO
static final ICommand REVERSE_EDGE
ICommand
that reverses the direction of edges.
GraphEditorInputMode
can execute this command if it is installed in a
GraphControl
. The 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.
static final ICommand SAVE
ICommand
to save an item.
GraphControl
handles this command to open a dialog prompting to save the graph as a
GraphML file
(SAVE_AS
), 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 on Windows and Linux and Command+S on Mac OS.
static final ICommand SAVE_AS
ICommand
to save an item under a new name.
GraphControl
handles this command to open a dialog prompting to save the graph as a
GraphML file.
There is no default shortcut for this command.
static final ICommand SCROLL_PAGE_DOWN
ICommand
to scroll down.
CanvasControl
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↓.
SCROLL_PAGE_UP
,
SCROLL_PAGE_LEFT
,
SCROLL_PAGE_RIGHT
static final ICommand SCROLL_PAGE_LEFT
ICommand
to scroll left.
CanvasControl
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.
SCROLL_PAGE_UP
,
SCROLL_PAGE_DOWN
,
SCROLL_PAGE_RIGHT
static final ICommand SCROLL_PAGE_RIGHT
ICommand
to scroll right.
CanvasControl
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.
SCROLL_PAGE_UP
,
SCROLL_PAGE_DOWN
,
SCROLL_PAGE_LEFT
static final ICommand SCROLL_PAGE_UP
ICommand
to scroll up.
CanvasControl
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↑.
SCROLL_PAGE_DOWN
,
SCROLL_PAGE_LEFT
,
SCROLL_PAGE_RIGHT
static final ICommand SELECT_ALL
ICommand
to select all items.
GraphEditorInputMode
and GraphViewerInputMode
handle this command to select all items in the graph.
The default shortcut for this command is Ctrl+A on Windows and Linux and Command+A on Mac OS.
static final ICommand SELECT_ITEM
ICommand
that can be executed
from within the GraphControl
to select the item that is specified by the
Parameter
.static final ICommand SELECT_TO_PAGE_DOWN
ICommand
to extend the selection a page downwards.
NavigationInputMode
handles this command to extend the selection with the first
child node, if possible.
The default shortcut for this command is Shift+Page↓.
static final ICommand SELECT_TO_PAGE_UP
ICommand
to extend the selection a page upwards.
NavigationInputMode
handles this command to extend the selection with the parent
node, if possible.
The default shortcut for this command is Shift+Page↑.
static final ICommand SET_CURRENT_ITEM
ICommand
that invokes CurrentItem
if executed.static final ICommand TOGGLE_EXPANSION_STATE
ICommand
that can be executed
from within the GraphControl
to toggle
the collapsed/expanded state of currently selected group nodes.
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 Iterable
instance, then all group nodes in that enumeration are toggled.
static final ICommand TOGGLE_ITEM_SELECTION
ICommand
that can be executed
from within the GraphControl
to toggle the selection state of the item that is specified by the
Parameter
.static final ICommand UNDO
ICommand
to undo the previous operation.
GraphEditorInputMode
handles this command in conjunction with
UndoEngine
.
The default shortcut for this command is Ctrl+Z on Windows and Linux and Command+Z on Mac OS.
REDO
static final ICommand UNGROUP_SELECTION
ICommand
that can be executed
from within the GraphControl
to ungroup the currently selected items
.static final ICommand UPDATE_CONTENT_RECT
ICommand
that invokes updateContentRect
if executed.static final ICommand ZOOM
ICommand
to set the zoom level.
CanvasControl
handles this command to change the viewport. If the parameter is a
PointD
, the viewport will be centered as that point while not changing the zoom
level. If the parameter is a RectD
, 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 RectD
mentioned before. This can be used to zoom to a specific IModelItem
. Finally, if the
parameter is convertible
to Double
, it will be used as the new zoom level to set.
There is no default shortcut for this command.
INCREASE_ZOOM
,
DECREASE_ZOOM
static final ICommand ZOOM_TO_CURRENT_ITEM
ICommand
that changes the Zoom
and the ViewPoint
in an animated fashion such that the CurrentItem
becomes
fully visible.void addCanExecuteChangedListener(IEventHandler canExecuteChangedEvent)
CanExecuteChanged
event that occurs when the result of a call to canExecute(Object, Object)
may yield a different result.canExecuteChangedEvent
- The listener to add.removeCanExecuteChangedListener(IEventHandler)
default boolean canExecute()
execute(Object, Object)
can be called with the given parameter
and target
.default boolean canExecute(Object parameter)
parameter
- The parameter or null
execute(Object, Object)
can be called with the given parameter
and target
.boolean canExecute(Object parameter, Object target)
parameter
- The parameter or null
target
- The target to execute the command on or null
execute(Object, Object)
can be called with the given parameter
and target
.static ICommand createCommand()
ICommand
instance that does nothing.
The return value serves as a token and does not in itself contain any command handling logic. Use to associate command handlers with the instance returned.
ICommand
instance.static ICommand createCommand(String name)
ICommand
instance that does nothing.
The return value serves as a token and does not in itself contain any command handling logic. Use to associate command handlers with the instance returned.
name
- The optional name for the command.ICommand
instance.default void execute()
default void execute(Object parameter)
parameter
- The parameter or null
void execute(Object parameter, Object target)
parameter
- The parameter or null
target
- The target to execute the command on or null
String getName()
static void invalidateRequerySuggested()
executability
of all
routed commands that are known to the system to adjust the UI to properly reflect the state.
This will enqueue a delayed query into the event queue.
static void processInput(Object sender, boolean keyDown, IEventArgs eventArgs)
void removeCanExecuteChangedListener(IEventHandler canExecuteChangedEvent)
CanExecuteChanged
event that occurs when the result of a call to canExecute(Object, Object)
may yield a different result.canExecuteChangedEvent
- The listener to remove.addCanExecuteChangedListener(IEventHandler)