public class JSliderFixture extends ComponentFixture<JSlider> implements CommonComponentFixture, JComponentFixture, JPopupMenuInvokerFixture
JSliders:
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target| Constructor and Description |
|---|
JSliderFixture(Robot robot,
JSlider target)
Creates a new
. |
JSliderFixture(Robot robot,
String sliderName)
Creates a new
. |
| Modifier and Type | Method and Description |
|---|---|
JSliderFixture |
click()
Simulates a user clicking this fixture's
. |
JSliderFixture |
click(MouseButton button)
Simulates a user clicking this fixture's
. |
JSliderFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's
. |
Object |
clientProperty(Object key)
Returns the client property stored in this fixture's
, under the given key. |
JSliderFixture |
doubleClick()
Simulates a user double-clicking this fixture's
. |
protected void |
driver(JSliderDriver newDriver)
Sets the
to be used by this fixture. |
JSliderFixture |
focus()
Gives input focus to this fixture's
. |
JSliderFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's
. |
JSliderFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on this fixture's
. |
JSliderFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's
. |
JSliderFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's
. |
JSliderFixture |
requireDisabled()
Asserts that this fixture's
is disabled. |
JSliderFixture |
requireEnabled()
Asserts that this fixture's
is enabled. |
JSliderFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's
is enabled. |
JSliderFixture |
requireFocused()
Asserts that this fixture's
has input focus. |
JSliderFixture |
requireNotVisible()
Asserts that this fixture's
is not visible. |
JSliderFixture |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's
matches the given regular expression
pattern. |
JSliderFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's
matches the given value. |
JSliderFixture |
requireVisible()
Asserts that this fixture's
. |
JSliderFixture |
rightClick()
Simulates a user right-clicking this fixture's
. |
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's
as the invoker of the pop-up menu. |
JPopupMenuFixture |
showPopupMenuAt(Point p)
Shows a pop-up menu at the given point using this fixture's
as the invoker of the
pop-up menu. |
JSliderFixture |
slideTo(int value)
Simulates a user sliding this fixture's
to the given value. |
JSliderFixture |
slideToMaximum()
Simulates a user sliding this fixture's
to its maximum value. |
JSliderFixture |
slideToMinimum()
Simulates a user sliding this fixture's
to its minimum value. |
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNullpublic JSliderFixture(Robot robot, JSlider target)
JSliderFixture.robot - performs simulation of user events on the given JSlider.target - the JSlider to be managed JSlider by this fixture.NullPointerException - if robot is null.NullPointerException - if target is null.public JSliderFixture(Robot robot, String sliderName)
JSliderFixture.robot - performs simulation of user events on a JSlider.sliderName - the name of the JSlider to find using the given Robot.NullPointerException - if robot is null.ComponentLookupException - if a matching JSlider could not be found.ComponentLookupException - if more than one matching JSlider is found.protected final void driver(JSliderDriver newDriver)
JSliderDriver to be used by this fixture.newDriver - the new JSliderDriver.NullPointerException - if the given driver is null.public JSliderFixture slideTo(int value)
JSlider to the given value.value - the value to slide the JSlider to.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.IllegalArgumentException - if the given position is not within the JSlider bounds.public JSliderFixture slideToMaximum()
JSlider to its maximum value.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture slideToMinimum()
JSlider to its minimum value.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture click()
JSlider.click in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture click(MouseButton button)
JSlider.click in interface MouseInputSimulationFixturebutton - the button to click.NullPointerException - if the given MouseButton is null.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture click(MouseClickInfo mouseClickInfo)
JSlider.click in interface MouseInputSimulationFixturemouseClickInfo - specifies the button to click and the times the button should be clicked.NullPointerException - if the given MouseClickInfo is null.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture doubleClick()
JSlider.doubleClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture rightClick()
JSlider.rightClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture focus()
JSlider.focus in interface FocusableComponentFixtureIllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.public JSliderFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JSlider.
Modifiers is a mask from the available InputEvent masks.pressAndReleaseKey in interface KeyboardInputSimulationFixturekeyPressInfo - specifies the key and modifiers to press.NullPointerException - if the given KeyPressInfo is null.IllegalArgumentException - if the given code is not a valid key code.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.KeyPressInfopublic JSliderFixture pressAndReleaseKeys(int... keyCodes)
JSlider. This method
does not affect the current focus.pressAndReleaseKeys in interface KeyboardInputSimulationFixturekeyCodes - one or more codes of the keys to press.NullPointerException - if the given array of codes is null.IllegalArgumentException - if any of the given code is not a valid key code.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.KeyEventpublic JSliderFixture pressKey(int keyCode)
JSlider.pressKey in interface KeyboardInputSimulationFixturekeyCode - the code of the key to press.IllegalArgumentException - if any of the given code is not a valid key code.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.KeyEventpublic JSliderFixture releaseKey(int keyCode)
JSlider.releaseKey in interface KeyboardInputSimulationFixturekeyCode - the code of the key to release.IllegalArgumentException - if any of the given code is not a valid key code.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.KeyEventpublic JSliderFixture requireFocused()
JSlider has input focus.requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JSlider does not have input focus.public JSliderFixture requireEnabled()
JSlider is enabled.requireEnabled in interface StateVerificationFixtureAssertionError - is this fixture's JSlider is disabled.public JSliderFixture requireEnabled(Timeout timeout)
JSlider is enabled.requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.WaitTimedOutError - if this fixture's JSlider is never enabled.public JSliderFixture requireDisabled()
JSlider is disabled.requireDisabled in interface StateVerificationFixtureAssertionError - is this fixture's JSlider is enabled.public JSliderFixture requireVisible()
JSlider.requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JSlider is not visible.public JSliderFixture requireNotVisible()
JSlider is not visible.requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JSlider is visible.public JSliderFixture requireToolTip(String expected)
JSlider matches the given value.requireToolTip in interface ToolTipDisplayFixtureexpected - the given value. It can be a regular expression.AssertionError - if the toolTip in this fixture's JSlider does not match the given value.public JSliderFixture requireToolTip(Pattern pattern)
JSlider matches the given regular expression
pattern.requireToolTip in interface ToolTipDisplayFixturepattern - the regular expression pattern to match.NullPointerException - if the given regular expression pattern is null.AssertionError - if the toolTip in this fixture's JSlider does not match the given regular
expression pattern.public Object clientProperty(Object key)
JSlider, under the given key.clientProperty in interface ClientPropertyStorageFixturekey - the key to use to retrieve the client property.null if the property was
not found.NullPointerException - if the given key is null.public JPopupMenuFixture showPopupMenu()
JSlider as the invoker of the pop-up menu.showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
JSlider as the invoker of the
pop-up menu.showPopupMenuAt in interface JPopupMenuInvokerFixturep - the given point where to show the pop-up menu.IllegalStateException - if this fixture's JSlider is disabled.IllegalStateException - if this fixture's JSlider is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.