Class ComponentStateValidator

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

public final class ComponentStateValidator extends Object
Understands validation of the state of a Component.
  • Constructor Details

    • ComponentStateValidator

      private ComponentStateValidator()
  • Method Details

    • validateIsEnabledAndShowing

      @RunsInCurrentThread public static void validateIsEnabledAndShowing(Component c)
      Asserts that the Component is enabled and showing.

      Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

      Parameters:
      c - the target component.
      Throws:
      IllegalStateException - if the Component is disabled.
      IllegalStateException - if the Component is not showing on the screen.
    • validateIsEnabled

      @RunsInCurrentThread public static void validateIsEnabled(Component c)
      Asserts that the Component is enabled.

      Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

      Parameters:
      c - the target component.
      Throws:
      IllegalStateException - if the Component is disabled.
    • validateIsShowing

      @RunsInCurrentThread public static void validateIsShowing(Component c)
      Asserts that the Component is showing on the screen.

      Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

      Parameters:
      c - the target component.
      Throws:
      IllegalStateException - if the Component is not showing on the screen.
    • componentNotShowingOnScreenFailure

      @RunsInCurrentThread public static IllegalStateException componentNotShowingOnScreenFailure(Component c)
      Throws a IllegalStateException when a Component is not showing on the screen.

      Note: This method is not executed in the event dispatch thread (EDT.) Clients are responsible for invoking this method in the EDT.

      Parameters:
      c - the target component.
      Returns:
      the thrown exception.