|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.JComponentDriver
org.fest.swing.driver.JSpinnerDriver
public class JSpinnerDriver
Understands functional testing of s:
JSpinner
org.fest.swing.fixture in your tests.
| Field Summary |
|---|
| Fields inherited from class org.fest.swing.driver.ComponentDriver |
|---|
robot |
| Constructor Summary | |
|---|---|
JSpinnerDriver(Robot robot)
Creates a new JSpinnerDriver. |
|
| Method Summary | |
|---|---|
void |
decrement(JSpinner spinner)
Decrements the value of the . |
void |
decrement(JSpinner spinner,
int times)
Decrements the value of the the given number of times. |
JTextComponent |
editor(JSpinner spinner)
Returns the used as editor in the given . |
void |
enterText(JSpinner spinner,
String text)
Enters the given text in the , assuming its editor has a
under it. |
void |
enterTextAndCommit(JSpinner spinner,
String text)
Enters and commits the given text in the , assuming its editor has a
under it. |
void |
increment(JSpinner spinner)
Increments the value of the . |
void |
increment(JSpinner spinner,
int times)
Increments the value of the the given number of times. |
void |
requireValue(JSpinner spinner,
Object value)
Verifies that the value of the is equal to the given one. |
void |
selectValue(JSpinner spinner,
Object value)
Selects the given value in the given . |
String |
textOf(JSpinner spinner)
Returns the text displayed in the given . |
| Methods inherited from class org.fest.swing.driver.JComponentDriver |
|---|
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible |
| Methods inherited from class org.fest.swing.driver.ContainerDriver |
|---|
move, resize, resizeHeight, resizeWidth |
| Methods inherited from class org.fest.swing.driver.ComponentDriver |
|---|
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSpinnerDriver(Robot robot)
JSpinnerDriver.
robot - the robot to use to simulate user input.| Method Detail |
|---|
@RunsInEDT
public void increment(JSpinner spinner,
int times)
JSpinner the given number of times.
spinner - the target JSpinner.times - how many times the value of this fixture's JSpinner should be incremented.
IllegalArgumentException - if times is less than or equal to zero.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.@RunsInEDT public void increment(JSpinner spinner)
JSpinner.
spinner - the target JSpinner.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.
@RunsInEDT
public void decrement(JSpinner spinner,
int times)
JSpinner the given number of times.
spinner - the target JSpinner.times - how many times the value of this fixture's JSpinner should be decremented.
IllegalArgumentException - if times is less than or equal to zero.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.@RunsInEDT public void decrement(JSpinner spinner)
JSpinner.
spinner - the target JSpinner.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.@RunsInEDT public String textOf(JSpinner spinner)
JSpinner. This method first tries to get the text
displayed in the JSpinner's editor, assuming it is a JTextComponent. If the
text from the editor cannot be retrieved, it will return the String representation of the value
in the JSpinner's model.
spinner - the target JSpinner.
JSpinner.
@RunsInEDT
public void enterTextAndCommit(JSpinner spinner,
String text)
JSpinner, assuming its editor has a
JTextComponent under it.
spinner - the target JSpinner.text - the text to enter.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.
ActionFailedException - if the editor of the JSpinner is not a JTextComponent or
cannot be found.
UnexpectedException - if entering the text in the JSpinner's editor fails.
@RunsInEDT
public void enterText(JSpinner spinner,
String text)
JSpinner, assuming its editor has a
JTextComponent under it. This method does not commit the value to the JSpinner.
spinner - the target JSpinner.text - the text to enter.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.
ActionFailedException - if the editor of the JSpinner is not a JTextComponent or
cannot be found.
UnexpectedException - if entering the text in the JSpinner's editor fails.enterTextAndCommit(JSpinner, String)
@RunsInEDT
public void selectValue(JSpinner spinner,
Object value)
JSpinner.
spinner - the target JSpinner.value - the value to select.
IllegalStateException - if the JSpinner is disabled.
IllegalStateException - if the JSpinner is not showing on the screen.
IllegalArgumentException - if the given JSpinner does not support the given value.@RunsInEDT public JTextComponent editor(JSpinner spinner)
JTextComponent used as editor in the given JSpinner.
spinner - the target JSpinner.
JTextComponent used as editor in the given JSpinner.
ComponentLookupException - if the given JSpinner does not have a JTextComponent as
editor.
@RunsInEDT
public void requireValue(JSpinner spinner,
Object value)
JSpinner is equal to the given one.
spinner - the target JSpinner.value - the expected value.
AssertionError - if the value of the JSpinner is not equal to the given one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||