S - used to simulate "self types." For more information please read "Emulating 'self types' using Java Generics to simplify fluent API implementation."C - the type of Component that this fixture can manage.D - the type of ComponentDriver that this fixture uses internally.public abstract class AbstractSwingContainerFixture<S,C extends JComponent,D extends JComponentDriver> extends AbstractContainerFixture<S,C,D> implements JComponentFixture<S>, JPopupMenuInvokerFixture
Containers.BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY| Constructor and Description |
|---|
AbstractSwingContainerFixture(Class<S> selfType,
Robot robot,
C target)
Creates a new
AbstractSwingContainerFixture. |
AbstractSwingContainerFixture(Class<S> selfType,
Robot robot,
Class<? extends C> type)
Creates a new
AbstractSwingContainerFixture. |
AbstractSwingContainerFixture(Class<S> selfType,
Robot robot,
String name,
Class<? extends C> type)
Creates a new
AbstractSwingContainerFixture. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clientProperty(Object key)
Returns the client property stored in this fixture's
JScrollPane, under the given key. |
S |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's
JScrollPane matches the given regular expression pattern. |
S |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's
JScrollPane matches the given value. |
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's
JScrollPane 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
JScrollPane as the invoker of the pop-up menu. |
button, button, button, checkBox, checkBox, checkBox, comboBox, comboBox, comboBox, defaultDialogLookupTimeout, dialog, dialog, dialog, dialog, dialog, dialog, fileChooser, fileChooser, fileChooser, fileChooser, fileChooser, fileChooser, find, findByName, findByType, finder, label, label, label, list, list, list, menuItem, menuItem, menuItemWithPath, optionPane, optionPane, panel, panel, panel, progressBar, progressBar, progressBar, radioButton, radioButton, radioButton, scrollBar, scrollBar, scrollBar, scrollPane, scrollPane, scrollPane, slider, slider, slider, spinner, spinner, spinner, splitPane, splitPane, splitPane, tabbedPane, tabbedPane, tabbedPane, table, table, table, textBox, textBox, textBox, toggleButton, toggleButton, toggleButton, toolBar, toolBar, toolBar, tree, tree, tree, withbackground, click, click, click, createDriver, doubleClick, driver, focus, font, foreground, isEnabled, myself, pressAndReleaseKey, pressAndReleaseKeys, pressKey, releaseKey, replaceDriverWith, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireShowing, requireVisible, rightClick, robot, target, targetCastedTopublic AbstractSwingContainerFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nonnull Class<? extends C> type)
AbstractSwingContainerFixture.selfType - the "self type."robot - performs simulation of user events on a Container.type - the type of the Container to find using the given Robot.NullPointerException - if robot is null.NullPointerException - if type is null.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.ComponentFinder.findByType(Class)public AbstractSwingContainerFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nullable String name, @Nonnull Class<? extends C> type)
AbstractSwingContainerFixture.selfType - the "self type."robot - performs simulation of user events on a Container.name - the name of the Container to find using the given Robot.type - the type of the Container to find using the given Robot.NullPointerException - if robot is null.NullPointerException - if type is null.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.ComponentFinder.findByName(String, Class)public AbstractSwingContainerFixture(@Nonnull Class<S> selfType, @Nonnull Robot robot, @Nonnull C target)
AbstractSwingContainerFixture.selfType - the "self type."robot - performs simulation of user events on the given Container.target - the Container to be.NullPointerException - if robot is null.NullPointerException - if target is null.@Nonnull public final S requireToolTip(@Nullable String expected)
JScrollPane matches the given value.requireToolTip in interface JComponentFixture<S>expected - the given value. It can be a regular expression.AssertionError - if the toolTip in this fixture's JScrollPane does not match the given value.@Nonnull public final S requireToolTip(@Nonnull Pattern pattern)
JScrollPane matches the given regular expression pattern.requireToolTip in interface JComponentFixture<S>pattern - the regular expression pattern to match.NullPointerException - if the given regular expression pattern is null.AssertionError - if the toolTip in this fixture's JScrollPane does not match the given regular
expression.@Nullable public final Object clientProperty(@Nonnull Object key)
JScrollPane, under the given key.clientProperty in interface JComponentFixture<S>key - the key to use to retrieve the client property.null if the property was not found.NullPointerException - if the given key is null.@Nonnull public final JPopupMenuFixture showPopupMenu()
JScrollPane as the invoker of the pop-up menu.showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JScrollPane is disabled.IllegalStateException - if this fixture's JScrollPane is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.@Nonnull public final JPopupMenuFixture showPopupMenuAt(@Nonnull Point p)
JScrollPane 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 JScrollPane is disabled.IllegalStateException - if this fixture's JScrollPane is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.Copyright © 2014 AssertJ. All rights reserved.