public class FrameFixture extends WindowFixture<Frame> implements FrameLikeFixture
Frames:
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, targetDEFAULT_DIALOG_LOOKUP_TIMEOUT| Constructor and Description |
|---|
FrameFixture(Frame target)
Creates a new
. |
FrameFixture(Robot robot,
Frame target)
Creates a new
. |
FrameFixture(Robot robot,
String name)
Creates a new
. |
FrameFixture(String name)
Creates a new
. |
| Modifier and Type | Method and Description |
|---|---|
FrameFixture |
click()
Simulates a user clicking this fixture's
. |
FrameFixture |
click(MouseButton button)
Simulates a user clicking this fixture's
. |
FrameFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's
. |
void |
close()
Simulates a user closing this fixture's
. |
FrameFixture |
deiconify()
Simulates a user deiconifying this fixture's
. |
FrameFixture |
doubleClick()
Simulates a user double-clicking this fixture's
. |
protected void |
driver(FrameDriver newDriver)
Sets the
to be used by this fixture. |
FrameFixture |
focus()
Gives input focus to this fixture's
. |
FrameFixture |
iconify()
Simulates a user iconifying this fixture's
. |
FrameFixture |
maximize()
Simulates a user maximizing this fixture's
. |
FrameFixture |
moveTo(Point p)
Simulates a user moving this fixture's
to the given point. |
FrameFixture |
moveToBack()
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. |
FrameFixture |
moveToFront()
If fixture's
is visible, brings it to the front and may make it the focused one. |
FrameFixture |
normalize()
Simulates a user normalizing this fixture's
. |
FrameFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's
. |
FrameFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on this fixture's
. |
FrameFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's
. |
FrameFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's
. |
FrameFixture |
requireDisabled()
Asserts that this fixture's
is disabled. |
FrameFixture |
requireEnabled()
Asserts that this fixture's
is enabled. |
FrameFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's
is enabled. |
FrameFixture |
requireFocused()
Asserts that this fixture's
has input focus. |
FrameFixture |
requireNotVisible()
Asserts that this fixture's
is not visible. |
FrameFixture |
requireSize(Dimension size)
Asserts that the size of this fixture's
is equal to given one. |
FrameFixture |
requireVisible()
Asserts that this fixture's
is visible. |
FrameFixture |
resizeHeightTo(int height)
Simulates a user resizing vertically this fixture's
. |
FrameFixture |
resizeTo(Dimension size)
Simulates a user resizing this fixture's
. |
FrameFixture |
resizeWidthTo(int width)
Simulates a user resizing horizontally this fixture's
. |
FrameFixture |
rightClick()
Simulates a user right-clicking this fixture's
. |
FrameFixture |
show()
Shows this fixture's
. |
FrameFixture |
show(Dimension size)
Shows this fixture's
, resized to the given size. |
JPopupMenuFixture |
showPopupMenu()
Shows a pop-up menu using this fixture's
as the invoker of the pop-up menu. |
JPopupMenuFixture |
showPopupMenuAt(Point p)
Shows a pop-up menu at the given point using this fixture's
as the invoker of the
pop-up menu. |
cleanUpbutton, 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, withbackground, component, font, foreground, requireShowing, targetCastedTo, validateNotNullpublic FrameFixture(Frame target)
FrameFixture. This constructor creates a new Robot
containing the current AWT hierarchy.target - the Frame to be managed by this fixture.NullPointerException - if the given frame is null.BasicRobot.robotWithCurrentAwtHierarchy()public FrameFixture(Robot robot, Frame target)
FrameFixture.robot - performs user events on the given window and verifies expected output.target - the Frame to be managed by this fixture.NullPointerException - if the given robot is null.NullPointerException - if the given frame is null.public FrameFixture(Robot robot, String name)
FrameFixture.robot - performs user events on the given window and verifies expected output.name - the name of the Frame to find using the given Robot.NullPointerException - if the given robot is null.ComponentLookupException - if a Frame having a matching name could not be found.ComponentLookupException - if more than one Frame having a matching name is found.public FrameFixture(String name)
FrameFixture. This constructor creates a new Robot
containing the current AWT hierarchy.name - the name of the Frame to find.ComponentLookupException - if a Frame having a matching name could not be found.ComponentLookupException - if more than one Frame having a matching name is found.protected final void driver(FrameDriver newDriver)
FrameDriver to be used by this fixture.newDriver - the new FrameDriver.NullPointerException - if the given driver is null.public FrameFixture click()
Frame.click in interface MouseInputSimulationFixturepublic FrameFixture click(MouseButton button)
Frame.click in interface MouseInputSimulationFixturebutton - the button to click.public FrameFixture click(MouseClickInfo mouseClickInfo)
Frame.click in interface MouseInputSimulationFixturemouseClickInfo - specifies the button to click and the times the button should be clicked.NullPointerException - if the given MouseClickInfo is null.public FrameFixture doubleClick()
Frame.doubleClick in interface MouseInputSimulationFixturepublic FrameFixture rightClick()
Frame.rightClick in interface MouseInputSimulationFixturepublic FrameFixture iconify()
Frame.iconify in interface FrameLikeFixturepublic FrameFixture deiconify()
Frame.deiconify in interface FrameLikeFixturepublic FrameFixture maximize()
Frame.maximize in interface FrameLikeFixtureActionFailedException - if the operating system does not support maximizing frames.public FrameFixture normalize()
Frame.normalize in interface FrameLikeFixturepublic FrameFixture focus()
Frame.focus in interface FocusableComponentFixturepublic FrameFixture moveTo(Point p)
Frame to the given point.moveTo in interface WindowLikeContainerFixturep - the point to move this fixture's Frame to.public FrameFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
Frame.
Modifiers is a mask from the available InputEvent masks.pressAndReleaseKey in interface KeyboardInputSimulationFixturekeyPressInfo - specifies the key and modifiers to press.NullPointerException - if the given KeyPressInfo is null.IllegalArgumentException - if the given code is not a valid key code.KeyPressInfopublic FrameFixture pressAndReleaseKeys(int... keyCodes)
Frame.pressAndReleaseKeys in interface KeyboardInputSimulationFixturekeyCodes - one or more codes of the keys to press.NullPointerException - if the given array of codes is null.IllegalArgumentException - if any of the given code is not a valid key code.KeyEventpublic FrameFixture pressKey(int keyCode)
Frame.pressKey in interface KeyboardInputSimulationFixturekeyCode - the code of the key to press.IllegalArgumentException - if any of the given code is not a valid key code.KeyEventpublic FrameFixture releaseKey(int keyCode)
Frame.releaseKey in interface KeyboardInputSimulationFixturekeyCode - the code of the key to release.IllegalArgumentException - if any of the given code is not a valid key code.KeyEventpublic FrameFixture requireFocused()
Frame has input focus.requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's Frame does not have input focus.public FrameFixture requireDisabled()
Frame is disabled.requireDisabled in interface StateVerificationFixtureAssertionError - if this fixture's Frame is enabled.public FrameFixture requireEnabled()
Frame is enabled.requireEnabled in interface StateVerificationFixtureAssertionError - if this fixture's Frame is disabled.public FrameFixture requireEnabled(Timeout timeout)
Frame is enabled.requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.WaitTimedOutError - if this fixture's Frame is never enabled.public FrameFixture requireNotVisible()
Frame is not visible.requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's Frame is visible.public FrameFixture requireSize(Dimension size)
Frame is equal to given one.requireSize in interface WindowLikeContainerFixturesize - the given size to match.AssertionError - if the size of this fixture's Frame is not equal to the given size.public FrameFixture requireVisible()
Frame is visible.requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's Frame is not visible.public FrameFixture resizeHeightTo(int height)
Frame.resizeHeightTo in interface WindowLikeContainerFixtureheight - the height that this fixture's Frame should have after being resized.public FrameFixture resizeTo(Dimension size)
Frame.resizeTo in interface WindowLikeContainerFixturesize - the size that the target window should have after being resized.public FrameFixture resizeWidthTo(int width)
Frame.resizeWidthTo in interface WindowLikeContainerFixturewidth - the width that this fixture's Frame should have after being resized.public FrameFixture show()
Frame.show in class WindowFixture<Frame>public FrameFixture show(Dimension size)
Frame, resized to the given size.show in class WindowFixture<Frame>size - the size to resize this fixture's Frame to.public FrameFixture moveToFront()
Frame is visible, brings it to the front and may make it the focused one.moveToFront in interface WindowLikeContainerFixturepublic FrameFixture moveToBack()
Frame is visible, sends it to the back and may cause it to lose focus or
activation if it is the focused or active.moveToBack in interface WindowLikeContainerFixturepublic JPopupMenuFixture showPopupMenu()
Frame as the invoker of the pop-up menu.showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's Frame is disabled.IllegalStateException - if this fixture's Frame is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
Frame as the invoker of the
pop-up menu.showPopupMenuAt in interface JPopupMenuInvokerFixturep - the given point where to show the pop-up menu.IllegalStateException - if this fixture's Frame is disabled.IllegalStateException - if this fixture's Frame is not showing on the screen.ComponentLookupException - if a pop-up menu cannot be found.public void close()
Frame.close in interface WindowLikeContainerFixtureCopyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.