@InternalApi public class JTabbedPaneLocation extends Object
JTabbedPane
(notably a tab).Constructor and Description |
---|
JTabbedPaneLocation() |
Modifier and Type | Method and Description |
---|---|
int |
indexOf(JTabbedPane tabbedPane,
String title)
Returns the index of the first tab that matches the given
String . |
int |
indexOf(JTabbedPane tabbedPane,
TextMatcher matcher)
Returns the index of the first tab whose title matches the value in the given
TextMatcher . |
Point |
pointAt(JTabbedPane tabbedPane,
int index)
Returns the coordinates of the tab under the given index.
|
@RunsInCurrentThread public int indexOf(@Nonnull JTabbedPane tabbedPane, @Nullable String title)
Returns the index of the first tab that matches the given String
.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT). Client code must call this method from the EDT.
tabbedPane
- the target JTabbedPane
.title
- the title to match.String
.LocationUnavailableException
- if a tab matching the given title could not be found.@RunsInCurrentThread public int indexOf(@Nonnull JTabbedPane tabbedPane, @Nonnull TextMatcher matcher)
Returns the index of the first tab whose title matches the value in the given TextMatcher
.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT). Client code must call this method from the EDT.
tabbedPane
- the target JTabbedPane
.matcher
- indicates if the text of the JTabbedPane
matches the value we are looking for.String
.LocationUnavailableException
- if a tab matching the given title could not be found.@RunsInCurrentThread @Nonnull public Point pointAt(@Nonnull JTabbedPane tabbedPane, int index)
Returns the coordinates of the tab under the given index.
Note: This method is accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT). Client code must call this method from the EDT.
tabbedPane
- the target JTabbedPane
.index
- the given index.IndexOutOfBoundsException
- if the given index is negative or out of bounds.LocationUnavailableException
- if the tab under the given index is not visible.Copyright © 2014–2019 AssertJ. All rights reserved.