|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.fixture.ComponentFixture<T>
org.fest.swing.fixture.ContainerFixture<JPanel>
org.fest.swing.fixture.JPanelFixture
public class JPanelFixture
Understands functional testing of s:
JPanel
| Field Summary |
|---|
| Fields inherited from class org.fest.swing.fixture.ComponentFixture |
|---|
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target |
| Fields inherited from interface org.fest.swing.fixture.ComponentContainerFixture |
|---|
DEFAULT_DIALOG_LOOKUP_TIMEOUT |
| Constructor Summary | |
|---|---|
JPanelFixture(Robot robot,
JPanel target)
Creates a new . |
|
JPanelFixture(Robot robot,
String panelName)
Creates a new . |
|
| Method Summary | |
|---|---|
JPanelFixture |
click()
Simulates a user clicking this fixture's . |
JPanelFixture |
click(MouseButton button)
Simulates a user clicking this fixture's . |
JPanelFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's . |
Object |
clientProperty(Object key)
Returns the client property stored in this fixture's , under the given key. |
JPanelFixture |
doubleClick()
Simulates a user double-clicking this fixture's . |
protected void |
driver(JComponentDriver newDriver)
Sets the to be used by this fixture. |
JPanelFixture |
focus()
Gives input focus to this fixture's . |
JPanelFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's . |
JPanelFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on the managed by this
fixture. |
JPanelFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's . |
JPanelFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's . |
JPanelFixture |
requireDisabled()
Asserts that this fixture's is disabled. |
JPanelFixture |
requireEnabled()
Asserts that this fixture's is enabled. |
JPanelFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's is enabled. |
JPanelFixture |
requireFocused()
Asserts that this fixture's has input focus. |
JPanelFixture |
requireNotVisible()
Asserts that this fixture's is not visible. |
JPanelFixture |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's matches the given regular expression
pattern. |
JPanelFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's matches the given value. |
JPanelFixture |
requireVisible()
Asserts that this fixture's is visible. |
JPanelFixture |
rightClick()
Simulates a user right-clicking this fixture's . |
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. |
| Methods inherited from class org.fest.swing.fixture.ContainerFixture |
|---|
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 |
| Methods inherited from class org.fest.swing.fixture.ComponentFixture |
|---|
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JPanelFixture(Robot robot,
String panelName)
JPanelFixture.
robot - performs simulation of user events on a JPanel.panelName - the name of the JPanel to find using the given Robot.
NullPointerException - if robot is null.
ComponentLookupException - if a matching JPanel could not be found.
ComponentLookupException - if more than one matching JPanel is found.
public JPanelFixture(Robot robot,
JPanel target)
JPanelFixture.
robot - performs simulation of user events on the given JPanel.target - the JPanel to be managed by this fixture.
NullPointerException - if robot is null.
NullPointerException - if target is null.| Method Detail |
|---|
protected final void driver(JComponentDriver newDriver)
JComponentDriver to be used by this fixture.
newDriver - the new JComponentDriver.
NullPointerException - if the given driver is null.public JPanelFixture click()
JPanel.
click in interface MouseInputSimulationFixturepublic JPanelFixture click(MouseButton button)
JPanel.
click in interface MouseInputSimulationFixturebutton - the button to click.
public JPanelFixture click(MouseClickInfo mouseClickInfo)
JPanel.
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 JPanelFixture rightClick()
JPanel.
rightClick in interface MouseInputSimulationFixturepublic JPanelFixture doubleClick()
JPanel.
doubleClick in interface MouseInputSimulationFixturepublic JPanelFixture focus()
JPanel.
focus in interface FocusableComponentFixturepublic JPanelFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JPanel.
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 JPanelFixture pressAndReleaseKeys(int... keyCodes)
JPanel managed by this
fixture.
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 JPanelFixture pressKey(int keyCode)
JPanel.
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 JPanelFixture releaseKey(int keyCode)
JPanel.
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 JPanelFixture requireFocused()
JPanel has input focus.
requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JPanel does not have input focus.public JPanelFixture requireEnabled()
JPanel is enabled.
requireEnabled in interface StateVerificationFixtureAssertionError - if this fixture's JPanel is disabled.public JPanelFixture requireEnabled(Timeout timeout)
JPanel is enabled.
requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.
WaitTimedOutError - if this fixture's JPanel is never enabled.public JPanelFixture requireDisabled()
JPanel is disabled.
requireDisabled in interface StateVerificationFixtureAssertionError - if this fixture's JPanel is enabled.public JPanelFixture requireVisible()
JPanel is visible.
requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JPanel is not visible.public JPanelFixture requireNotVisible()
JPanel is not visible.
requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JPanel is visible.public JPanelFixture requireToolTip(String expected)
JPanel matches the given value.
requireToolTip in interface ToolTipDisplayFixtureexpected - the given value. It can be a regular expression.
AssertionError - if the toolTip in this fixture's JPanel does not match the given value.public JPanelFixture requireToolTip(Pattern pattern)
JPanel matches the given regular expression
pattern.
requireToolTip in interface ToolTipDisplayFixturepattern - the regular expression pattern to match.
NullPointerException - if the given regular expression pattern is null.
AssertionError - if the toolTip in this fixture's JPanel does not match the given regular
expression.public Object clientProperty(Object key)
JPanel, under the given key.
clientProperty in interface ClientPropertyStorageFixturekey - the key to use to retrieve the client property.
null if the property was
not found.
NullPointerException - if the given key is null.public JPopupMenuFixture showPopupMenu()
JPanel as the invoker of the pop-up menu.
showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JPanel is disabled.
IllegalStateException - if this fixture's JPanel is not showing on the screen.
ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
JPanel 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 JPanel is disabled.
IllegalStateException - if this fixture's JPanel is not showing on the screen.
ComponentLookupException - if a pop-up menu cannot be found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||