|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fest.swing.driver.ComponentDriver
org.fest.swing.driver.ContainerDriver
org.fest.swing.driver.JComponentDriver
org.fest.swing.driver.JFileChooserDriver
public class JFileChooserDriver
Understands functional testing of
s:
JFileChooser
org.fest.swing.fixture
in your tests.
Field Summary |
---|
Fields inherited from class org.fest.swing.driver.ComponentDriver |
---|
robot |
Constructor Summary | |
---|---|
JFileChooserDriver(Robot robot)
Creates a new JFileChooserDriver . |
Method Summary | |
---|---|
JButton |
approveButton(JFileChooser fileChooser)
Finds the "Approve" button in the given . |
JButton |
cancelButton(JFileChooser fileChooser)
Finds the "Cancel" button in the given . |
void |
clickApproveButton(JFileChooser fileChooser)
Finds and clicks the "Approve" button in the given . |
void |
clickCancelButton(JFileChooser fileChooser)
Finds and clicks the "Cancel" button in the given . |
JTextField |
fileNameTextBox(JFileChooser fileChooser)
Returns the text field where the user can enter the name of the file to select. |
void |
selectFile(JFileChooser fileChooser,
File file)
Selects the given file in the . |
void |
selectFiles(JFileChooser fileChooser,
File[] files)
Selects the given file in the . |
void |
setCurrentDirectory(JFileChooser fileChooser,
File dir)
Sets the current directory in the to the given one. |
Methods inherited from class org.fest.swing.driver.JComponentDriver |
---|
clientProperty, invokeAction, isVisible, isVisible, requireToolTip, requireToolTip, scrollToVisible |
Methods inherited from class org.fest.swing.driver.ContainerDriver |
---|
move, resize, resizeHeight, resizeWidth |
Methods inherited from class org.fest.swing.driver.ComponentDriver |
---|
assertIsEnabledAndShowing, click, click, click, click, click, doubleClick, drag, dragOver, drop, focus, focusAndWaitForFocusGain, invokePopupMenu, invokePopupMenu, moveMouseIgnoringAnyError, moveMouseIgnoringAnyError, performAccessibleActionOf, pressAndReleaseKey, pressAndReleaseKey, pressAndReleaseKeys, pressKey, propertyName, releaseKey, requireDisabled, requireEnabled, requireEnabled, requireFocused, requireNotVisible, requireSize, requireVisible, rightClick, settings, waitForShowing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JFileChooserDriver(Robot robot)
JFileChooserDriver
.
robot
- the robot to use to simulate user input.Method Detail |
---|
@RunsInEDT public void selectFile(JFileChooser fileChooser, File file)
JFileChooser
.
fileChooser
- the target JFileChooser
.file
- the file to select.
NullPointerException
- if the given file is null
.
IllegalStateException
- if the JFileChooser
is disabled.
IllegalStateException
- if the JFileChooser
is not showing on the screen.
IllegalArgumentException
- if the JFileChooser
can select directories only and the file to
select is not a directory.
IllegalArgumentException
- if the JFileChooser
cannot select directories and the file to select
is a directory.public void selectFiles(JFileChooser fileChooser, File[] files)
JFileChooser
.
fileChooser
- the target 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.@RunsInEDT public void setCurrentDirectory(JFileChooser fileChooser, File dir)
JFileChooser
to the given one.
fileChooser
- the target JFileChooser
.dir
- the directory to set as current.
IllegalStateException
- if the JFileChooser
is disabled.
IllegalStateException
- if the JFileChooser
is not showing on the screen.@RunsInEDT public JTextField fileNameTextBox(JFileChooser fileChooser)
fileChooser
- the target JFileChooser
.
ComponentLookupException
- if a matching text field could not be found.@RunsInEDT public void clickCancelButton(JFileChooser fileChooser)
JFileChooser
.
fileChooser
- the target 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.@RunsInEDT public JButton cancelButton(JFileChooser fileChooser)
JFileChooser
.
fileChooser
- the target JFileChooser
.
ComponentLookupException
- if the "Cancel" button cannot be found.@RunsInEDT public void clickApproveButton(JFileChooser fileChooser)
JFileChooser
.
fileChooser
- the target 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.@RunsInEDT public JButton approveButton(JFileChooser fileChooser)
JFileChooser
.
fileChooser
- the target JFileChooser
.
ComponentLookupException
- if the "Approve" button cannot be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |