java.lang.Object com.realtime.crossfire.jxclient.gui.commands.ToggleCommand
public class ToggleCommand
A GUICommand
which toggles the visibility of a target GUIElement
.
Field Summary | |
---|---|
private GUIElement |
target
The gui element to toggle. |
Constructor Summary | |
---|---|
ToggleCommand(GUIElement target)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
canExecute()
Returns whether this command may be executed. |
void |
execute()
Executes the command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NotNull private final GUIElement target
Constructor Detail |
---|
public ToggleCommand(@NotNull GUIElement target)
target
- the gui element to toggleMethod Detail |
---|
public boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.
execute
in interface GUICommand