public class ScrollCommand extends AbstractDocumentCommand
Hint:
To work properly this command needs a PageView
instance in the
Context
object.
Furthermore a valid scrolling behavior have to be defined in the commands properties as command
parameters. Provided scrolling behaviors are:
Description | Command Parameter Name | Possible Parameter Values |
---|---|---|
scroll performance | fast | true, false (default: false) |
scroll direction | direction | TOP, LEFT, RIGHT, DOWN, see ScrollCommand.Direction |
Modifier and Type | Class and Description |
---|---|
static class |
ScrollCommand.Direction |
AbstractDocumentCommand.Scope
Modifier and Type | Field and Description |
---|---|
protected int |
SCROLL_UNIT |
document
Constructor and Description |
---|
ScrollCommand() |
Modifier and Type | Method and Description |
---|---|
protected void |
execute()
This method is called in order to execute the command.
|
ScrollCommand.Direction |
getDirection() |
boolean |
isFast() |
void |
setDirection(ScrollCommand.Direction direction) |
void |
setFast(boolean fast) |
protected void |
translate(int dx,
int dy)
Translates the pan point of the viewer contained in given context objects.
|
canExecute, getRenderControls, getScope, setScope
getPageView, setPageView
getContext, propagateContextChange, setContext
canExecute, execute, getKey, isAvailable, isSelected, isSelected, setKey
protected final int SCROLL_UNIT
protected void execute()
InjectedCommand
InjectedCommand.canExecute()
has returned
true
.execute
in class InjectedCommand
protected void translate(int dx, int dy)
dx
along the x
axis and dy
along the y axis so that it now represents the point (
x
+
dx
, y
+
dy
).dx
- the distance to move this point along the x axisdy
- the distance to move this point along the y axispublic void setDirection(ScrollCommand.Direction direction)
public ScrollCommand.Direction getDirection()
public void setFast(boolean fast)
public boolean isFast()
Copyright © 2024 levigo holding gmbh. All rights reserved.