Class ExecSelectionCommand
- java.lang.Object
-
- com.realtime.crossfire.jxclient.gui.commands.ExecSelectionCommand
-
- All Implemented Interfaces:
GUICommand
public class ExecSelectionCommand extends java.lang.Object implements GUICommand
AGUICommandthat executes a command on the selected item of aGUIItemList.
-
-
Constructor Summary
Constructors Constructor Description ExecSelectionCommand(@NotNull GUIItemList<?> list, @NotNull CommandType command, @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull FloorView floorView, @NotNull CommandQueue commandQueue)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanExecute()Returns whether this command may be executed.voidexecute()Executes the command.
-
-
-
Constructor Detail
-
ExecSelectionCommand
public ExecSelectionCommand(@NotNull @NotNull GUIItemList<?> list, @NotNull @NotNull CommandType command, @NotNull @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull @NotNull FloorView floorView, @NotNull @NotNull CommandQueue commandQueue)Creates a new instance.- Parameters:
list- the list to execute incommand- the command to executecrossfireServerConnection- the connection to execute commands onfloorView- the floor view to usecommandQueue- the command queue to use
-
-
Method Detail
-
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
-
-