public class ScrollNextCommand extends java.lang.Object implements GUICommand
GUICommand
which transfers the focus between two gui elements.Modifier and Type | Field and Description |
---|---|
private boolean |
apply
Whether
nextElement should be applied. |
private ActivatableGUIElement |
nextElement
The element to activate.
|
private ActivatableGUIElement |
prevElement
The element to deactivate.
|
Constructor and Description |
---|
ScrollNextCommand(ActivatableGUIElement nextElement,
ActivatableGUIElement prevElement,
boolean apply)
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 boolean apply
nextElement
should be applied.@NotNull private final ActivatableGUIElement nextElement
@NotNull private final ActivatableGUIElement prevElement
public ScrollNextCommand(@NotNull ActivatableGUIElement nextElement, @NotNull ActivatableGUIElement prevElement, boolean apply)
nextElement
- the element to activateprevElement
- the element to deactivateapply
- whether nextElement
should be appliedpublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand