org.fest.swing.driver
Class JSliderDriver

java.lang.Object
  extended by org.fest.swing.driver.ComponentDriver
      extended by org.fest.swing.driver.ContainerDriver
          extended by org.fest.swing.driver.JComponentDriver
              extended by org.fest.swing.driver.JSliderDriver

public class JSliderDriver
extends JComponentDriver

Understands functional testing of JSliders:

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

Field Summary
 
Fields inherited from class org.fest.swing.driver.ComponentDriver
robot
 
Constructor Summary
JSliderDriver(Robot robot)
          Creates a new JSliderDriver.
 
Method Summary
 void slide(JSlider slider, int value)
          Slides the knob to the requested value.
 void slideToMaximum(JSlider slider)
          Slides the knob to its maximum.
 void slideToMinimum(JSlider slider)
          Slides the knob to its minimum.
 
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

JSliderDriver

public JSliderDriver(Robot robot)
Creates a new JSliderDriver.

Parameters:
robot - the robot to use to simulate user input.
Method Detail

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.