@InternalApi public abstract class ContainerDriver extends ComponentDriver
Supports functional testing of AWT or Swing Container
s.
Note: This class is intended for internal use only. Please use the classes in the package
org.assertj.swing.fixture
in your tests.
robot
Constructor and Description |
---|
ContainerDriver(Robot robot)
Creates a new
ContainerDriver . |
Modifier and Type | Method and Description |
---|---|
protected void |
doResizeHeight(Container c,
int height)
Resizes the AWT or Swing
Container vertically. |
protected void |
doResizeWidth(Container c,
int width)
Resizes the AWT or Swing
Container horizontally. |
protected boolean |
isResizable(Container c) |
void |
move(Container c,
int x,
int y)
Move the given AWT or Swing
Container to the requested location. |
protected void |
resize(Container c,
int width,
int height)
Resizes the AWT or Swing
Container to the given size. |
backgroundOf, checkClickAllowed, checkInEdtEnabledAndShowing, checkInEdtShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, drop, focus, focusAndWaitForFocusGain, fontOf, foregroundOf, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, pressKeyWhileRunning, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
public ContainerDriver(@Nonnull Robot robot)
ContainerDriver
.robot
- the robot to use to simulate user input.@RunsInEDT protected final void doResizeWidth(@Nonnull Container c, int width)
Container
horizontally.c
- the given Container
.width
- the width that the Container
should have after being resized.IllegalStateException
- if the Container
is not enabled.IllegalStateException
- if the Container
is not resizable by the user.IllegalStateException
- if the Container
is not showing on the screen.@RunsInEDT protected final void doResizeHeight(@Nonnull Container c, int height)
Container
vertically.c
- the given Container
.height
- the height that the Container
should have after being resized.IllegalStateException
- if the Container
is not enabled.IllegalStateException
- if the Container
is not resizable by the user.IllegalStateException
- if the Container
is not showing on the screen.@RunsInEDT protected final void resize(@Nonnull Container c, int width, int height)
Container
to the given size.c
- the given Container
.width
- the width to resize the Container
to.height
- the height to resize the Container
to.IllegalStateException
- if the Container
is not enabled.IllegalStateException
- if the Container
is not resizable by the user.IllegalStateException
- if the Container
is not showing on the screen.@RunsInCurrentThread protected boolean isResizable(@Nonnull Container c)
@RunsInEDT public void move(@Nonnull Container c, int x, int y)
Container
to the requested location.c
- the given Container
.x
- the horizontal coordinate.y
- the vertical coordinate.IllegalStateException
- if the Container
is not enabled.IllegalStateException
- if the Container
is not movable by the user.IllegalStateException
- if the Container
is not showing on the screen.Copyright © 2014–2017 AssertJ. All rights reserved.