public class ExecuteElementCommand extends java.lang.Object implements GUICommand
GUICommand
which executes (i.e., simulates a left-button mouse
click on) an GUIItem
.Modifier and Type | Field and Description |
---|---|
private GUIItem |
item
The item element to execute.
|
Constructor and Description |
---|
ExecuteElementCommand(GUIItem item)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
@NotNull private final GUIItem item
public ExecuteElementCommand(@NotNull GUIItem item)
item
- the item element to executepublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand