Class AWTScrollDriver

All Implemented Interfaces:
LightDriver, ScrollDriver
Direct Known Subclasses:
ScrollbarDriver, ScrollPaneDriver

public abstract class AWTScrollDriver extends AbstractScrollDriver
ScrollDriver for awt components.
Author:
Alexandre Iline(alexandre.iline@sun.com)
  • Constructor Details

    • AWTScrollDriver

      public AWTScrollDriver(String[] supported)
      Constructs a ChoiceDriver.
      Parameters:
      supported - an array of supported class names
  • Method Details

    • step

      protected void step(ComponentOperator oper, ScrollAdjuster adj)
      Description copied from class: AbstractScrollDriver
      Performs minimal scrolling step.
      Specified by:
      step in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      adj - a scroll adjuster
    • jump

      protected void jump(ComponentOperator oper, ScrollAdjuster adj)
      Description copied from class: AbstractScrollDriver
      Performs maximal scroll step.
      Specified by:
      jump in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      adj - a scroll adjuster
    • startPushAndWait

      protected void startPushAndWait(ComponentOperator oper, int direction, int orientation)
      Description copied from class: AbstractScrollDriver
      Presses something like a scroll button.
      Specified by:
      startPushAndWait in class AbstractScrollDriver
      Parameters:
      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.
    • stopPushAndWait

      protected void stopPushAndWait(ComponentOperator oper, int direction, int orientation)
      Description copied from class: AbstractScrollDriver
      Releases something like a scroll button.
      Specified by:
      stopPushAndWait in class AbstractScrollDriver
      Parameters:
      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.
    • startDragging

      protected Point startDragging(ComponentOperator oper)
      Description copied from class: AbstractScrollDriver
      Starts drag'n'drop scrolling.
      Specified by:
      startDragging in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      Returns:
      start drugging point.
    • drop

      protected void drop(ComponentOperator oper, Point pnt)
      Description copied from class: AbstractScrollDriver
      Drop at a specified point.
      Specified by:
      drop in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      pnt - the point to drop.
    • drag

      protected void drag(ComponentOperator oper, Point pnt)
      Description copied from class: AbstractScrollDriver
      Drag to a specified point.
      Specified by:
      drag in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      pnt - the point to drag to.
    • getScrollDeltaTimeout

      protected Timeout getScrollDeltaTimeout(ComponentOperator oper)
      Description copied from class: AbstractScrollDriver
      Returns a timeout for sleeping between verifications during "push and wait" scrolling.
      Specified by:
      getScrollDeltaTimeout in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      Returns:
      a timeout
    • canDragAndDrop

      protected boolean canDragAndDrop(ComponentOperator oper)
      Description copied from class: AbstractScrollDriver
      Tells if this driver allows to perform drag'n'drop scrolling.
      Specified by:
      canDragAndDrop in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      Returns:
      true if this driver allows to drag'n'drop.
    • canJump

      protected boolean canJump(ComponentOperator oper)
      Description copied from class: AbstractScrollDriver
      Tells if this driver allows to perform jumps.
      Specified by:
      canJump in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      Returns:
      true if this driver allows to jump.
    • canPushAndWait

      protected boolean canPushAndWait(ComponentOperator oper)
      Description copied from class: AbstractScrollDriver
      Tells if this driver allows to perform "push and wait" scrolling.
      Specified by:
      canPushAndWait in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      Returns:
      true if this driver allows to "push and wait".
    • getDragAndDropStepLength

      protected int getDragAndDropStepLength(ComponentOperator oper)
      Description copied from class: AbstractScrollDriver
      Returns a number of pixels in one drag and drop scrolling.
      Specified by:
      getDragAndDropStepLength in class AbstractScrollDriver
      Parameters:
      oper - an operator.
      Returns:
      drag'n'drop step length.
    • getClickPoint

      protected abstract Point getClickPoint(ComponentOperator oper, int direction, int orientation)
      Defines a click point which needs to be used in order to increase/decrease scroller value.
      Parameters:
      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.
      Returns:
      a point to click.