|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.fixture.ComponentFixture<JScrollBar>
org.fest.swing.fixture.JScrollBarFixture
public class JScrollBarFixture
Understands functional testing of s:
JScrollBar
| Field Summary |
|---|
| Fields inherited from class org.fest.swing.fixture.ComponentFixture |
|---|
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target |
| Constructor Summary | |
|---|---|
JScrollBarFixture(Robot robot,
JScrollBar target)
Creates a new . |
|
JScrollBarFixture(Robot robot,
String scrollBarName)
Creates a new . |
|
| Method Summary | |
|---|---|
JScrollBarFixture |
click()
Simulates a user clicking this fixture's . |
JScrollBarFixture |
click(MouseButton button)
Simulates a user clicking this fixture's . |
JScrollBarFixture |
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. |
JScrollBarFixture |
doubleClick()
Simulates a user double-clicking this fixture's . |
protected void |
driver(JScrollBarDriver newDriver)
Sets the to be used by this fixture. |
JScrollBarFixture |
focus()
Gives input focus to this fixture's . |
JScrollBarFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's . |
JScrollBarFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on the managed by this
fixture. |
JScrollBarFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's . |
JScrollBarFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's . |
JScrollBarFixture |
requireDisabled()
Asserts that this fixture's is disabled. |
JScrollBarFixture |
requireEnabled()
Asserts that this fixture's is enabled. |
JScrollBarFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's is enabled. |
JScrollBarFixture |
requireFocused()
Asserts that this fixture's has input focus. |
JScrollBarFixture |
requireNotVisible()
Asserts that this fixture's is not visible. |
JScrollBarFixture |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's matches the given regular expression
pattern. |
JScrollBarFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's matches the given value. |
JScrollBarFixture |
requireValue(int value)
Asserts that the value of this fixture's is equal to the given one. |
JScrollBarFixture |
requireVisible()
Asserts that this fixture's is visible. |
JScrollBarFixture |
rightClick()
Simulates a user right-clicking this fixture's . |
JScrollBarFixture |
scrollBlockDown()
Simulates a user scrolling down one block (usually a page.) |
JScrollBarFixture |
scrollBlockDown(int times)
Simulates a user scrolling down one block (usually a page,) the given number of times. |
JScrollBarFixture |
scrollBlockUp()
Simulates a user scrolling up one block (usually a page.) |
JScrollBarFixture |
scrollBlockUp(int times)
Simulates a user scrolling up one block (usually a page,) the given number of times. |
JScrollBarFixture |
scrollTo(int position)
Simulates a user scrolling to the given position. |
JScrollBarFixture |
scrollToMaximum()
Simulates a user scrolling to the maximum position of this fixture's . |
JScrollBarFixture |
scrollToMinimum()
Simulates a user scrolling to the minimum position of this fixture's . |
JScrollBarFixture |
scrollUnitDown()
Simulates a user scrolling down one unit (usually a line.) |
JScrollBarFixture |
scrollUnitDown(int times)
Simulates a user scrolling down one unit (usually a line,) the given number of times. |
JScrollBarFixture |
scrollUnitUp()
Simulates a user scrolling up one unit (usually a line.) |
JScrollBarFixture |
scrollUnitUp(int times)
Simulates a user scrolling up one unit (usually a line,) the given number of times. |
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. |
| 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 JScrollBarFixture(Robot robot,
JScrollBar target)
JScrollBarFixture.
robot - performs simulation of user events on the given JScrollBar.target - the JScrollBar to be managed by this fixture.
NullPointerException - if robot is null.
NullPointerException - if target is null.
public JScrollBarFixture(Robot robot,
String scrollBarName)
JScrollBarFixture.
robot - performs simulation of user events on a JScrollBar.scrollBarName - the name of the JScrollBar to find using the given Robot.
NullPointerException - if robot is null.
ComponentLookupException - if a matching JScrollBar could not be found.
ComponentLookupException - if more than one matching JScrollBar is found.| Method Detail |
|---|
protected final void driver(JScrollBarDriver newDriver)
JScrollBarDriver to be used by this fixture.
newDriver - the new JScrollBarDriver.
NullPointerException - if the given driver is null.public JScrollBarFixture click()
JScrollBar.
click in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture click(MouseButton button)
JScrollBar.
click in interface MouseInputSimulationFixturebutton - the button to click.
NullPointerException - if the given MouseButton is null.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture click(MouseClickInfo mouseClickInfo)
JScrollBar.
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 JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture doubleClick()
JScrollBar.
doubleClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture rightClick()
JScrollBar.
rightClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture focus()
JScrollBar.
focus in interface FocusableComponentFixtureIllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JScrollBar.
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 JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.KeyPressInfopublic JScrollBarFixture pressAndReleaseKeys(int... keyCodes)
JScrollBar managed by this
fixture.
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 JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.KeyEventpublic JScrollBarFixture pressKey(int keyCode)
JScrollBar.
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 JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.KeyEventpublic JScrollBarFixture releaseKey(int keyCode)
JScrollBar.
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 JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.KeyEventpublic JScrollBarFixture scrollBlockDown()
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollBlockDown(int times)
times - the number of times to scroll down one block.
IllegalArgumentException - if times is less than or equal to zero.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollBlockUp()
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollBlockUp(int times)
times - the number of times to scroll up one block.
IllegalArgumentException - if times is less than or equal to zero.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollTo(int position)
position - the position to scroll to.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.
IllegalArgumentException - if the given position is not within the JScrollBar bounds.public JScrollBarFixture scrollToMaximum()
JScrollBar.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollToMinimum()
JScrollBar.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollUnitDown()
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollUnitDown(int times)
times - the number of times to scroll down one unit.
IllegalArgumentException - if times is less than or equal to zero.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollUnitUp()
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture scrollUnitUp(int times)
times - the number of times to scroll up one unit.
IllegalArgumentException - if times is less than or equal to zero.
IllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.public JScrollBarFixture requireValue(int value)
JScrollBar is equal to the given one.
value - the expected value.
AssertionError - if the value of this fixture's JScrollBar is not equal to the given one.public JScrollBarFixture requireFocused()
JScrollBar has input focus.
requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JScrollBar does not have input focus.public JScrollBarFixture requireEnabled()
JScrollBar is enabled.
requireEnabled in interface StateVerificationFixtureAssertionError - if this fixture's JScrollBar is disabled.public JScrollBarFixture requireEnabled(Timeout timeout)
JScrollBar is enabled.
requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.
WaitTimedOutError - if this fixture's JScrollBar is never enabled.public JScrollBarFixture requireDisabled()
JScrollBar is disabled.
requireDisabled in interface StateVerificationFixtureAssertionError - if this fixture's JScrollBar is enabled.public JScrollBarFixture requireVisible()
JScrollBar is visible.
requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JScrollBar is not visible.public JScrollBarFixture requireNotVisible()
JScrollBar is not visible.
requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JScrollBar is visible.public JPopupMenuFixture showPopupMenu()
JScrollBar as the invoker of the pop-up menu.
showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.
ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
JScrollBar 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 JScrollBar is disabled.
IllegalStateException - if this fixture's JScrollBar is not showing on the screen.
ComponentLookupException - if a pop-up menu cannot be found.public Object clientProperty(Object key)
JScrollBar, 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 JScrollBarFixture requireToolTip(String expected)
JScrollBar 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 JScrollBar does not match the given value.public JScrollBarFixture requireToolTip(Pattern pattern)
JScrollBar 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 JScrollBar does not match the given regular
expression.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||