Package org.fest.swing.driver
Class ComponentStateValidator
java.lang.Object
org.fest.swing.driver.ComponentStateValidator
Understands validation of the state of a
Component
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IllegalStateException
Throws a
when aIllegalStateException
is not showing on the screen.Component
static void
Asserts that the
is enabled.Component
static void
Asserts that the
is enabled and showing.Component
static void
Asserts that the
is showing on the screen.Component
-
Constructor Details
-
ComponentStateValidator
private ComponentStateValidator()
-
-
Method Details
-
validateIsEnabledAndShowing
Asserts that the
is enabled and showing.Component
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 theComponent
is disabled.IllegalStateException
- if theComponent
is not showing on the screen.
-
validateIsEnabled
Asserts that the
is enabled.Component
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 theComponent
is disabled.
-
validateIsShowing
Asserts that the
is showing on the screen.Component
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 theComponent
is not showing on the screen.
-
componentNotShowingOnScreenFailure
@RunsInCurrentThread public static IllegalStateException componentNotShowingOnScreenFailure(Component c) Throws a
when aIllegalStateException
is not showing on the screen.Component
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.
-