Class JTabbedPaneLocation

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

public class JTabbedPaneLocation extends Object
Understands a location on a JTabbedPane (notably a tab).
  • Constructor Details

    • JTabbedPaneLocation

      public JTabbedPaneLocation()
  • Method Details

    • indexOf

      @RunsInCurrentThread public int indexOf(JTabbedPane tabbedPane, String title)
      Returns the index of the first tab that matches the given String.

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

      @RunsInCurrentThread public int indexOf(JTabbedPane tabbedPane, TextMatcher matcher)
      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 target JTabbedPane.
      matcher - indicates if the text of the JTabbedPane 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

      @RunsInCurrentThread public Point pointAt(JTabbedPane tabbedPane, int index)
      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 target JTabbedPane.
      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

      @RunsInCurrentThread void validateIndex(JTabbedPane tabbedPane, int index)