|
||||||||||
| 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<JToolBar>
org.fest.swing.fixture.JToolBarFixture
public class JToolBarFixture
Understands functional testing of s:
JToolBar
| Nested Class Summary | |
|---|---|
static class |
JToolBarFixture.UnfloatConstraint
Understands constraints used to unfloat a floating . |
| 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 | |
|---|---|
JToolBarFixture(Robot robot,
JToolBar target)
Creates a new . |
|
JToolBarFixture(Robot robot,
String toolbarName)
Creates a new . |
|
| Method Summary | |
|---|---|
JToolBarFixture |
click()
Simulates a user clicking this fixture's . |
JToolBarFixture |
click(MouseButton button)
Simulates a user clicking this fixture's . |
JToolBarFixture |
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. |
JToolBarFixture |
doubleClick()
Simulates a user double-clicking this fixture's . |
protected void |
driver(JToolBarDriver newDriver)
Sets the to be used by this fixture. |
JToolBarFixture |
floatTo(Point point)
Simulates a user dragging this fixture's to the given location, causing it to float. |
JToolBarFixture |
focus()
Gives input focus to this fixture's . |
JToolBarFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's . |
JToolBarFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys in this fixture's . |
JToolBarFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's . |
JToolBarFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's . |
JToolBarFixture |
requireDisabled()
Asserts that this fixture's is disabled. |
JToolBarFixture |
requireEnabled()
Asserts that this fixture's is enabled. |
JToolBarFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's is enabled. |
JToolBarFixture |
requireFocused()
Asserts that this fixture's has input focus. |
JToolBarFixture |
requireNotVisible()
Asserts that this fixture's is not visible. |
JToolBarFixture |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's matches the given regular expression
pattern. |
JToolBarFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's matches the given value. |
JToolBarFixture |
requireVisible()
Asserts that this fixture's is visible. |
JToolBarFixture |
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. |
JToolBarFixture |
unfloat()
Simulates a user unfloating this fixture's . |
JToolBarFixture |
unfloat(JToolBarFixture.UnfloatConstraint constraint)
Simulates a user dropping this fixture's JToolBar to the requested constraint position. |
| 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 JToolBarFixture(Robot robot,
JToolBar target)
JToolBarFixture.
robot - performs simulation of user events on the given JToolBar.target - the JToolBar to be managed by this fixture.
NullPointerException - if robot is null.
NullPointerException - if target is null.
public JToolBarFixture(Robot robot,
String toolbarName)
JToolBarFixture.
robot - performs simulation of user events on a JToolBar.toolbarName - the name of the JToolBar to find using the given Robot.
NullPointerException - if robot is null.
ComponentLookupException - if a matching JToolBar could not be found.
ComponentLookupException - if more than one matching JToolBar is found.| Method Detail |
|---|
protected final void driver(JToolBarDriver newDriver)
JToolBarDriver to be used by this fixture.
newDriver - the new JToolBarDriver.
NullPointerException - if the given driver is null.public JToolBarFixture floatTo(Point point)
JToolBar to the given location, causing it to float.
point - the point where the JToolBar will be floating to.
ActionFailedException - if the JToolBar is not floatable.
ActionFailedException - if the JToolBar cannot be dragged.public JToolBarFixture unfloat()
JToolBar.
ActionFailedException - if the dock container cannot be found.public JToolBarFixture unfloat(JToolBarFixture.UnfloatConstraint constraint)
JToolBar to the requested constraint position.
constraint - the constraint position.
ActionFailedException - if the dock container cannot be found.public JToolBarFixture click()
JToolBar.
click in interface MouseInputSimulationFixturepublic JToolBarFixture click(MouseButton button)
JToolBar.
click in interface MouseInputSimulationFixturebutton - the button to click.
public JToolBarFixture click(MouseClickInfo mouseClickInfo)
JToolBar.
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 JToolBarFixture doubleClick()
JToolBar.
doubleClick in interface MouseInputSimulationFixturepublic JToolBarFixture rightClick()
JToolBar.
rightClick in interface MouseInputSimulationFixturepublic JToolBarFixture focus()
JToolBar.
focus in interface FocusableComponentFixturepublic JToolBarFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JToolBar.
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 JToolBarFixture pressAndReleaseKeys(int... keyCodes)
JToolBar. This method
does not affect the current focus.
pressAndReleaseKeys in interface KeyboardInputSimulationFixturekeyCodes - the 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 JToolBarFixture pressKey(int keyCode)
JToolBar.
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 JToolBarFixture releaseKey(int keyCode)
JToolBar.
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 JToolBarFixture requireFocused()
JToolBar has input focus.
requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JToolBar does not have input focus.public JToolBarFixture requireEnabled()
JToolBar is enabled.
requireEnabled in interface StateVerificationFixtureAssertionError - if this fixture's JToolBar is disabled.public JToolBarFixture requireEnabled(Timeout timeout)
JToolBar is enabled.
requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.
WaitTimedOutError - if this fixture's JToolBar is never enabled.public JToolBarFixture requireDisabled()
JToolBar is disabled.
requireDisabled in interface StateVerificationFixtureAssertionError - if this fixture's JToolBar is enabled.public JToolBarFixture requireVisible()
JToolBar is visible.
requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JToolBar is not visible.public JToolBarFixture requireNotVisible()
JToolBar is not visible.
requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JToolBar is visible.public JToolBarFixture requireToolTip(String expected)
JToolBar 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 JToolBar does not match the given value.public JToolBarFixture requireToolTip(Pattern pattern)
JToolBar 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 JToolBar does not match the given regular
expression.public Object clientProperty(Object key)
JToolBarFixture, 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()
JToolBar as the invoker of the pop-up menu.
showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JToolBar is disabled.
IllegalStateException - if this fixture's JToolBar is not showing on the screen.
ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
JToolBar 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 JToolBar is disabled.
IllegalStateException - if this fixture's JToolBar 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 | |||||||||