T
- the type of window handled by this fixture.public abstract class WindowFixture<T extends Window> extends ContainerFixture<T> implements CommonComponentFixture, WindowLikeContainerFixture, JPopupMenuInvokerFixture
Window
s:
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target
DEFAULT_DIALOG_LOOKUP_TIMEOUT
Constructor and Description |
---|
WindowFixture(Class<? extends T> type)
Creates a new
. |
WindowFixture(Robot robot,
Class<? extends T> type)
Creates a new
. |
WindowFixture(Robot robot,
String name,
Class<? extends T> type)
Creates a new
. |
WindowFixture(Robot robot,
T target)
Creates a new
. |
WindowFixture(String name,
Class<? extends T> type)
Creates a new
. |
WindowFixture(T target)
Creates a new
. |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp()
Cleans up any used resources (keyboard, mouse, open windows and
) used by this
robot. |
protected abstract WindowFixture<T> |
show()
Shows this fixture's
. |
protected abstract WindowFixture<T> |
show(Dimension size)
Shows this fixture's
, resized to the given size. |
button, button, button, checkBox, checkBox, checkBox, comboBox, comboBox, comboBox, dialog, dialog, dialog, dialog, dialog, dialog, fileChooser, fileChooser, fileChooser, fileChooser, fileChooser, fileChooser, find, findByName, findByType, finder, label, label, label, list, list, list, menuItem, menuItem, menuItemWithPath, optionPane, optionPane, panel, panel, panel, progressBar, progressBar, progressBar, radioButton, radioButton, radioButton, scrollBar, scrollBar, scrollBar, scrollPane, scrollPane, scrollPane, slider, slider, slider, spinner, spinner, spinner, splitPane, splitPane, splitPane, tabbedPane, tabbedPane, tabbedPane, table, table, table, textBox, textBox, textBox, toggleButton, toggleButton, toggleButton, toolBar, toolBar, toolBar, tree, tree, tree, with
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNull
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
focus, requireFocused
pressAndReleaseKey, pressAndReleaseKeys, pressKey, releaseKey
click, click, click, doubleClick, rightClick
requireDisabled, requireEnabled, requireEnabled, requireNotVisible, requireVisible
close, moveTo, moveToBack, moveToFront, requireSize, resizeHeightTo, resizeTo, resizeWidthTo
showPopupMenu, showPopupMenuAt
public WindowFixture(Class<? extends T> type)
WindowFixture
. This constructor creates a new Robot
containing the current AWT hierarchy.type
- the type of Window
to find using the created Robot
.NullPointerException
- if the given Window
type is null
.ComponentLookupException
- if a Window
having a matching type could not be found.ComponentLookupException
- if more than one Window
having a matching type is found.BasicRobot.robotWithCurrentAwtHierarchy()
public WindowFixture(Robot robot, Class<? extends T> type)
WindowFixture
.robot
- performs simulation of user events on a Window
.type
- the type of Window
to find using the given Robot
.NullPointerException
- if the given robot is null
.NullPointerException
- if the given Window
type is null
.ComponentLookupException
- if a Window
having a matching type could not be found.ComponentLookupException
- if more than one Window
having a matching type is found.public WindowFixture(String name, Class<? extends T> type)
WindowFixture
. This constructor creates a new
Robot
containing the current AWT hierarchy.name
- the name of the Window
to find.type
- the type of Window
to find using the created Robot
.NullPointerException
- if the given Window
type is null
.ComponentLookupException
- if a Window
having a matching name could not be found.ComponentLookupException
- if more than one Window
having a matching name is found.BasicRobot.robotWithCurrentAwtHierarchy()
public WindowFixture(Robot robot, String name, Class<? extends T> type)
WindowFixture
.robot
- performs simulation of user events on a Window
.name
- the name of the Window
to find using the given Robot
.type
- the type of Window
to find using the given Robot
.NullPointerException
- if the given robot is null
.NullPointerException
- if the given Window
type is null
.ComponentLookupException
- if a Window
having a matching name could not be found.ComponentLookupException
- if more than one Window
having a matching name is found.public WindowFixture(T target)
WindowFixture
. This constructor creates a new Robot
containing the current AWT hierarchy.target
- the Window
to be managed by this fixture.NullPointerException
- if the given target Window
is null
.public WindowFixture(Robot robot, T target)
WindowFixture
.robot
- performs simulation of user events on the given Window
.target
- the Window
to be managed by this fixture.NullPointerException
- if the given robot is null
.NullPointerException
- if the given target Window
is null
.protected abstract WindowFixture<T> show()
Window
.protected abstract WindowFixture<T> show(Dimension size)
Window
, resized to the given size.size
- the size to resize this fixture's Window
to.public final void cleanUp()
ScreenLock
) used by this
robot.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.