Class ScrollNextCommand

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

public class ScrollNextCommand extends Object implements GUICommand
A GUICommand which transfers the focus between two gui elements.
  • Constructor Details

    • ScrollNextCommand

      public ScrollNextCommand(@NotNull @NotNull ActivatableGUIElement nextElement, @NotNull @NotNull ActivatableGUIElement prevElement, boolean apply)
      Creates a new instance.
      Parameters:
      nextElement - the element to activate
      prevElement - the element to deactivate
      apply - whether nextElement should be applied
  • 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