org.fest.swing.driver
Class ComponentStateValidator

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

public final class ComponentStateValidator
extends Object

Understands validation of the state of a Component.

Author:
Alex Ruiz

Method Summary
static IllegalStateException componentNotShowingOnScreenFailure(Component c)
          Throws a IllegalStateException when a Component is not showing on the screen.
static void validateIsEnabled(Component c)
          Asserts that the Component is enabled.
static void validateIsEnabledAndShowing(Component c)
          Asserts that the Component is enabled and showing.
static void validateIsShowing(Component c)
          Asserts that the Component is showing on the screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validateIsEnabledAndShowing

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

Note: This method is not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from 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 guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from 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 guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from 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 guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for calling this method from the EDT.

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


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.