|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.JComponentDriver
org.fest.swing.driver.JTabbedPaneDriver
public class JTabbedPaneDriver
Understands functional testing of
s:
JTabbedPane
org.fest.swing.fixture
in your tests.
Field Summary |
---|
Fields inherited from class org.fest.swing.driver.ComponentDriver |
---|
robot |
Constructor Summary | |
---|---|
JTabbedPaneDriver(Robot robot)
Creates a new JTabbedPaneDriver . |
Method Summary | |
---|---|
void |
requireTabTitle(JTabbedPane tabbedPane,
Pattern pattern,
Index index)
Asserts that the title of the tab at the given index matches the given regular expression pattern. |
void |
requireTabTitle(JTabbedPane tabbedPane,
String title,
Index index)
Asserts that the title of the tab at the given index matches the given value. |
void |
requireTabTitles(JTabbedPane tabbedPane,
String[] titles)
Asserts that the tabs of the given have the given titles. |
Component |
selectedComponentOf(JTabbedPane tabbedPane)
Returns the currently selected component for the given . |
void |
selectTab(JTabbedPane tabbedPane,
int index)
Simulates a user selecting the tab located at the given index. |
void |
selectTab(JTabbedPane tabbedPane,
Pattern pattern)
Simulates a user selecting the tab whose title matches the given regular expression pattern. |
void |
selectTab(JTabbedPane tabbedPane,
String title)
Simulates a user selecting the tab containing the given title. |
String[] |
tabTitles(JTabbedPane tabbedPane)
Returns the titles of all the tabs. |
Methods inherited from class org.fest.swing.driver.JComponentDriver |
---|
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible |
Methods inherited from class org.fest.swing.driver.ContainerDriver |
---|
move, resize, resizeHeight, resizeWidth |
Methods inherited from class org.fest.swing.driver.ComponentDriver |
---|
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTabbedPaneDriver(Robot robot)
JTabbedPaneDriver
.
robot
- the robot to use to simulate user input.Method Detail |
---|
@RunsInEDT public String[] tabTitles(JTabbedPane tabbedPane)
tabbedPane
- the target JTabbedPane
.
@RunsInEDT public void selectTab(JTabbedPane tabbedPane, String title)
tabbedPane
- the target JTabbedPane
.title
- the given text to match. It can be a regular expression.
IllegalStateException
- if the JTabbedPane
is disabled.
IllegalStateException
- if the JTabbedPane
is not showing on the screen.
LocationUnavailableException
- if a tab matching the given title could not be found.@RunsInEDT public void selectTab(JTabbedPane tabbedPane, Pattern pattern)
tabbedPane
- the target JTabbedPane
.pattern
- the regular expression pattern to match.
IllegalStateException
- if the JTabbedPane
is disabled.
IllegalStateException
- if the 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 void selectTab(JTabbedPane tabbedPane, int index)
tabbedPane
- the target JTabbedPane
.index
- the index of the tab to select.
IllegalStateException
- if the JTabbedPane
is disabled.
IllegalStateException
- if the JTabbedPane
is not showing on the screen.
IndexOutOfBoundsException
- if the given index is not within the JTabbedPane
bounds.@RunsInEDT public Component selectedComponentOf(JTabbedPane tabbedPane)
JTabbedPane
.
tabbedPane
- the target JTabbedPane
.
JTabbedPane
.@RunsInEDT public void requireTabTitle(JTabbedPane tabbedPane, String title, Index index)
tabbedPane
- the target JTabbedPane
.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.@RunsInEDT public void requireTabTitle(JTabbedPane tabbedPane, Pattern pattern, Index index)
tabbedPane
- the target JTabbedPane
.pattern
- the regular expression pattern to match.index
- the index of the tab.
NullPointerException
- if the given regular expression pattern is null
.
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.@RunsInEDT public void requireTabTitles(JTabbedPane tabbedPane, 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.
tabbedPane
- the target JTabbedPane
.titles
- the expected titles.
AssertionError
- if the title of any of the tabs is not equal to the expected titles.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |