|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.swing.fixture.ComponentFixture<JFileChooser>
org.fest.swing.fixture.JFileChooserFixture
public class JFileChooserFixture
Understands functional testing of s:
JFileChooser
| Field Summary |
|---|
| Fields inherited from class org.fest.swing.fixture.ComponentFixture |
|---|
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, target |
| Constructor Summary | |
|---|---|
JFileChooserFixture(Robot robot)
Creates a new . |
|
JFileChooserFixture(Robot robot,
JFileChooser target)
Creates a new . |
|
JFileChooserFixture(Robot robot,
String fileChooserName)
Creates a new . |
|
| Method Summary | |
|---|---|
void |
approve()
Simulates a user pressing the "Approve" button in this fixture's . |
JButtonFixture |
approveButton()
Finds the "Approve" button in this fixture's . |
void |
cancel()
Simulates a user pressing the "Cancel" button in this fixture's . |
JButtonFixture |
cancelButton()
Finds the "Cancel" button in this fixture's . |
JFileChooserFixture |
click()
Simulates a user clicking this fixture's . |
JFileChooserFixture |
click(MouseButton button)
Simulates a user clicking this fixture's . |
JFileChooserFixture |
click(MouseClickInfo mouseClickInfo)
Simulates a user clicking this fixture's . |
JFileChooserFixture |
doubleClick()
Simulates a user double-clicking this fixture's . |
protected void |
driver(JFileChooserDriver newDriver)
Sets the to be used by this fixture. |
JTextComponentFixture |
fileNameTextBox()
Returns a fixture that manages the field where the user can enter the name of the file to select in this fixture's . |
JFileChooserFixture |
focus()
Gives input focus to this fixture's . |
JFileChooserFixture |
pressAndReleaseKey(KeyPressInfo keyPressInfo)
Simulates a user pressing given key with the given modifiers on this fixture's . |
JFileChooserFixture |
pressAndReleaseKeys(int... keyCodes)
Simulates a user pressing and releasing the given keys on the managed by this
fixture. |
JFileChooserFixture |
pressKey(int keyCode)
Simulates a user pressing the given key on this fixture's . |
JFileChooserFixture |
releaseKey(int keyCode)
Simulates a user releasing the given key on this fixture's . |
JFileChooserFixture |
requireDisabled()
Asserts that this fixture's is disabled. |
JFileChooserFixture |
requireEnabled()
Asserts that this fixture's is enabled. |
JFileChooserFixture |
requireEnabled(Timeout timeout)
Asserts that this fixture's is enabled. |
JFileChooserFixture |
requireFocused()
Asserts that this fixture's has input focus. |
JFileChooserFixture |
requireNotVisible()
Asserts that this fixture's is not visible. |
JFileChooserFixture |
requireVisible()
Asserts that this fixture's is visible. |
JFileChooserFixture |
rightClick()
Simulates a user right-clicking this fixture's . |
JFileChooserFixture |
selectFile(File file)
Selects the given file in this fixture's . |
JFileChooserFixture |
selectFiles(File... files)
Selects the given files in this fixture's . |
JFileChooserFixture |
setCurrentDirectory(File dir)
Sets the current directory of this fixture's to the given one. |
| 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 JFileChooserFixture(Robot robot)
JFileChooserFixture.
robot - performs simulation of user events on a JFileChooser.
NullPointerException - if robot is null.
ComponentLookupException - if a matching JFileChooser could not be found.
ComponentLookupException - if more than one matching JFileChooser is found.
public JFileChooserFixture(Robot robot,
JFileChooser target)
JFileChooserFixture.
robot - performs simulation of user events on the given JFileChooser.target - the JFileChooser to be managed by this fixture.
NullPointerException - if robot is null.
NullPointerException - if target is null.
public JFileChooserFixture(Robot robot,
String fileChooserName)
JFileChooserFixture.
robot - performs simulation of user events on a JFileChooser.fileChooserName - the name of the JFileChooser to find using the given RobotFixture.
NullPointerException - if robot is null.
ComponentLookupException - if a matching JFileChooser could not be found.
ComponentLookupException - if more than one matching JFileChooser is found.| Method Detail |
|---|
protected final void driver(JFileChooserDriver newDriver)
JFileChooserDriver to be used by this fixture.
newDriver - the new JFileChooserDriver.
NullPointerException - if the given driver is null.public void approve()
JFileChooser.
ComponentLookupException - if the "Approve" button cannot be found.
IllegalStateException - if the "Approve" button is disabled.
IllegalStateException - if the "Approve" button is not showing on the screen.public JButtonFixture approveButton()
JFileChooser.
ComponentLookupException - if the "Approve" button cannot be found.public void cancel()
JFileChooser.
ComponentLookupException - if the "Cancel" button cannot be found.
IllegalStateException - if the "Cancel" button is disabled.
IllegalStateException - if the "Cancel" button is not showing on the screen.public JButtonFixture cancelButton()
JFileChooser.
ComponentLookupException - if the "Cancel" button cannot be found.public JTextComponentFixture fileNameTextBox()
JFileChooser.
ComponentLookupException - if a matching textToMatch field could not be found.public JFileChooserFixture selectFile(File file)
JFileChooser.
file - the file to select.
NullPointerException - if the given file is null.
IllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.
IllegalArgumentException - if this fixture's JFileChooser can select directories only and the
file to select is not a directory.
IllegalArgumentException - if this fixture's JFileChooser cannot select directories and the file
to select is a directory.public JFileChooserFixture selectFiles(File... files)
JFileChooser.
files - the files to select.
NullPointerException - if the given array of files is null.
IllegalArgumentException - if the given array of files is empty.
IllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.
IllegalStateException - if this fixture's JFileChooser does not support multiple selection and
there is more than one file to select.
IllegalArgumentException - if this fixture's JFileChooser can select directories only and any of
the files to select is not a directory.
IllegalArgumentException - if this fixture's JFileChooser cannot select directories and any of
the files to select is a directory.public JFileChooserFixture setCurrentDirectory(File dir)
JFileChooser to the given one.
dir - the directory to set as current.
IllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture click()
JFileChooser.
click in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture click(MouseButton button)
JFileChooser.
click in interface MouseInputSimulationFixturebutton - the button to click.
NullPointerException - if the given MouseButton is null.
IllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture click(MouseClickInfo mouseClickInfo)
JFileChooser.
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 JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture doubleClick()
JFileChooser.
doubleClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture rightClick()
JFileChooser.
rightClick in interface MouseInputSimulationFixtureIllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture focus()
JFileChooser.
focus in interface FocusableComponentFixtureIllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.public JFileChooserFixture pressAndReleaseKey(KeyPressInfo keyPressInfo)
JFileChooser.
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 JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.KeyPressInfopublic JFileChooserFixture pressAndReleaseKeys(int... keyCodes)
JFileChooser 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.
IllegalStateException - if this fixture's JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.KeyEventpublic JFileChooserFixture pressKey(int keyCode)
JFileChooser.
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 JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.KeyEventpublic JFileChooserFixture releaseKey(int keyCode)
JFileChooser.
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 JFileChooser is disabled.
IllegalStateException - if this fixture's JFileChooser is not showing on the screen.KeyEventpublic JFileChooserFixture requireFocused()
JFileChooser has input focus.
requireFocused in interface FocusableComponentFixtureAssertionError - if this fixture's JFileChooser does not have input focus.public JFileChooserFixture requireEnabled()
JFileChooser is enabled.
requireEnabled in interface StateVerificationFixtureAssertionError - if this fixture's JFileChooser is disabled.public JFileChooserFixture requireEnabled(Timeout timeout)
JFileChooser is enabled.
requireEnabled in interface StateVerificationFixturetimeout - the time this fixture will wait for the component to be enabled.
WaitTimedOutError - if this fixture's JFileChooser is never enabled.public JFileChooserFixture requireDisabled()
JFileChooser is disabled.
requireDisabled in interface StateVerificationFixtureAssertionError - if this fixture's JFileChooser is enabled.public JFileChooserFixture requireVisible()
JFileChooser is visible.
requireVisible in interface StateVerificationFixtureAssertionError - if this fixture's JFileChooser is not visible.public JFileChooserFixture requireNotVisible()
JFileChooser is not visible.
requireNotVisible in interface StateVerificationFixtureAssertionError - if this fixture's JFileChooser is visible.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||