public class WindowDriver extends ContainerDriver
Window
s:
org.fest.swing.fixture
in your tests.robot
Constructor and Description |
---|
WindowDriver(Robot robot)
Creates a new
WindowDriver . |
Modifier and Type | Method and Description |
---|---|
void |
close(Window w)
Closing the
. |
void |
moveTo(Window w,
Point where)
Moves the
to the given location. |
void |
moveToBack(Window w)
If the given
is visible, sends it to the back and may cause it to lose focus or
activation if it is the focused or active. |
void |
moveToFront(Window w)
If the given
is visible, brings it to the front and may make it the focused one. |
void |
resizeHeightTo(Window w,
int height)
Resizes the
vertically. |
void |
resizeTo(Window w,
Dimension size)
Resizes the
to the given size. |
void |
resizeWidthTo(Window w,
int width)
Resizes the
horizontally. |
void |
show(Window w)
Shows the
. |
void |
show(Window w,
Dimension size)
Shows the
, resized to the given size. |
move, resize, resizeHeight, resizeWidth
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing
public WindowDriver(Robot robot)
WindowDriver
.robot
- the robot to use to simulate user input.@RunsInEDT public void resizeWidthTo(Window w, int width)
Window
horizontally.w
- the target Window
.width
- the width that the Window
should have after being resized.ActionFailedException
- if the Window
is not enabled.ActionFailedException
- if the Window
is not resizable by the user.ActionFailedException
- if the Window
is not showing on the screen.@RunsInEDT public void resizeHeightTo(Window w, int height)
Window
vertically.w
- the target Window
.height
- the height that the Window
should have after being resized.ActionFailedException
- if the Window
is not enabled.ActionFailedException
- if the Window
is not resizable by the user.ActionFailedException
- if the Window
is not showing on the screen.@RunsInEDT public void resizeTo(Window w, Dimension size)
Window
to the given size.w
- the target Window
.size
- the size to resize the Window
to.ActionFailedException
- if the Window
is not enabled.ActionFailedException
- if the Window
is not resizable by the user.ActionFailedException
- if the Window
is not showing on the screen.public void moveTo(Window w, Point where)
Window
to the given location.w
- the target Window
.where
- the location to move the Window
to.ActionFailedException
- if the Window
is not enabled.ActionFailedException
- if the Window
is not movable by the user.ActionFailedException
- if the Window
is not showing on the screen.@RunsInEDT public void close(Window w)
Window
.w
- the target Window
.ActionFailedException
- if the Window
is not enabled.ActionFailedException
- if the Window
is not showing on the screen.@RunsInEDT public void show(Window w)
Window
.w
- the target Window
.@RunsInEDT public void show(Window w, Dimension size)
Window
, resized to the given size.w
- the target Window
.size
- the size to resize the Window
to.@RunsInEDT public void moveToFront(Window w)
Window
is visible, brings it to the front and may make it the focused one.w
- the target Window
.@RunsInEDT public void moveToBack(Window w)
Window
is visible, sends it to the back and may cause it to lose focus or
activation if it is the focused or active.w
- the target Window
.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.