@InternalApi public class JInternalFrameDriver extends JComponentDriver
Supports functional testing of JInternalFrame
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 |
---|
JInternalFrameDriver(Robot robot)
Creates a new
JInternalFrameDriver . |
Modifier and Type | Method and Description |
---|---|
void |
close(JInternalFrame internalFrame)
Closes the given
JInternalFrame . |
void |
deiconify(JInternalFrame internalFrame)
De-iconifies the given
JInternalFrame . |
void |
iconify(JInternalFrame internalFrame)
Iconifies the given
JInternalFrame . |
void |
maximize(JInternalFrame internalFrame)
Maximises the given
JInternalFrame , deconifying it first if it is iconified. |
void |
move(JInternalFrame internalFrame,
Point where)
Moves the
JInternalFrame to the given location. |
void |
moveToBack(JInternalFrame internalFrame)
Brings the given
JInternalFrame to the back. |
void |
moveToFront(JInternalFrame internalFrame)
Brings the given
JInternalFrame to the front. |
void |
normalize(JInternalFrame internalFrame)
Normalises the given
JInternalFrame , deconifying it first if it is iconified. |
void |
requireTitle(JInternalFrame frame,
String expected)
Verifies that the title of the given
JInternalFrame is equal to the expected one. |
void |
resizeHeight(JInternalFrame w,
int height)
Resizes the
JInternalFrame vertically. |
void |
resizeTo(JInternalFrame internalFrame,
Dimension size)
Resizes the
JInternalFrame to the given size. |
void |
resizeWidth(JInternalFrame internalFrame,
int width)
Resizes the
JInternalFrame horizontally. |
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible
doResizeHeight, doResizeWidth, isResizable, move, resize
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 JInternalFrameDriver(@Nonnull Robot robot)
JInternalFrameDriver
.robot
- the robot to use to simulate user input.@RunsInEDT public void moveToFront(@Nonnull JInternalFrame internalFrame)
JInternalFrame
to the front.internalFrame
- the target JInternalFrame
.@RunsInEDT public void moveToBack(@Nonnull JInternalFrame internalFrame)
JInternalFrame
to the back.internalFrame
- the target JInternalFrame
.@RunsInEDT public void maximize(@Nonnull JInternalFrame internalFrame)
JInternalFrame
, deconifying it first if it is iconified.internalFrame
- the target JInternalFrame
.IllegalStateException
- if the JInternalFrame
is not maximisable.IllegalStateException
- if the JInternalFrame
is not showing on the screen.ActionFailedException
- if the JInternalFrame
vetoes the action.@RunsInEDT public void normalize(@Nonnull JInternalFrame internalFrame)
JInternalFrame
, deconifying it first if it is iconified.internalFrame
- the target JInternalFrame
.IllegalStateException
- if the JInternalFrame
is not showing on the screen.ActionFailedException
- if the JInternalFrame
vetoes the action.@RunsInEDT public void iconify(@Nonnull JInternalFrame internalFrame)
JInternalFrame
.internalFrame
- the target JInternalFrame
.IllegalStateException
- if the JInternalFrame
is not showing on the screen.IllegalStateException
- if the JInternalFrame
is not iconifiable.ActionFailedException
- if the JInternalFrame
vetoes the action.@RunsInEDT public void deiconify(@Nonnull JInternalFrame internalFrame)
JInternalFrame
.internalFrame
- the target JInternalFrame
.IllegalStateException
- if the JInternalFrame
is not showing on the screen.ActionFailedException
- if the JInternalFrame
vetoes the action.@RunsInEDT public void resizeWidth(@Nonnull JInternalFrame internalFrame, int width)
JInternalFrame
horizontally.internalFrame
- the target JInternalFrame
.width
- the width that the JInternalFrame
should have after being resized.IllegalStateException
- if the JInternalFrame
is not showing on the screen.IllegalStateException
- if the JInternalFrame
is not resizable by the user.@RunsInEDT public void resizeHeight(@Nonnull JInternalFrame w, int height)
JInternalFrame
vertically.w
- the target JInternalFrame
.height
- the height that the JInternalFrame
should have after being resized.IllegalStateException
- if the JInternalFrame
is not showing on the screen.IllegalStateException
- if the JInternalFrame
is not resizable by the user.@RunsInEDT public void resizeTo(@Nonnull JInternalFrame internalFrame, @Nonnull Dimension size)
JInternalFrame
to the given size.internalFrame
- the target JInternalFrame
.size
- the size to resize the JInternalFrame
to.IllegalStateException
- if the JInternalFrame
is not showing on the screen.IllegalStateException
- if the JInternalFrame
is not resizable by the user.@RunsInEDT public void move(@Nonnull JInternalFrame internalFrame, @Nonnull Point where)
JInternalFrame
to the given location.internalFrame
- the target JInternalFrame
.where
- the location to move the JInternalFrame
to.IllegalStateException
- if the JInternalFrame
is not showing on the screen.@RunsInEDT public void close(@Nonnull JInternalFrame internalFrame)
JInternalFrame
.internalFrame
- the target JInternalFrame
.IllegalStateException
- if the JInternalFrame
is not showing on the screen.IllegalStateException
- if the JInternalFrame
is not closable.@RunsInEDT public void requireTitle(@Nonnull JInternalFrame frame, String expected)
JInternalFrame
is equal to the expected one.frame
- the target JInternalFrame
.expected
- the expected title.AssertionError
- if the title of the given JInternalFrame
is not equal to the expected one.Copyright © 2014–2020 AssertJ. All rights reserved.