Package org.fest.swing.core

Examples of org.fest.swing.core.ComponentFoundCondition.found()


    try {
      pause(condition, EDITOR_LOOKUP_TIMEOUT);
    } catch (WaitTimedOutError e) {
      throw cannotFindOrActivateEditor(row, column);
    }
    return supportedType.cast(condition.found());
  }

  /**
   * Throws a {@link ActionFailedException} if this {@link JTableCellWriter} could not find or activate the cell editor
   * of the supported type.
View Full Code Here


  private @Nonnull DialogFixture findDialog(@Nonnull ComponentMatcher matcher, @Nonnull Timeout timeout) {
    String description = "dialog to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot().finder(), matcher);
    pause(condition, timeout);
    Dialog dialog = (Dialog) condition.found();
    return new DialogFixture(robot(), checkNotNull(dialog));
  }

  /** {@inheritDoc} */
  @RunsInEDT
View Full Code Here

  private @Nonnull JFileChooserFixture findFileChooser(@Nonnull ComponentMatcher matcher, @Nonnull Timeout timeout) {
    String description = "file chooser to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot().finder(), matcher);
    pause(condition, timeout);
    JFileChooser fileChooser = (JFileChooser) condition.found();
    return new JFileChooserFixture(robot(), checkNotNull(fileChooser));
  }

  /** {@inheritDoc} */
  @RunsInEDT
View Full Code Here

  public @Nonnull JOptionPaneFixture optionPane(@Nonnull Timeout timeout) {
    TypeMatcher matcher = new TypeMatcher(JOptionPane.class, requireShowing());
    String description = "option pane to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot().finder(), matcher);
    pause(condition, timeout);
    JOptionPane optionPane = (JOptionPane) condition.found();
    return new JOptionPaneFixture(robot(), checkNotNull(optionPane));
  }

  /** {@inheritDoc} */
  @RunsInEDT
View Full Code Here

   * @throws WaitTimedOutError if a component with the given name or of the given type could not be found.
   */
  protected final @Nonnull T findComponentWith(@Nonnull Robot robot) {
    ComponentFoundCondition condition = new ComponentFoundCondition(searchDescription, robot.finder(), matcher);
    pause(condition, timeout);
    return checkNotNull(cast(condition.found()));
  }

  /**
   * Casts the given {@code Component} to the type supported by this finder.
   *
 
View Full Code Here

  private DialogFixture findDialog(ComponentMatcher matcher, Timeout timeout) {
    String description = "dialog to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot.finder(), matcher);
    pause(condition, timeout);
    return new DialogFixture(robot, (Dialog)condition.found());
  }

  /** {@inheritDoc} */
  public JFileChooserFixture fileChooser() {
    return fileChooser(DEFAULT_DIALOG_LOOKUP_TIMEOUT);
View Full Code Here

  private JFileChooserFixture findFileChooser(ComponentMatcher matcher, Timeout timeout) {
    String description = "file chooser to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot.finder(), matcher);
    pause(condition, timeout);
    return new JFileChooserFixture(robot, (JFileChooser)condition.found());
  }

  /** {@inheritDoc} */
  public JLabelFixture label() {
    return new JLabelFixture(robot, findByType(JLabel.class));
View Full Code Here

  public JOptionPaneFixture optionPane(Timeout timeout) {
    TypeMatcher matcher = new TypeMatcher(JOptionPane.class, requireShowing());
    String description = "option pane to be found using matcher " + matcher;
    ComponentFoundCondition condition = new ComponentFoundCondition(description, robot.finder(), matcher);
    pause(condition, timeout);
    return new JOptionPaneFixture(robot, (JOptionPane)condition.found());
  }

  /** {@inheritDoc} */
  public JPanelFixture panel() {
    return new JPanelFixture(robot, findByType(JPanel.class));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.