Modifier and Type | Field and Description |
---|---|
private java.lang.String |
command
The command to execute.
|
private CommandQueue |
commandQueue
The command queue for sending commands.
|
Constructor and Description |
---|
ShortcutCommand(CommandQueue commandQueue,
java.lang.String command)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
displaysFace(Face face)
Returns whether this shortcut displays the given face.
|
void |
dispose()
Releases all allocated resources.
|
void |
execute()
Executes the shortcut.
|
java.lang.String |
getCommand()
Returns the command to execute.
|
java.lang.String |
getTooltipText()
Returns the current tooltip text.
|
void |
visit(ShortcutVisitor visitor)
Calls a
ShortcutVisitor 's visit() function for this
instance. |
addShortcutListener, fireModifiedEvent, removeShortcutListener
@NotNull private final java.lang.String command
@NotNull private final CommandQueue commandQueue
public ShortcutCommand(@NotNull CommandQueue commandQueue, @NotNull java.lang.String command)
commandQueue
- the command queue for sending commandscommand
- the command to executepublic boolean displaysFace(Face face)
displaysFace
in class Shortcut
face
- the face to check forpublic void dispose()
@NotNull public java.lang.String getCommand()
@NotNull public java.lang.String getTooltipText()
getTooltipText
in class Shortcut
public void visit(@NotNull ShortcutVisitor visitor)
ShortcutVisitor
's visit()
function for this
instance.