|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.fixture.ComponentFixture<JSlider>
org.fest.swing.fixture.JSliderFixture
public class JSliderFixture
Understands functional testing of
s:
JSlider
Field Summary |
---|
Fields inherited from class org.fest.swing.fixture.ComponentFixture |
---|
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target |
Constructor Summary | |
---|---|
JSliderFixture(Robot robot,
JSlider target)
Creates a new . |
|
JSliderFixture(Robot robot,
String sliderName)
Creates a new . |
Method Summary | |
---|---|
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. |
Methods inherited from class org.fest.swing.fixture.ComponentFixture |
---|
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNull |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public 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.Method Detail |
---|
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 MouseInputSimulationFixture
IllegalStateException
- 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 MouseInputSimulationFixture
button
- 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 MouseInputSimulationFixture
mouseClickInfo
- 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 MouseInputSimulationFixture
IllegalStateException
- 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 MouseInputSimulationFixture
IllegalStateException
- 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 FocusableComponentFixture
IllegalStateException
- 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 KeyboardInputSimulationFixture
keyPressInfo
- 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.KeyPressInfo
public JSliderFixture pressAndReleaseKeys(int... keyCodes)
JSlider
. This method
does not affect the current focus.
pressAndReleaseKeys
in interface KeyboardInputSimulationFixture
keyCodes
- 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.KeyEvent
public JSliderFixture pressKey(int keyCode)
JSlider
.
pressKey
in interface KeyboardInputSimulationFixture
keyCode
- 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.KeyEvent
public JSliderFixture releaseKey(int keyCode)
JSlider
.
releaseKey
in interface KeyboardInputSimulationFixture
keyCode
- 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.KeyEvent
public JSliderFixture requireFocused()
JSlider
has input focus.
requireFocused
in interface FocusableComponentFixture
AssertionError
- if this fixture's JSlider
does not have input focus.public JSliderFixture requireEnabled()
JSlider
is enabled.
requireEnabled
in interface StateVerificationFixture
AssertionError
- is this fixture's JSlider
is disabled.public JSliderFixture requireEnabled(Timeout timeout)
JSlider
is enabled.
requireEnabled
in interface StateVerificationFixture
timeout
- 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 StateVerificationFixture
AssertionError
- is this fixture's JSlider
is enabled.public JSliderFixture requireVisible()
JSlider
.
requireVisible
in interface StateVerificationFixture
AssertionError
- if this fixture's JSlider
is not visible.public JSliderFixture requireNotVisible()
JSlider
is not visible.
requireNotVisible
in interface StateVerificationFixture
AssertionError
- if this fixture's JSlider
is visible.public JSliderFixture requireToolTip(String expected)
JSlider
matches the given value.
requireToolTip
in interface ToolTipDisplayFixture
expected
- 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 ToolTipDisplayFixture
pattern
- 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 ClientPropertyStorageFixture
key
- 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 JPopupMenuInvokerFixture
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.public JPopupMenuFixture showPopupMenuAt(Point p)
JSlider
as the invoker of the
pop-up menu.
showPopupMenuAt
in interface JPopupMenuInvokerFixture
p
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |