Class JTableHeaderLocation

java.lang.Object
org.fest.swing.driver.JTableHeaderLocation

public class JTableHeaderLocation extends Object
Understands the location of a JTableHeader (a coordinate, column index or value.)
  • 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 target JTableHeader.
      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

      @RunsInCurrentThread private boolean isValidIndex(JTableHeader tableHeader, int index)
    • pointAt

      @RunsInCurrentThread public Point pointAt(JTableHeader tableHeader, int index)
      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 target JTableHeader.
      index - the given index.
      Returns:
      the coordinates of the column under the given index.
      Throws:
      IndexOutOfBoundsException - if the index is out of bounds.
    • point

      @RunsInCurrentThread private static Point point(JTableHeader tableHeader, int index)
    • validatedIndex

      @RunsInCurrentThread private int validatedIndex(JTableHeader tableHeader, int index)
    • indexOf

      @RunsInCurrentThread public int indexOf(JTableHeader tableHeader, TextMatcher matcher)
      Returns the index of the column which name matches the value in the given TextMatcher, or -1 if a matching column was not found.

      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 target JTableHeader.
      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

      @RunsInCurrentThread private int columnCount(JTableHeader header)
    • columnName

      @RunsInCurrentThread private String columnName(JTableHeader tableHeader, int index)