Package org.fest.swing.edt

Examples of org.fest.swing.edt.GuiTask


* @author Alex Ruiz
*/
final class JTreeSetRootVisibleTask {
  @RunsInEDT
  static void setRootVisible(final @Nonnull JTree tree, final boolean visible) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        tree.setRootVisible(visible);
      }
    });
View Full Code Here


* @author Alex Ruiz
*/
final class JTreeSetEditableTask {
  @RunsInEDT
  static void setEditable(final @Nonnull JTree tree, final boolean editable) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        tree.setEditable(editable);
      }
    });
View Full Code Here

    validateIndex(list, index);
  }

  @RunsInEDT
  private static void validateIndex(final JList list, final int index) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        JListItemPreconditions.checkIndexInBounds(list, index);
      }
    });
View Full Code Here

    robot.waitForIdle();
  }

  @RunsInEDT
  private static void setJLabelAsEditorIn(final JSpinner spinner) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        spinner.setEditor(new JLabel());
      }
    });
View Full Code Here

    robot.waitForIdle();
  }

  @RunsInEDT
  private static void setValue(final JSpinner spinner, final Object value) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        spinner.setValue(value);
      }
    });
View Full Code Here

    assertThat(hasSelection(table)).isTrue();
  }

  @RunsInEDT
  private static void selectAllIn(final TestTable table) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        table.selectAll();
      }
    });
View Full Code Here

  @RunsInEDT
  private void checkSafelyIfReady(final @Nonnull Window w) {
    if (!windows.isShowingButNotReady(w)) {
      return;
    }
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        makeLargeEnoughToReceiveEvents(w);
      }
    });
View Full Code Here

    robot.waitForIdle();
  }

  @RunsInEDT
  static void setText(final JTextField textField, final String text) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        textField.setText(text);
      }
    });
View Full Code Here

    parent = FrameWithButton.createNew();
  }

  @After
  public void tearDown() {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        parent.setVisible(false);
        parent.dispose();
      }
View Full Code Here

    }
  }

  @RunsInEDT
  private static void makeEditableAndClearSelection(final JComboBox comboBox) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        comboBox.setSelectedIndex(-1);
        comboBox.setEditable(true);
      }
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.