org.netbeans.jemmy.operators
Class JSpinnerOperator.ToStringScrollAdjuster

java.lang.Object
  extended by org.netbeans.jemmy.operators.JSpinnerOperator.ObjectScrollAdjuster
      extended by org.netbeans.jemmy.operators.JSpinnerOperator.ToStringScrollAdjuster
All Implemented Interfaces:
ScrollAdjuster
Enclosing class:
JSpinnerOperator

public static class JSpinnerOperator.ToStringScrollAdjuster
extends JSpinnerOperator.ObjectScrollAdjuster

Class for a scrolling of a spinner having unknown model type. Checks spinner value's toString() reprsentation to match a string pattern.


Field Summary
 
Fields inherited from interface org.netbeans.jemmy.drivers.scrolling.ScrollAdjuster
DECREASE_SCROLL_DIRECTION, DO_NOT_TOUCH_SCROLL_DIRECTION, INCREASE_SCROLL_DIRECTION
 
Constructor Summary
JSpinnerOperator.ToStringScrollAdjuster(JSpinnerOperator oper, String pattern, int direction)
          Constructs a ToStringScrollAdjuster object.
JSpinnerOperator.ToStringScrollAdjuster(JSpinnerOperator oper, String pattern, Operator.StringComparator comparator, int direction)
          Constructs a ToStringScrollAdjuster object.
 
Method Summary
 boolean equals(Object curvalue)
           
 String getDescription()
          Returns a printable scrolling description.
 int getScrollOrientation()
          Returns scrolling orientation.
 
Methods inherited from class org.netbeans.jemmy.operators.JSpinnerOperator.ObjectScrollAdjuster
getScrollDirection
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpinnerOperator.ToStringScrollAdjuster

public JSpinnerOperator.ToStringScrollAdjuster(JSpinnerOperator oper,
                                               String pattern,
                                               Operator.StringComparator comparator,
                                               int direction)
Constructs a ToStringScrollAdjuster object.

Parameters:
oper - an operator to work with.
pattern - a pattern to compare with
comparator - specifies string comparision algorithm.
direction - a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION fields.

JSpinnerOperator.ToStringScrollAdjuster

public JSpinnerOperator.ToStringScrollAdjuster(JSpinnerOperator oper,
                                               String pattern,
                                               int direction)
Constructs a ToStringScrollAdjuster object. Uses StringComparator assigned to the operator.

Parameters:
oper - an operator to work with.
pattern - a pattern to compare with
direction - a scrolling direction - one of ScrollAdjuster.*_SCROLL_DIRECTION fields.
Method Detail

equals

public boolean equals(Object curvalue)
Specified by:
equals in class JSpinnerOperator.ObjectScrollAdjuster

getDescription

public String getDescription()
Description copied from interface: ScrollAdjuster
Returns a printable scrolling description.

Returns:
a description.

getScrollOrientation

public int getScrollOrientation()
Description copied from interface: ScrollAdjuster
Returns scrolling orientation.

Specified by:
getScrollOrientation in interface ScrollAdjuster
Overrides:
getScrollOrientation in class JSpinnerOperator.ObjectScrollAdjuster
Returns:
one of the values: Adjustable.HORIZONTAL or Adjustable.VERTICAL.