public class JTabbedPaneFixture extends AbstractJPopupMenuInvokerFixture<JTabbedPaneFixture,JTabbedPane,JTabbedPaneDriver>
JTabbedPanes.BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY| Constructor and Description |
|---|
JTabbedPaneFixture(Robot robot,
JTabbedPane target)
Creates a new
JTabbedPaneFixture. |
JTabbedPaneFixture(Robot robot,
String tabbedPaneName)
Creates a new
JTabbedPaneFixture. |
| Modifier and Type | Method and Description |
|---|---|
protected JTabbedPaneDriver |
createDriver(Robot robot) |
JTabbedPaneFixture |
requireTabTitles(String... titles)
Asserts that the tabs of this fixture's
JTabbedPane have the given titles. |
JTabbedPaneFixture |
requireTitle(Pattern pattern,
Index index)
Asserts that the title of the tab at the given index matches the given regular expression pattern.
|
JTabbedPaneFixture |
requireTitle(String title,
Index index)
Asserts that the title of the tab at the given index matches the given value.
|
JTabbedPaneFixture |
selectTab(int index)
Simulates a user selecting the tab located at the given index.
|
JTabbedPaneFixture |
selectTab(Pattern pattern)
Simulates a user selecting the tab whose title matches the given regular expression pattern.
|
JTabbedPaneFixture |
selectTab(String title)
Simulates a user selecting the tab whose title matches the given value.
|
String[] |
tabTitles()
Returns the titles of all the tabs in this fixture's
JTabbedPane. |
showPopupMenu, 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 JTabbedPaneFixture(@Nonnull Robot robot, @Nonnull JTabbedPane target)
JTabbedPaneFixture.robot - performs simulation of user events on the given JTabbedPane.target - the JTabbedPane to be managed by this fixture.NullPointerException - if robot is null.NullPointerException - if target is null.public JTabbedPaneFixture(@Nonnull Robot robot, @Nonnull String tabbedPaneName)
JTabbedPaneFixture.robot - performs simulation of user events on a JTabbedPane.tabbedPaneName - the name of the JTabbedPane to find using the given Robot.NullPointerException - if robot is null.ComponentLookupException - if a matching JTabbedPane could not be found.ComponentLookupException - if more than one matching JTabbedPane is found.@Nonnull protected JTabbedPaneDriver createDriver(@Nonnull Robot robot)
createDriver in class AbstractComponentFixture<JTabbedPaneFixture,JTabbedPane,JTabbedPaneDriver>public String[] tabTitles()
JTabbedPane.@Nonnull public JTabbedPaneFixture selectTab(int index)
index - the index of the tab to select.IllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.IndexOutOfBoundsException - if the given index is not within the JTabbedPane bounds.@Nonnull public JTabbedPaneFixture selectTab(@Nullable String title)
title - the title to match. It can be a regular expression.IllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.LocationUnavailableException - if a tab matching the given title could not be found.@Nonnull public JTabbedPaneFixture selectTab(@Nonnull Pattern pattern)
pattern - the regular expression pattern to match.IllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.NullPointerException - if the given regular expression pattern is null.LocationUnavailableException - if a tab matching the given regular expression pattern could not be found.@Nonnull public JTabbedPaneFixture requireTitle(@Nullable String title, @Nonnull Index index)
title - the expected title. It can be a regular expression.index - the index of the tab.IndexOutOfBoundsException - if the given index is not within the JTabbedPane bounds.AssertionError - if the title of the tab at the given index does not match the given one.@Nonnull public JTabbedPaneFixture requireTitle(@Nonnull Pattern pattern, @Nonnull Index index)
pattern - the regular expression pattern to match.index - the index of the tab.NullPointerException - if the given regular expression pattern is null.AssertionError - if the title of the tab at the given index does not match the given regular expression
pattern.@Nonnull public JTabbedPaneFixture requireTabTitles(@Nonnull String... titles)
JTabbedPane have the given titles. The tab titles are evaluated by
index order, for example, the first tab is expected to have the first title in the given array, and so on.titles - the expected titles.AssertionError - if the title of any of the tabs is not equal to the expected titles.Copyright © 2014 AssertJ. All rights reserved.