public class ExecSelectionCommand extends java.lang.Object implements GUICommand
GUICommand
that executes a command on the selected item of a GUIItemList
.Modifier and Type | Field and Description |
---|---|
private CommandType |
command
The command to execute.
|
private CommandQueue |
commandQueue
The command queue to use.
|
private CrossfireServerConnection |
crossfireServerConnection
The connection to execute commands on.
|
private FloorView |
floorView
The
FloorView to use. |
private GUIItemList<?> |
list
The list to execute in.
|
Constructor and Description |
---|
ExecSelectionCommand(GUIItemList<?> list,
CommandType command,
CrossfireServerConnection crossfireServerConnection,
FloorView floorView,
CommandQueue commandQueue)
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 CommandType command
@NotNull private final CommandQueue commandQueue
@NotNull private final CrossfireServerConnection crossfireServerConnection
@NotNull private final GUIItemList<?> list
public ExecSelectionCommand(@NotNull GUIItemList<?> list, @NotNull CommandType command, @NotNull CrossfireServerConnection crossfireServerConnection, @NotNull FloorView floorView, @NotNull CommandQueue commandQueue)
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 usepublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand