コード例 #1
0
 /**
  * Simulates a user pressing the given key on this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @param keyCode the code of the key to press.
  * @return this fixture.
  * @throws IllegalArgumentException if any of the given code is not a valid key code.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @see java.awt.event.KeyEvent
  */
 public VFSJFileChooserFixture<FileObject> pressKey(int keyCode) {
   driver.pressKey(target, keyCode);
   return this;
 }
コード例 #2
0
 /**
  * Simulates a user pressing given key with the given modifiers on this fixture's <code>
  * {@link VFSJFileChooser}</code>. Modifiers is a mask from the available <code>
  * {@link java.awt.event.InputEvent}</code> masks.
  *
  * @param keyPressInfo specifies the key and modifiers to press.
  * @return this fixture.
  * @throws NullPointerException if the given <code>KeyPressInfo</code> is <code>null</code>.
  * @throws IllegalArgumentException if the given code is not a valid key code.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @see KeyPressInfo
  */
 public VFSJFileChooserFixture<FileObject> pressAndReleaseKey(KeyPressInfo keyPressInfo) {
   driver.pressAndReleaseKey(target, keyPressInfo);
   return this;
 }
コード例 #3
0
 /**
  * Simulates a user pressing and releasing the given keys on the <code>{@link VFSJFileChooser}
  * </code> managed by this fixture.
  *
  * @param keyCodes one or more codes of the keys to press.
  * @return this fixture.
  * @throws NullPointerException if the given array of codes is <code>null</code>.
  * @throws IllegalArgumentException if any of the given code is not a valid key code.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @see java.awt.event.KeyEvent
  */
 public VFSJFileChooserFixture<FileObject> pressAndReleaseKeys(int... keyCodes) {
   driver.pressAndReleaseKeys(target, keyCodes);
   return this;
 }
コード例 #4
0
 /**
  * Simulates a user right-clicking this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @return this fixture.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  */
 public VFSJFileChooserFixture<FileObject> rightClick() {
   driver.rightClick(target);
   return this;
 }
コード例 #5
0
 /**
  * Gives input focus to this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @return this fixture.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  */
 public VFSJFileChooserFixture<FileObject> focus() {
   driver.focus(target);
   return this;
 }
コード例 #6
0
 /**
  * Asserts that this fixture's <code>{@link VFSJFileChooser}</code> is disabled.
  *
  * @return this fixture.
  * @throws AssertionError if this fixture's <code>VFSJFileChooser</code> is enabled.
  */
 public VFSJFileChooserFixture<FileObject> requireDisabled() {
   driver.requireDisabled(target);
   return this;
 }
コード例 #7
0
 /**
  * Finds the "Approve" button in this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @return the found "Approve" button.
  * @throws ComponentLookupException if the "Approve" button cannot be found.
  */
 public JButtonFixture approveButton() {
   return new JButtonFixture(robot, driver.approveButton(target));
 }
コード例 #8
0
 /**
  * Sets the current directory of this fixture's <code>{@link VFSJFileChooser}</code> to the given
  * one.
  *
  * @param dir the directory to set as current.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @return this fixture.
  */
 public VFSJFileChooserFixture<FileObject> setCurrentDirectory(final FileObject dir) {
   driver.setCurrentDirectory(target, dir);
   return this;
 }
コード例 #9
0
 /**
  * Simulates a user clicking this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @param button the button to click.
  * @return this fixture.
  * @throws NullPointerException if the given <code>MouseButton</code> is <code>null</code>.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  */
 public VFSJFileChooserFixture<FileObject> click(MouseButton button) {
   driver.click(target, button);
   return this;
 }
コード例 #10
0
 /**
  * Selects the given file in this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @param file the file to select.
  * @return this fixture.
  * @throws NullPointerException if the given file is <code>null</code>.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @throws IllegalArgumentException if this fixture's <code>VFSJFileChooser</code> can select
  *     directories only and the file to select is not a directory.
  * @throws IllegalArgumentException if this fixture's <code>VFSJFileChooser</code> cannot select
  *     directories and the file to select is a directory.
  */
 public VFSJFileChooserFixture<FileObject> selectFile(final FileObject file) {
   driver.selectFile(target, file);
   return this;
 }
