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 IllegalStateExceptionThrows awhen aIllegalStateExceptionis not showing on the screen.Componentstatic voidAsserts that theis enabled.Componentstatic voidAsserts that theis enabled and showing.Componentstatic voidAsserts that theis showing on the screen.Component
-
Constructor Details
-
ComponentStateValidator
private ComponentStateValidator()
-
-
Method Details
-
validateIsEnabledAndShowing
Asserts that theis enabled and showing.ComponentNote: 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 theComponentis disabled.IllegalStateException- if theComponentis not showing on the screen.
-
validateIsEnabled
Asserts that theis enabled.ComponentNote: 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 theComponentis disabled.
-
validateIsShowing
Asserts that theis showing on the screen.ComponentNote: 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 theComponentis not showing on the screen.
-
componentNotShowingOnScreenFailure
@RunsInCurrentThread public static IllegalStateException componentNotShowingOnScreenFailure(Component c) Throws awhen aIllegalStateExceptionis not showing on the screen.ComponentNote: 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.
-