org.fest.swing.driver
Class JSliderDriver
java.lang.Object
org.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.JComponentDriver
org.fest.swing.driver.JSliderDriver
public class JSliderDriver
- extends JComponentDriver
Understands functional testing of JSlider
s:
- user input simulation
- state verification
- property value query
This class is intended for internal use only. Please use the classes in the package
org.fest.swing.fixture
in your tests.
- Author:
- Alex Ruiz, Yvonne Wang
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 |
JSliderDriver
public JSliderDriver(Robot robot)
- Creates a new
JSliderDriver
.
- Parameters:
robot
- the robot to use to simulate user input.
slideToMaximum
@RunsInEDT
public void slideToMaximum(JSlider slider)
- Slides the knob to its maximum.
- Parameters:
slider
- the target JSlider
.
- Throws:
IllegalStateException
- if the JSlider
is disabled.
IllegalStateException
- if the JSlider
is not showing on the screen.
slideToMinimum
@RunsInEDT
public void slideToMinimum(JSlider slider)
- Slides the knob to its minimum.
- Parameters:
slider
- the target JSlider
.
- Throws:
IllegalStateException
- if the JSlider
is disabled.
IllegalStateException
- if the JSlider
is not showing on the screen.
slide
@RunsInEDT
public void slide(JSlider slider,
int value)
- Slides the knob to the requested value.
- Parameters:
slider
- the target JSlider
.value
- the requested value.
- Throws:
IllegalStateException
- if the JSlider
is disabled.
IllegalStateException
- if the JSlider
is not showing on the screen.
IllegalArgumentException
- if the given position is not within the JSlider
bounds.
Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.