コード例 #11
0
 /**
  * Selects the given files in this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @param files the files to select.
  * @return this fixture.
  * @throws NullPointerException if the given array of files is <code>null</code>.
  * @throws IllegalArgumentException if the given array of files is empty.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> does not support
  *     multiple selection and there is more than one file to select.
  * @throws IllegalArgumentException if this fixture's <code>VFSJFileChooser</code> can select
  *     directories only and any of the files to select is not a directory.
  * @throws IllegalArgumentException if this fixture's <code>VFSJFileChooser</code> cannot select
  *     directories and any of the files to select is a directory.
  */
 public VFSJFileChooserFixture<FileObject> selectFiles(FileObject... files) {
   driver.selectFiles(target, files);
   return this;
 }
コード例 #12
0
 /**
  * Returns a fixture that manages the field where the user can enter the name of the file to
  * select in this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @return the created fixture.
  * @throws ComponentLookupException if a matching textToMatch field could not be found.
  */
 public JTextComponentFixture fileNameTextBox() {
   return new JTextComponentFixture(robot, driver.fileNameTextBox(target));
 }
コード例 #13
0
 /**
  * Finds the "Cancel" button in this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @return the found "Cancel" button.
  * @throws ComponentLookupException if the "Cancel" button cannot be found.
  */
 public JButtonFixture cancelButton() {
   return new JButtonFixture(robot, driver.cancelButton(target));
 }
コード例 #14
0
 /**
  * Simulates a user pressing the "Cancel" button in this fixture's <code>{@link VFSJFileChooser}
  * </code>.
  *
  * @throws ComponentLookupException if the "Cancel" button cannot be found.
  * @throws IllegalStateException if the "Cancel" button is disabled.
  * @throws IllegalStateException if the "Cancel" button is not showing on the screen.
  */
 public void cancel() {
   driver.clickCancelButton(target);
 }
コード例 #15
0
 /**
  * Simulates a user releasing the given key on this fixture's <code>{@link VFSJFileChooser}</code>
  * .
  *
  * @param keyCode the code of the key to release.
  * @return this fixture.
  * @throws IllegalArgumentException if any of the given code is not a valid key code.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  * @see java.awt.event.KeyEvent
  */
 public VFSJFileChooserFixture<FileObject> releaseKey(int keyCode) {
   driver.releaseKey(target, keyCode);
   return this;
 }
コード例 #16
0
 /**
  * Simulates a user clicking this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @param mouseClickInfo specifies the button to click and the times the button should be clicked.
  * @return this fixture.
  * @throws NullPointerException if the given <code>MouseClickInfo</code> is <code>null</code>.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  */
 public VFSJFileChooserFixture<FileObject> click(MouseClickInfo mouseClickInfo) {
   driver.click(target, mouseClickInfo);
   return this;
 }
コード例 #17
0
 /**
  * Asserts that this fixture's <code>{@link VFSJFileChooser}</code> is enabled.
  *
  * @param timeout the time this fixture will wait for the component to be enabled.
  * @return this fixture.
  * @throws WaitTimedOutError if this fixture's <code>VFSJFileChooser</code> is never enabled.
  */
 public VFSJFileChooserFixture<FileObject> requireEnabled(Timeout timeout) {
   driver.requireEnabled(target, timeout);
   return this;
 }
コード例 #18
0
 /**
  * Simulates a user double-clicking this fixture's <code>{@link VFSJFileChooser}</code>.
  *
  * @return this fixture.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is disabled.
  * @throws IllegalStateException if this fixture's <code>VFSJFileChooser</code> is not showing on
  *     the screen.
  */
 public VFSJFileChooserFixture<FileObject> doubleClick() {
   driver.doubleClick(target);
   return this;
 }
コード例 #19
0
 /**
  * Asserts that this fixture's <code>{@link VFSJFileChooser}</code> is not visible.
  *
  * @return this fixture.
  * @throws AssertionError if this fixture's <code>VFSJFileChooser</code> is visible.
  */
 public VFSJFileChooserFixture<FileObject> requireNotVisible() {
   driver.requireNotVisible(target);
   return this;
 }
コード例 #20
0
 /**
  * Simulates a user pressing the "Approve" button in this fixture's <code>{@link VFSJFileChooser}
  * </code>.
  *
  * @throws ComponentLookupException if the "Approve" button cannot be found.
  * @throws IllegalStateException if the "Approve" button is disabled.
  * @throws IllegalStateException if the "Approve" button is not showing on the screen.
  */
 public void approve() {
   driver.clickApproveButton(target);
 }