Class ExecuteElementCommand

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

public class ExecuteElementCommand extends Object implements GUICommand
A GUICommand which executes (i.e., simulates a left-button mouse click on) an GUIItem.
  • Constructor Details

    • ExecuteElementCommand

      public ExecuteElementCommand(@NotNull @NotNull GUIItem item)
      Creates a new instance.
      Parameters:
      item - the item element to execute
  • 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