public abstract class AbstractScrollDriver extends LightSupportiveDriver implements ScrollDriver
ADJUST_CLICK_COUNT
.Modifier and Type | Field and Description |
---|---|
static int |
ADJUST_CLICK_COUNT
Maximal number of attemps to reach required position
by minimal scrolling operation.
|
Constructor and Description |
---|
AbstractScrollDriver(java.lang.String[] supported)
Constructs an AbstractScrollDriver.
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
canDragAndDrop(ComponentOperator oper)
Tells if this driver allows to perform drag'n'drop scrolling.
|
protected abstract boolean |
canJump(ComponentOperator oper)
Tells if this driver allows to perform jumps.
|
protected abstract boolean |
canPushAndWait(ComponentOperator oper)
Tells if this driver allows to perform "push and wait" scrolling.
|
protected void |
doDragAndDrop(ComponentOperator oper,
ScrollAdjuster adj)
Performs drag'n'drop scrolling till scroller's value
does not cross required value.
|
protected void |
doJumps(ComponentOperator oper,
ScrollAdjuster adj)
Performs jump scrolling till scroller's value
does not cross required value.
|
protected void |
doPushAndWait(ComponentOperator oper,
ScrollAdjuster adj)
Performs "push and wait" scrolling till scroller's value
does not cross required value.
|
protected void |
doSteps(ComponentOperator oper,
ScrollAdjuster adj)
Performs minimal scrollings till scroller's value
does not cross required value.
|
protected abstract void |
drag(ComponentOperator oper,
java.awt.Point pnt)
Drag to a specified point.
|
protected abstract void |
drop(ComponentOperator oper,
java.awt.Point pnt)
Drop at a specified point.
|
protected abstract int |
getDragAndDropStepLength(ComponentOperator oper)
Returns a number of pixels in one drag and drop scrolling.
|
protected abstract Timeout |
getScrollDeltaTimeout(ComponentOperator oper)
Returns a timeout for sleeping between verifications during
"push and wait" scrolling.
|
protected abstract void |
jump(ComponentOperator oper,
ScrollAdjuster adj)
Performs maximal scroll step.
|
void |
scroll(ComponentOperator oper,
ScrollAdjuster adj)
Changes value.
|
protected abstract java.awt.Point |
startDragging(ComponentOperator oper)
Starts drag'n'drop scrolling.
|
protected abstract void |
startPushAndWait(ComponentOperator oper,
int direction,
int orientation)
Presses something like a scroll button.
|
protected abstract void |
step(ComponentOperator oper,
ScrollAdjuster adj)
Performs minimal scrolling step.
|
protected abstract void |
stopPushAndWait(ComponentOperator oper,
int direction,
int orientation)
Releases something like a scroll button.
|
checkSupported, getSupported
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
scrollToMaximum, scrollToMinimum
public static final int ADJUST_CLICK_COUNT
public AbstractScrollDriver(java.lang.String[] supported)
supported
- an array of supported class namespublic void scroll(ComponentOperator oper, ScrollAdjuster adj)
ScrollDriver
scroll
in interface ScrollDriver
oper
- Scroller operator.adj
- Object defines scroll position.protected abstract void step(ComponentOperator oper, ScrollAdjuster adj)
oper
- an operator.adj
- a scroll adjusterprotected abstract void jump(ComponentOperator oper, ScrollAdjuster adj)
oper
- an operator.adj
- a scroll adjusterprotected abstract void startPushAndWait(ComponentOperator oper, int direction, int orientation)
oper
- an operator.direction
- - one of the ScrollAdjister.INCREASE_SCROLL_DIRECTION,
ScrollAdjister.DECREASE_SCROLL_DIRECTION, ScrollAdjister.DO_NOT_TOUCH_SCROLL_DIRECTION values.orientation
- one of the Adjustable.HORIZONTAL or Adjustable.VERTICAL values.protected abstract void stopPushAndWait(ComponentOperator oper, int direction, int orientation)
oper
- an operator.direction
- - one of the ScrollAdjister.INCREASE_SCROLL_DIRECTION,
ScrollAdjister.DECREASE_SCROLL_DIRECTION, ScrollAdjister.DO_NOT_TOUCH_SCROLL_DIRECTION values.orientation
- one of the Adjustable.HORIZONTAL or Adjustable.VERTICAL values.protected abstract java.awt.Point startDragging(ComponentOperator oper)
oper
- an operator.protected abstract void drop(ComponentOperator oper, java.awt.Point pnt)
oper
- an operator.pnt
- the point to drop.protected abstract void drag(ComponentOperator oper, java.awt.Point pnt)
oper
- an operator.pnt
- the point to drag to.protected abstract Timeout getScrollDeltaTimeout(ComponentOperator oper)
oper
- an operator.protected abstract boolean canDragAndDrop(ComponentOperator oper)
oper
- an operator.protected abstract boolean canJump(ComponentOperator oper)
oper
- an operator.protected abstract boolean canPushAndWait(ComponentOperator oper)
oper
- an operator.protected abstract int getDragAndDropStepLength(ComponentOperator oper)
oper
- an operator.protected void doDragAndDrop(ComponentOperator oper, ScrollAdjuster adj)
oper
- an operator.adj
- a scroll adjusterprotected void doJumps(ComponentOperator oper, ScrollAdjuster adj)
oper
- an operator.adj
- a scroll adjusterprotected void doPushAndWait(ComponentOperator oper, ScrollAdjuster adj)
oper
- an operator.adj
- a scroll adjusterprotected void doSteps(ComponentOperator oper, ScrollAdjuster adj)
oper
- an operator.adj
- a scroll adjuster