public final class ComponentShownWaiter extends ComponentAdapter
Component
shows up on the screen.Modifier and Type | Method and Description |
---|---|
void |
componentShown(ComponentEvent e)
Notification that the AWT or Swing
Component to wait for is finally shown on the screen. |
static void |
waitTillShown(Component toWaitFor)
Waits until the given AWT or Swing
Component is shown on the screen, using a timeout of 5 seconds. |
static void |
waitTillShown(Component toWaitFor,
long timeout)
Waits until the given AWT or Swing
Component is shown on the screen. |
componentHidden, componentMoved, componentResized
public static void waitTillShown(@Nonnull Component toWaitFor)
Component
is shown on the screen, using a timeout of 5 seconds.toWaitFor
- the Component
to wait for.WaitTimedOutError
- if the Component
is not shown before the default timeout of 5 seconds.public static void waitTillShown(@Nonnull Component toWaitFor, long timeout)
Component
is shown on the screen.toWaitFor
- the Component
to wait for.timeout
- the amount to time (in milliseconds) to wait for the Component
to be shown.WaitTimedOutError
- if the Component
is not shown before the given timeout expires.@RunsInEDT public void componentShown(@Nullable ComponentEvent e)
Component
to wait for is finally shown on the screen.componentShown
in interface ComponentListener
componentShown
in class ComponentAdapter
e
- the event raised when the Component
has been made visible.Copyright © 2014–2019 AssertJ. All rights reserved.