|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.fixture.ComponentFixture<JRadioButton>
org.fest.swing.fixture.JRadioButtonFixture
public class JRadioButtonFixture
Understands functional testing of s:
JRadioButton
| Field Summary |
|---|
| Fields inherited from class org.fest.swing.fixture.ComponentFixture |
|---|
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target |
| Constructor Summary | |
|---|---|
JRadioButtonFixture(Robot robot,
JRadioButton target)
Creates a new . |
|
JRadioButtonFixture(Robot robot,
String buttonName)
Creates a new . |
|
| Method Summary | |
|---|---|
JRadioButtonFixture |
check()
Checks (or selects) this fixture's only it is not already checked. |
JRadioButtonFixture |
click()
Simulates a user clicking this fixture's . |
JRadioButtonFixture |
click(MouseButton button)
Simulates a user clicking this fixture's . |
JRadioButtonFixture |
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. |
JRadioButtonFixture |
doubleClick()
Simulates a user double-clicking this fixture's . |
protected void |
driver(AbstractButtonDriver newDriver)
Sets the to be used by this fixture. |
JRadioButtonFixture |
focus()
Gives input focus to this fixture's . |
JRadioButtonFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's . |
JRadioButtonFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on this fixture's . |
JRadioButtonFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's . |
JRadioButtonFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's . |
JRadioButtonFixture |
requireDisabled()
Asserts that this fixture's is disabled. |
JRadioButtonFixture |
requireEnabled()
Asserts that this fixture's is enabled. |
JRadioButtonFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's is enabled. |
JRadioButtonFixture |
requireFocused()
Asserts that this fixture's has input focus. |
JRadioButtonFixture |
requireNotSelected()
Verifies that this fixture's is not selected. |
JRadioButtonFixture |
requireNotVisible()
Asserts that this fixture's is not visible. |
JRadioButtonFixture |
requireSelected()
Verifies that this fixture's is selected. |
JRadioButtonFixture |
requireText(Pattern pattern)
Asserts that the text of this fixture's matches the given regular expression
pattern. |
JRadioButtonFixture |
requireText(String expected)
Asserts that the text of this fixture's matches the specified value. |
JRadioButtonFixture |
requireToolTip(Pattern pattern)
Asserts that the toolTip in this fixture's matches the given regular expression
pattern. |
JRadioButtonFixture |
requireToolTip(String expected)
Asserts that the toolTip in this fixture's matches the given value. |
JRadioButtonFixture |
requireVisible()
Asserts that this fixture's is visible. |
JRadioButtonFixture |
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. |
String |
text()
Returns the text of this fixture's . |
JRadioButtonFixture |
uncheck()
Unchecks this fixture's only if it is checked. |
| 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 JRadioButtonFixture(Robot robot,
JRadioButton target)
JRadioButtonFixture.
robot - performs simulation of user events on the given JRadioButton.target - the JRadioButton to be managed by this fixture.
NullPointerException - if robot is null.
NullPointerException - if target is null.
public JRadioButtonFixture(Robot robot,
String buttonName)
JRadioButtonFixture.
robot - performs simulation of user events on a JRadioButton.buttonName - the name of the JRadioButton to find using the given Robot.
NullPointerException - if robot is null.
ComponentLookupException - if a matching JRadioButton could not be found.
ComponentLookupException - if more than one matching JRadioButton is found.| Method Detail |
|---|
protected final void driver(AbstractButtonDriver newDriver)
AbstractButtonDriver to be used by this fixture.
newDriver - the new AbstractButtonDriver.
NullPointerException - if the given driver is null.public String text()
JRadioButton.
text in interface TextDisplayFixtureJRadioButton.public JRadioButtonFixture check()
JRadioButton only it is not already checked.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture uncheck()
JRadioButton only if it is checked.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture click()
JRadioButton.
click in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture click(MouseButton button)
JRadioButton.
click in interface MouseInputSimulationFixturebutton - the button to click.
NullPointerException - if the given MouseButton is null.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture click(MouseClickInfo mouseClickInfo)
JRadioButton.
click in interface MouseInputSimulationFixturemouseClickInfo - specifies the button to click and the times the button should be clicked.
NullPointerException - if the given MouseClickInfo is null.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture doubleClick()
JRadioButton.
doubleClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture rightClick()
JRadioButton.
rightClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture focus()
JRadioButton.
focus in interface FocusableComponentFixtureIllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.public JRadioButtonFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JRadioButton.
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.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.KeyPressInfopublic JRadioButtonFixture pressAndReleaseKeys(int... keyCodes)
JRadioButton.
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.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.KeyEventpublic JRadioButtonFixture pressKey(int keyCode)
JRadioButton.
pressKey in interface KeyboardInputSimulationFixturekeyCode - the code of the key to press.
IllegalArgumentException - if any of the given code is not a valid key code.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.KeyEventpublic JRadioButtonFixture releaseKey(int keyCode)
JRadioButton.
releaseKey in interface KeyboardInputSimulationFixturekeyCode - the code of the key to release.
IllegalArgumentException - if any of the given code is not a valid key code.
IllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.KeyEventpublic JRadioButtonFixture requireFocused()
JRadioButton has input focus.
requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JRadioButton does not have input focus.public JRadioButtonFixture requireEnabled()
JRadioButton is enabled.
requireEnabled in interface StateVerificationFixtureAssertionError - is this fixture's JRadioButton is disabled.public JRadioButtonFixture requireEnabled(Timeout timeout)
JRadioButton is enabled.
requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.
WaitTimedOutError - if this fixture's JRadioButton is never enabled.public JRadioButtonFixture requireDisabled()
JRadioButton is disabled.
requireDisabled in interface StateVerificationFixtureAssertionError - is this fixture's JRadioButton is enabled.public JRadioButtonFixture requireSelected()
JRadioButton is selected.
requireSelected in interface TwoStateButtonFixtureAssertionError - if this fixture's JRadioButton is not selected.public JRadioButtonFixture requireNotSelected()
JRadioButton is not selected.
requireNotSelected in interface TwoStateButtonFixtureAssertionError - if this fixture's JRadioButton is selected.public JRadioButtonFixture requireVisible()
JRadioButton is visible.
requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JRadioButton is not visible.public JRadioButtonFixture requireNotVisible()
JRadioButton is not visible.
requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JRadioButton is visible.public JRadioButtonFixture requireText(String expected)
JRadioButton matches the specified value.
requireText in interface TextDisplayFixtureexpected - the text to match. It can be a regular expression.
AssertionError - if the text of the target JRadioButton does not match the given one.public JRadioButtonFixture requireText(Pattern pattern)
JRadioButton matches the given regular expression
pattern.
requireText in interface TextDisplayFixturepattern - the regular expression pattern to match.
NullPointerException - if the given regular expression pattern is null.
AssertionError - if the text of the target JRadioButton does not match the given regular
expression pattern.public JRadioButtonFixture requireToolTip(String expected)
JRadioButton 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 JRadioButton does not match the given value.public JRadioButtonFixture requireToolTip(Pattern pattern)
JRadioButton 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 JRadioButton does not match the given regular
expression.public Object clientProperty(Object key)
JRadioButton, 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()
JRadioButton as the invoker of the pop-up menu.
showPopupMenu in interface JPopupMenuInvokerFixtureIllegalStateException - if this fixture's JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton is not showing on the screen.
ComponentLookupException - if a pop-up menu cannot be found.public JPopupMenuFixture showPopupMenuAt(Point p)
JRadioButton 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 JRadioButton is disabled.
IllegalStateException - if this fixture's JRadioButton 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 | |||||||||