public class JScrollBarFixture extends AbstractJPopupMenuInvokerFixture<JScrollBarFixture,JScrollBar,JScrollBarDriver>
JScrollBar
s.BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY
Constructor and Description |
---|
JScrollBarFixture(Robot robot,
JScrollBar target)
Creates a new
JScrollBarFixture . |
JScrollBarFixture(Robot robot,
String scrollBarName)
Creates a new
JScrollBarFixture . |
Modifier and Type | Method and Description |
---|---|
protected JScrollBarDriver |
createDriver(Robot robot) |
JScrollBarFixture |
requireValue(int value)
Asserts that the value of this fixture's
JScrollBar is equal to the given one. |
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
JScrollBar . |
JScrollBarFixture |
scrollToMinimum()
Simulates a user scrolling to the minimum position of this fixture's
JScrollBar . |
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.
|
showPopupMenu, showPopupMenuAt
clientProperty, requireToolTip, requireToolTip
background, click, click, click, doubleClick, driver, drop, equals, focus, font, foreground, hashCode, isEnabled, myself, pressAndReleaseKey, pressAndReleaseKeys, pressKey, pressKeyWhileRunning, releaseKey, replaceDriverWith, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireShowing, requireVisible, rightClick, robot, target, targetCastedTo
public JScrollBarFixture(@Nonnull Robot robot, @Nonnull 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(@Nonnull Robot robot, @Nullable 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.@Nonnull protected JScrollBarDriver createDriver(@Nonnull Robot robot)
createDriver
in class AbstractComponentFixture<JScrollBarFixture,JScrollBar,JScrollBarDriver>
@Nonnull public JScrollBarFixture scrollBlockDown()
IllegalStateException
- if this fixture's JScrollBar
is disabled.IllegalStateException
- if this fixture's JScrollBar
is not showing on the screen.@Nonnull 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.@Nonnull public JScrollBarFixture scrollBlockUp()
IllegalStateException
- if this fixture's JScrollBar
is disabled.IllegalStateException
- if this fixture's JScrollBar
is not showing on the screen.@Nonnull 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.@Nonnull 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.@Nonnull public JScrollBarFixture scrollToMaximum()
JScrollBar
.IllegalStateException
- if this fixture's JScrollBar
is disabled.IllegalStateException
- if this fixture's JScrollBar
is not showing on the screen.@Nonnull public JScrollBarFixture scrollToMinimum()
JScrollBar
.IllegalStateException
- if this fixture's JScrollBar
is disabled.IllegalStateException
- if this fixture's JScrollBar
is not showing on the screen.@Nonnull public JScrollBarFixture scrollUnitDown()
IllegalStateException
- if this fixture's JScrollBar
is disabled.IllegalStateException
- if this fixture's JScrollBar
is not showing on the screen.@Nonnull 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.@Nonnull public JScrollBarFixture scrollUnitUp()
IllegalStateException
- if this fixture's JScrollBar
is disabled.IllegalStateException
- if this fixture's JScrollBar
is not showing on the screen.@Nonnull 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.@Nonnull 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.Copyright © 2014–2019 AssertJ. All rights reserved.