Package org.fest.swing.edt

Examples of org.fest.swing.edt.GuiTask


    robot.waitForIdle();
  }

  @RunsInEDT
  private static void commit(final @Nonnull JSpinner spinner) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() throws ParseException {
        spinner.commitEdit();
      }
    });
View Full Code Here


    return null;
  }

  @RunsInEDT
  private static void checkEditorNotNull(final @Nonnull JSpinner spinner, final @Nullable JTextComponent editor) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        if (editor == null) {
          throw actionFailure(concat("Unable to find editor for ", format(spinner)));
        }
View Full Code Here

* @author Alex Ruiz
*/
final class JComboBoxSetSelectedIndexTask {
  @RunsInEDT
  static void setSelectedIndex(final @Nonnull JComboBox comboBox, final int index) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        comboBox.setSelectedIndex(index);
      }
    });
View Full Code Here

* @author Alex Ruiz
*/
final class JSpinnerSetValueTask {
  @RunsInEDT
  static void setValue(final @Nonnull JSpinner spinner, final @Nonnull Object value) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        checkEnabledAndShowing(spinner);
        spinner.setValue(value);
      }
View Full Code Here

* @author Yvonne Wang
*/
final class JTabbedPaneSelectTabTask {
  @RunsInEDT
  static void setSelectedTab(final @Nonnull JTabbedPane tabbedPane, final int index) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        tabbedPane.setSelectedIndex(index);
      }
    });
View Full Code Here

* @author Alex Ruiz
*/
final class ComponentSetSizeTask {
  @RunsInEDT
  static void setComponentSize(final @Nonnull Component c, final int width, final int height) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        c.setSize(width, height);
      }
    });
View Full Code Here

    assertThat(textOf(firstChildOf(rootChild))).isEqualTo("branch1.1");
  }

  @RunsInEDT
  private static void addNodeToRootAndHideRoot(final JTree tree) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        Object root = tree.getModel().getRoot();
        DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) root;
        rootNode.add(node("child"));
View Full Code Here

    }, 18000);
  }

  @RunsInEDT
  private void showJComboBoxDropDownList() {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        window.comboBox.showPopup();
      }
    });
View Full Code Here

    });
    robot.waitForIdle();
  }

  private void assertThatListContains(final JList list, final String... expectedElements) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        ListModel model = list.getModel();
        int elementCount = model.getSize();
        assertThat(elementCount).isEqualTo(expectedElements.length);
View Full Code Here

    robot.waitForIdle();
  }

  @RunsInEDT
  private static void setSelectedIndices(final JList list, final int... indices) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        list.setSelectionMode(MULTIPLE_INTERVAL_SELECTION);
        list.setSelectedIndices(indices);
      }
View Full Code Here

TOP

Related Classes of org.fest.swing.edt.GuiTask

Copyright © 2018 www.massapicom. 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.