S - used to simulate "self types." For more information please read "Emulating 'self types' using Java Generics to simplify fluent API implementation."T - the type of AbstractButton that this fixture can manage.public abstract class AbstractTwoStateButtonFixture<S,T extends AbstractButton> extends AbstractButtonFixture<S,T>
AbstractButtons that have 2 states ("checked" and "unchecked.")BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY| Constructor and Description |
|---|
AbstractTwoStateButtonFixture(Class<S> selfType,
Robot robot,
String buttonName,
Class<? extends T> type)
Creates a new
AbstractButtonFixture. |
AbstractTwoStateButtonFixture(Class<S> selfType,
Robot robot,
T target)
Creates a new
AbstractButtonFixture. |
| Modifier and Type | Method and Description |
|---|---|
S |
check()
Checks (or selects) this fixture's
AbstractButton only it is not already checked. |
S |
requireNotSelected()
Verifies that this fixture's
AbstractButton is not selected. |
S |
requireSelected()
Verifies that this fixture's
AbstractButton is selected. |
S |
uncheck()
Unchecks this fixture's
AbstractButton only if it is checked. |
createDriver, requireText, requireText, textshowPopupMenu, showPopupMenuAtclientProperty, requireToolTip, requireToolTipbackground, click, click, click, doubleClick, driver, focus, font, foreground, isEnabled, myself, pressAndReleaseKey, pressAndReleaseKeys, pressKey, releaseKey, replaceDriverWith, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireShowing, requireVisible, rightClick, robot, target, targetCastedTopublic AbstractTwoStateButtonFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nonnull T target)
AbstractButtonFixture.selfType - the "self type."target - the JButton to be managed by this fixture.robot - performs simulation of user events on the given AbstractButton.NullPointerException - if robot is null.NullPointerException - if target is null.public AbstractTwoStateButtonFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nullable String buttonName, @Nonnull Class<? extends T> type)
AbstractButtonFixture.selfType - the "self type."robot - performs simulation of user events on a AbstractButton.buttonName - the name of the AbstractButton to find using the given RobotFixture.type - the type of the AbstractButton to find using the given Robot.NullPointerException - if robot is null.NullPointerException - if type is null.ComponentLookupException - if a matching AbstractButton could not be found.ComponentLookupException - if more than one matching AbstractButton is found.@Nonnull public final S check()
AbstractButton only it is not already checked.IllegalStateException - if this fixture's AbstractButton is disabled.IllegalStateException - if this fixture's AbstractButton is not showing on the screen.@Nonnull public final S uncheck()
AbstractButton only if it is checked.IllegalStateException - if this fixture's AbstractButton is disabled.IllegalStateException - if this fixture's AbstractButton is not showing on the screen.@Nonnull public final S requireSelected()
AbstractButton is selected.AssertionError - if the AbstractButton managed by this fixture is not selected.@Nonnull public final S requireNotSelected()
AbstractButton is not selected.AssertionError - if the AbstractButton managed by this fixture is selected.Copyright © 2014 AssertJ. All rights reserved.