public class ExecuteElementCommand extends java.lang.Object implements GUICommand
GUICommand
which executes (i.e., simulates a left-button mouse
click on) an GUIItem
.Constructor and Description |
---|
ExecuteElementCommand(@NotNull 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.
|
public ExecuteElementCommand(@NotNull @NotNull GUIItem item)
item
- the item element to executepublic boolean canExecute()
GUICommand
canExecute
in interface GUICommand
public void execute()
GUICommand
GUICommand.canExecute()
returns false
.execute
in interface GUICommand