public class ScrollListCommand extends java.lang.Object implements GUICommand
GUICommand
which scrolls a GUIScrollable
instance.Modifier and Type | Field and Description |
---|---|
private int |
distance
The distance to scroll.
|
private GUIScrollable |
list
The list to scroll.
|
Constructor and Description |
---|
ScrollListCommand(GUIScrollable list,
int distance)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
private final int distance
@NotNull private final GUIScrollable list
public ScrollListCommand(@NotNull GUIScrollable list, int distance)
list
- the list to scrolldistance
- the distance to scrollpublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand