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 intcolumnCount(JTableHeader header) private StringcolumnName(JTableHeader tableHeader, int index) intindexOf(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.TextMatcherprivate booleanisValidIndex(JTableHeader tableHeader, int index) private static Pointpoint(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.TextMatcherprivate intvalidatedIndex(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.TextMatcherNote: 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.TextMatcherNote: 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
-