Class SelectCommand

java.lang.Object
com.realtime.crossfire.jxclient.gui.commands.SelectCommand
All Implemented Interfaces:
GUICommand

public class SelectCommand extends Object implements GUICommand
A GUICommand for selecting or deselecting a GUIElement.
  • Constructor Details

    • SelectCommand

      public SelectCommand(@NotNull @NotNull GUISelectable element, boolean selected)
      Creates a new instance.
      Parameters:
      element - the element to affect
      selected - whether to select the element
  • Method Details

    • canExecute

      public boolean canExecute()
      Description copied from interface: GUICommand
      Returns whether this command may be executed.
      Specified by:
      canExecute in interface GUICommand
      Returns:
      whether this command may be executed
    • execute

      public void execute()
      Description copied from interface: GUICommand
      Executes the command. Does nothing if called while GUICommand.canExecute() returns false.
      Specified by:
      execute in interface GUICommand