Class MoveSelectionCommand

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

public class MoveSelectionCommand extends Object implements GUICommand
A GUICommand which moves the selection in a GUIList element.
  • Constructor Details

    • MoveSelectionCommand

      public MoveSelectionCommand(@NotNull @NotNull GUIList<?> list, int diffLines, int diffElements)
      Creates a new instance.
      Parameters:
      list - the list to scroll
      diffLines - the distance in lines to scroll
      diffElements - the distance in elements to scroll
  • 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