public class JTabbedPaneFixture extends ComponentFixture<JTabbedPane> implements CommonComponentFixture, JComponentFixture, JPopupMenuInvokerFixture
JTabbedPanes:
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target| Constructor and Description |
|---|
JTabbedPaneFixture(Robot robot,
JTabbedPane target)
Creates a new
. |
JTabbedPaneFixture(Robot robot,
String tabbedPaneName)
Creates a new
. |
| Modifier and Type | Method and Description |
|---|---|
JTabbedPaneFixture |
click()
Simulates a user clicking this fixture's
. |
JTabbedPaneFixture |
click(MouseButton button)
Simulates a user clicking this fixture's
. |
JTabbedPaneFixture |
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. |
JTabbedPaneFixture |
doubleClick()
Simulates a user double-clicking this fixture's
. |
protected void |
driver(JTabbedPaneDriver newDriver)
Sets the
to be used by this fixture. |
JTabbedPaneFixture |
focus()
Gives input focus to this fixture's
. |
JTabbedPaneFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's
. |
JTabbedPaneFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on this fixture's
. |
JTabbedPaneFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's
. |
JTabbedPaneFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's
. |
JTabbedPaneFixture |
requireDisabled()
Asserts that this fixture's
is disabled. |
JTabbedPaneFixture |
requireEnabled()
Asserts that this fixture's
is enabled. |
JTabbedPaneFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's
is enabled. |
JTabbedPaneFixture |
requireFocused()
Asserts that this fixture's
has input focus. |
JTabbedPaneFixture |
requireNotVisible()
Asserts that this fixture's
is not visible. |
JTabbedPaneFixture |
requireTabTitles(String... titles)
Asserts that the tabs of this fixture's
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 |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's
matches the given regular expression
pattern. |
JTabbedPaneFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's
matches the given value. |
JTabbedPaneFixture |
requireVisible()
Asserts that this fixture's
is visible. |
JTabbedPaneFixture |
rightClick()
Simulates a user right-clicking this fixture's
. |
Component |
selectedComponent()
Returns the currently selected component for this fixture's
. |
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.
|
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. |
String[] |
tabTitles()
Returns the titles of all the tabs in this fixture's
. |
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNullpublic JTabbedPaneFixture(Robot robot, 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(Robot robot, 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.protected final void driver(JTabbedPaneDriver newDriver)
JTabbedPaneDriver to be used by this fixture.newDriver - the new JTabbedPaneDriver.NullPointerException - if the given driver is null.public String[] tabTitles()
JTabbedPane.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.public JTabbedPaneFixture selectTab(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.public JTabbedPaneFixture selectTab(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.public Component selectedComponent()
JTabbedPane.JTabbedPane.public JTabbedPaneFixture click()
JTabbedPane.click in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.public JTabbedPaneFixture click(MouseButton button)
JTabbedPane.click in interface MouseInputSimulationFixturebutton - the button to click.NullPointerException - if the given MouseButton is null.IllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.public JTabbedPaneFixture click(MouseClickInfo mouseClickInfo)
JTabbedPane.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 JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.public JTabbedPaneFixture doubleClick()
JTabbedPane.doubleClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.public JTabbedPaneFixture rightClick()
JTabbedPane.rightClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.public JTabbedPaneFixture focus()
JTabbedPane.focus in interface FocusableComponentFixtureIllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.public JTabbedPaneFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JTabbedPane.
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 JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.KeyPressInfopublic JTabbedPaneFixture pressAndReleaseKeys(int... keyCodes)
JTabbedPane. This
method does not affect the current focus.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 JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.KeyEventpublic JTabbedPaneFixture pressKey(int keyCode)
JTabbedPane.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 JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.KeyEventpublic JTabbedPaneFixture releaseKey(int keyCode)
JTabbedPane.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 JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.KeyEventpublic JTabbedPaneFixture requireFocused()
JTabbedPane has input focus.requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JTabbedPane does not have input focus.public JTabbedPaneFixture requireEnabled()
JTabbedPane is enabled.requireEnabled in interface StateVerificationFixtureAssertionError - if this fixture's JTabbedPane is disabled.public JTabbedPaneFixture requireEnabled(Timeout timeout)
JTabbedPane is enabled.requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.WaitTimedOutError - if this fixture's JTabbedPane is never enabled.public JTabbedPaneFixture requireDisabled()
JTabbedPane is disabled.requireDisabled in interface StateVerificationFixtureAssertionError - if this fixture's JTabbedPane is enabled.public JTabbedPaneFixture requireVisible()
JTabbedPane is visible.requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JTabbedPane is not visible.public JTabbedPaneFixture requireNotVisible()
JTabbedPane is not visible.requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JTabbedPane is visible.public JTabbedPaneFixture requireTitle(String title, 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.public JTabbedPaneFixture requireTitle(Pattern pattern, 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.public JTabbedPaneFixture requireTabTitles(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.public JTabbedPaneFixture requireToolTip(String expected)
JTabbedPane 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 JTabbedPane does not match the given value.public JTabbedPaneFixture requireToolTip(Pattern pattern)
JTabbedPane 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 JTabbedPane does not match the given regular
expression pattern.public Object clientProperty(Object key)
JTabbedPane, 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 JPopupMenuFixture showPopupMenu()
JTabbedPane as the invoker of the pop-up menu.showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
JTabbedPane 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 JTabbedPane is disabled.IllegalStateException - if this fixture's JTabbedPane is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.