public abstract class ForwardingScrollStepStrategy extends java.lang.Object implements ScrollStepStrategy
ScrollStepStrategy
to delegate.Modifier | Constructor and Description |
---|---|
protected |
ForwardingScrollStepStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
beginScrolling(DroidDriver driver,
Finder containerFinder,
Finder itemFinder,
Direction.PhysicalDirection direction)
Called only if this step is at the beginning of a series of scroll steps with regard to the
given arguments.
|
protected abstract ScrollStepStrategy |
delegate()
Returns the backing delegate instance that methods are forwarded to.
|
void |
doScroll(UiElement container,
Direction.PhysicalDirection direction)
Performs the scroll action on
container . |
void |
endScrolling(DroidDriver driver,
Finder containerFinder,
Finder itemFinder,
Direction.PhysicalDirection direction)
Called only if this step is at the end of a series of scroll steps with regard to the given
arguments.
|
Direction.DirectionConverter |
getDirectionConverter()
Returns the
Direction.DirectionConverter . |
boolean |
scroll(DroidDriver driver,
Finder containerFinder,
Direction.PhysicalDirection direction)
Tries to scroll
containerFinder in direction . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
protected abstract ScrollStepStrategy delegate()
public boolean scroll(DroidDriver driver, Finder containerFinder, Direction.PhysicalDirection direction)
ScrollStepStrategy
containerFinder
in direction
. Returns whether scrolling is
effective.scroll
in interface ScrollStepStrategy
driver
- a DroidDriver instancecontainerFinder
- Finder for the container that can scroll, for instance a ListViewdirection
- specifies where the view port will move instead of the fingerpublic final Direction.DirectionConverter getDirectionConverter()
ScrollStepStrategy
Direction.DirectionConverter
.getDirectionConverter
in interface ScrollStepStrategy
public void beginScrolling(DroidDriver driver, Finder containerFinder, Finder itemFinder, Direction.PhysicalDirection direction)
ScrollStepStrategy
beginScrolling
in interface ScrollStepStrategy
driver
- a DroidDriver instancecontainerFinder
- Finder for the container that can scroll, for instance a ListViewitemFinder
- Finder for the desired item; relative to containerFinder
direction
- specifies where the view port will move instead of the fingerpublic void endScrolling(DroidDriver driver, Finder containerFinder, Finder itemFinder, Direction.PhysicalDirection direction)
ScrollStepStrategy
endScrolling
in interface ScrollStepStrategy
driver
- a DroidDriver instancecontainerFinder
- Finder for the container that can scroll, for instance a ListViewitemFinder
- Finder for the desired item; relative to containerFinder
direction
- specifies where the view port will move instead of the fingerpublic void doScroll(UiElement container, Direction.PhysicalDirection direction)
ScrollStepStrategy
container
. Subclasses can override this to customize the
scroll action, for example, to adjust the scroll margins.doScroll
in interface ScrollStepStrategy
container
- the container that can scrolldirection
- specifies where the view port will move instead of the finger