Package org.fest.swing.driver
Class JTableHeaderLocation
java.lang.Object
org.fest.swing.driver.JTableHeaderLocation
Understands the location of a
JTableHeader
(a coordinate, column index or value.)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
columnCount
(JTableHeader header) private String
columnName
(JTableHeader tableHeader, int index) int
indexOf
(JTableHeader tableHeader, TextMatcher matcher) Returns the index of the column which name matches the value in the given
, or -1 if a matching column was not found.TextMatcher
private boolean
isValidIndex
(JTableHeader tableHeader, int index) private static Point
point
(JTableHeader tableHeader, int index) pointAt
(JTableHeader tableHeader, int index) Returns the coordinates of the column under the given index.pointAt
(JTableHeader tableHeader, TextMatcher matcher) Returns the index and the coordinates of the column which name matches the value in the given
.TextMatcher
private int
validatedIndex
(JTableHeader tableHeader, int index)
-
Constructor Details
-
JTableHeaderLocation
public JTableHeaderLocation()
-
-
Method Details
-
pointAt
@RunsInCurrentThread public Pair<Integer,Point> pointAt(JTableHeader tableHeader, TextMatcher matcher) Returns the index and the coordinates of the column which name 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:
tableHeader
- the targetJTableHeader
.matcher
- indicates which is the matching column name.- Returns:
- the index and the coordinates of the column under the given index.
- Throws:
LocationUnavailableException
- if a column with a matching value cannot be found.
-
isValidIndex
-
pointAt
Returns the coordinates of the column 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:
tableHeader
- the targetJTableHeader
.index
- the given index.- Returns:
- the coordinates of the column under the given index.
- Throws:
IndexOutOfBoundsException
- if the index is out of bounds.
-
point
-
validatedIndex
-
indexOf
Returns the index of the column which name matches the value in the given
, or -1 if a matching column was not found.TextMatcher
Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.
- Parameters:
tableHeader
- the targetJTableHeader
.matcher
- indicates which is the matching column name.- Returns:
- the index of a matching column or -1 if a matching column was not found.
-
columnCount
-
columnName
-