Class MoveSelectionCommand
java.lang.Object
com.realtime.crossfire.jxclient.gui.commands.MoveSelectionCommand
- All Implemented Interfaces:
GUICommand
A
GUICommand which moves the selection in a GUIList element.-
Constructor Summary
ConstructorsConstructorDescriptionMoveSelectionCommand(@NotNull GUIList<?> list, int diffLines, int diffElements) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this command may be executed.voidexecute()Executes the command.
-
Constructor Details
-
MoveSelectionCommand
Creates a new instance.- Parameters:
list- the list to scrolldiffLines- the distance in lines to scrolldiffElements- the distance in elements to scroll
-
-
Method Details
-
canExecute
public boolean canExecute()Description copied from interface:GUICommandReturns whether this command may be executed.- Specified by:
canExecutein interfaceGUICommand- Returns:
- whether this command may be executed
-
execute
public void execute()Description copied from interface:GUICommandExecutes the command. Does nothing if called whileGUICommand.canExecute()returnsfalse.- Specified by:
executein interfaceGUICommand
-