public class MoveSelectionCommand extends java.lang.Object implements GUICommand
GUICommand
which moves the selection in a GUIList
element.Constructor and Description |
---|
MoveSelectionCommand(@NotNull GUIList<?> list,
int diffLines,
int diffElements)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
public MoveSelectionCommand(@NotNull @NotNull GUIList<?> list, int diffLines, int diffElements)
list
- the list to scrolldiffLines
- the distance in lines to scrolldiffElements
- the distance in elements to scrollpublic boolean canExecute()
GUICommand
canExecute
in interface GUICommand
public void execute()
GUICommand
GUICommand.canExecute()
returns false
.execute
in interface GUICommand