Class ExecuteElementCommand
java.lang.Object
com.realtime.crossfire.jxclient.gui.commands.ExecuteElementCommand
- All Implemented Interfaces:
GUICommand
A
GUICommand which executes (i.e., simulates a left-button mouse
click on) an GUIItem.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this command may be executed.voidexecute()Executes the command.
-
Constructor Details
-
ExecuteElementCommand
Creates a new instance.- Parameters:
item- the item element to execute
-
-
Method Details
-
canExecute
public boolean canExecute()Description copied from interface:GUICommandReturns whether this command may be executed.- Specified by:
canExecutein interfaceGUICommand- Returns:
- whether this command may be executed
-
execute
public void execute()Description copied from interface:GUICommandExecutes the command. Does nothing if called whileGUICommand.canExecute()returnsfalse.- Specified by:
executein interfaceGUICommand
-