@RunsInEDT @Override @Nonnull public JButtonFixture button(@Nonnull GenericTypeMatcher<? extends JButton> matcher) { return new JButtonFixture(robot(), find(matcher)); }
@RunsInEDT @Override @Nonnull public JButtonFixture button(@Nullable String name) { return new JButtonFixture(robot(), findByName(name, JButton.class)); }
@RunsInEDT @Override @Nonnull public JButtonFixture button() { return new JButtonFixture(robot(), findByType(JButton.class)); }
/** * Finds and returns a fixture wrapping a button (this fixture's {@code JOptionPane}) matching the given text. * * @param text the text of the button to find. It can be a regular expression. * @return a fixture wrapping a button matching the given text. * @throws org.assertj.swing.exception.ComponentLookupException if the a button with the given text cannot be found. */ @Nonnull public JButtonFixture buttonWithText(@Nullable String text) { return new JButtonFixture(robot(), driver().buttonWithText(target(), text)); }
/** * Finds and returns a fixture wrapping a button (this fixture's {@code JOptionPane}) matching the given text. * * @param pattern the regular expression pattern to match. * @return a fixture wrapping a button matching the given regular expression pattern. * @throws NullPointerException if the given regular expression pattern is {@code null}. * @throws org.assertj.swing.exception.ComponentLookupException if the a button with the given text cannot be found. */ @Nonnull public JButtonFixture buttonWithText(@Nonnull Pattern pattern) { return new JButtonFixture(robot(), driver().buttonWithText(target(), pattern)); }
/** * Returns a fixture wrapping the "OK" button in this fixture's {@code JOptionPane}. This method is locale-independent * and platform-independent. * * @return a fixture wrapping the "OK" button. * @throws org.assertj.swing.exception.ComponentLookupException if the a "OK" button cannot be found. */ @Nonnull public JButtonFixture okButton() { return new JButtonFixture(robot(), driver().okButton(target())); }
/** * Returns a fixture wrapping the "Yes" button in this fixture's {@code JOptionPane}. This method is * locale-independent and platform-independent. * * @return a fixture wrapping the "Yes" button. * @throws org.assertj.swing.exception.ComponentLookupException if the a "Yes" button cannot be found. */ @Nonnull public JButtonFixture yesButton() { return new JButtonFixture(robot(), driver().yesButton(target())); }
/** * Finds the "Approve" button in this fixture's {@code JFileChooser}. * * @return the found "Approve" button. * @throws org.assertj.swing.exception.ComponentLookupException if the "Approve" button cannot be found. */ @Nonnull public JButtonFixture approveButton() { return new JButtonFixture(robot(), driver().approveButton(target())); }
/** * Returns a fixture wrapping the "Cancel" button in this fixture's {@code JOptionPane}. This method is * locale-independent and platform-independent. * * @return a fixture wrapping the "Cancel" button. * @throws org.assertj.swing.exception.ComponentLookupException if the a "Cancel" button cannot be found. */ @Nonnull public JButtonFixture cancelButton() { return new JButtonFixture(robot(), driver().cancelButton(target())); }
/** * Returns a fixture wrapping the "No" button in this fixture's {@code JOptionPane}. This method is locale-independent * and platform-independent. * * @return a fixture wrapping the "No" button. * @throws org.assertj.swing.exception.ComponentLookupException if the a "No" button cannot be found. */ @Nonnull public JButtonFixture noButton() { return new JButtonFixture(robot(), driver().noButton(target())); }
/** * Finds the "Cancel" button in this fixture's {@code JFileChooser}. * * @return the found "Cancel" button. * @throws org.assertj.swing.exception.ComponentLookupException if the "Cancel" button cannot be found. */ @Nonnull public JButtonFixture cancelButton() { return new JButtonFixture(robot(), driver().cancelButton(target())); }