Package se.conciliate.extensions.ui
Interface ShellAction
public interface ShellAction
An action that can be performed in the shell by a shortcut command.
You can also query the shell for an action using its unique ID.
-
Method Summary
Modifier and TypeMethodDescriptiongetID()
Returns a unique ID for the action.Returns the keystroke used to perform the action.boolean
Returns true if the action can be executed in the current program state.void
run()
Runs the action.void
setEnabled
(boolean enabled) Marks the action as enabled/disabled.void
setSelected
(boolean selected) Marks the action as selected/unselected.
-
Method Details
-
getID
String getID()Returns a unique ID for the action. -
isRunnable
boolean isRunnable()Returns true if the action can be executed in the current program state. This allows multiple actions to share keystrokes. The first one encountered that is runnable will be executed. -
run
void run()Runs the action. -
setEnabled
void setEnabled(boolean enabled) Marks the action as enabled/disabled. This is useful when backing the shell action against a swing actions to get correct behavior in menus, can be ignored otherwise. -
setSelected
void setSelected(boolean selected) Marks the action as selected/unselected. This is useful when backing the shell action against a swing actions to get correct behavior in menus, can be ignored otherwise. -
getKeyStroke
KeyStroke getKeyStroke()Returns the keystroke used to perform the action.
-