Package org.fest.swing.driver
Class JTabbedPaneLocation
java.lang.Object
org.fest.swing.driver.JTabbedPaneLocation
Understands a location on a
JTabbedPane
(notably a tab).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
indexOf
(JTabbedPane tabbedPane, String title) Returns the index of the first tab that matches the givenString
.int
indexOf
(JTabbedPane tabbedPane, TextMatcher matcher) Returns the index of the first tab whose title matches the value in the given
.TextMatcher
pointAt
(JTabbedPane tabbedPane, int index) Returns the coordinates of the tab under the given index.(package private) void
validateIndex
(JTabbedPane tabbedPane, int index)
-
Constructor Details
-
JTabbedPaneLocation
public JTabbedPaneLocation()
-
-
Method Details
-
indexOf
Returns the index of the first tab that matches the givenString
.Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
tabbedPane
- the targetJTabbedPane
.title
- the title to match.- Returns:
- the index of the first tab that matches the given
String
. - Throws:
LocationUnavailableException
- if a tab matching the given title could not be found.
-
indexOf
Returns the index of the first tab whose title matches the value in the given
.TextMatcher
Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
tabbedPane
- the targetJTabbedPane
.matcher
- indicates if the text of theJTabbedPane
matches the value we are looking for.- Returns:
- the index of the first tab that matches the given
String
. - Throws:
LocationUnavailableException
- if a tab matching the given title could not be found.
-
pointAt
Returns the coordinates of the tab under the given index.Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
tabbedPane
- the targetJTabbedPane
.index
- the given index.- Returns:
- the coordinates of the tab under the given index.
- Throws:
IndexOutOfBoundsException
- if the given index is negative or out of bounds.LocationUnavailableException
- if the tab under the given index is not visible.
-
validateIndex
-