org.uispec4j
Class Spinner

java.lang.Object
  extended by org.uispec4j.AbstractUIComponent
      extended by org.uispec4j.AbstractSwingUIComponent
          extended by org.uispec4j.Spinner
All Implemented Interfaces:
TooltipComponent, UIComponent
Direct Known Subclasses:
DateSpinner, ListSpinner, NumberSpinner

public class Spinner
extends AbstractSwingUIComponent

Wrapper for JSpinner components.


Field Summary
protected  javax.swing.JSpinner jSpinner
           
static java.lang.Class[] SWING_CLASSES
           
static java.lang.String TYPE_NAME
           
 
Constructor Summary
Spinner(javax.swing.JSpinner jSpinner)
           
 
Method Summary
 void clickForNextValue()
          Clicks on the button for next value
 void clickForPreviousValue()
          Clicks on the button for previous value
 javax.swing.JSpinner getAwtComponent()
          Returns the Java GUI component represented by this object.
 java.lang.String getDescriptionTypeName()
          Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription().
 Assertion nextValueEquals(java.lang.Object expectedNextValue)
          Checks that the next value is the given value
 Assertion previousValueEquals(java.lang.Object expectedPreviousValue)
          Checks that the previous value is the given value
 void setValue(java.lang.Object value)
          Changes the displayed text

This method will throw an exception if the value is not allowed in the spinner.

 Assertion valueEquals(java.lang.Object expectedValue)
          Checks that the spinner displays the given value
 
Methods inherited from class org.uispec4j.AbstractSwingUIComponent
tooltipContains, tooltipEquals
 
Methods inherited from class org.uispec4j.AbstractUIComponent
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible, pressKey, releaseKey, typeKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final java.lang.String TYPE_NAME
See Also:
Constant Field Values

SWING_CLASSES

public static final java.lang.Class[] SWING_CLASSES

jSpinner

protected javax.swing.JSpinner jSpinner
Constructor Detail

Spinner

public Spinner(javax.swing.JSpinner jSpinner)
Method Detail

getAwtComponent

public javax.swing.JSpinner getAwtComponent()
Description copied from interface: UIComponent
Returns the Java GUI component represented by this object.

Specified by:
getAwtComponent in interface UIComponent
Specified by:
getAwtComponent in class AbstractSwingUIComponent

getDescriptionTypeName

public java.lang.String getDescriptionTypeName()
Description copied from interface: UIComponent
Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription().


valueEquals

public Assertion valueEquals(java.lang.Object expectedValue)
Checks that the spinner displays the given value


previousValueEquals

public Assertion previousValueEquals(java.lang.Object expectedPreviousValue)
Checks that the previous value is the given value


nextValueEquals

public Assertion nextValueEquals(java.lang.Object expectedNextValue)
Checks that the next value is the given value


setValue

public void setValue(java.lang.Object value)
              throws ItemNotFoundException
Changes the displayed text

This method will throw an exception if the value is not allowed in the spinner.

Throws:
ItemNotFoundException

clickForNextValue

public void clickForNextValue()
Clicks on the button for next value


clickForPreviousValue

public void clickForPreviousValue()
Clicks on the button for previous value



Copyright © 2004-2010. All Rights Reserved.