Examples of GuiTask


Examples of org.fest.swing.edt.GuiTask

    setEnabled(component, false);
  }

  @RunsInEDT
  public static void setEnabled(final @Nonnull Component component, final boolean enabled) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        component.setEnabled(enabled);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

* @author Alex Ruiz
*/
public final class ComponentSetPopupMenuTask {
  @RunsInEDT
  public static void setPopupMenu(final @Nonnull JComponent c, final @Nonnull JPopupMenu popupMenu) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        c.setComponentPopupMenu(popupMenu);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

  @RunsInEDT
  public static void hideAndDisposeInEDT(final @Nullable Window w) {
    if (w == null) {
      return;
    }
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        hideAndDispose(w);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

    return isOSX() && (getBoolean("apple.laf.useScreenMenuBar") || getBoolean("com.apple.macos.useScreenMenuBar"));
  }

  @RunsInEDT
  private static void validateAndDoClick(final @Nonnull JMenuItem menuItem) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        checkEnabledAndShowing(menuItem);
        menuItem.doClick();
      }
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

* @author Alex Ruiz
*/
final class JSliderSetValueTask {
  @RunsInEDT
  static void setValue(final @Nonnull JSlider slider, final int newValue) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        slider.setValue(newValue);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

   *
   * @param preferredSize the preferred size to set to this dialog before displaying it on the screen.
   */
  @RunsInEDT
  public void display(final Dimension preferredSize) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        display(TestDialog.this, preferredSize);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

  /**
   * Hides and disposes this dialog. This method is executed in the event dispatch thread (EDT.)
   */
  @RunsInEDT
  public void destroy() {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        destroy(TestDialog.this);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

    applet = newApplet;
  }

  @RunsInEDT
  private static void doResize(final @Nonnull JApplet applet, final int width, final int height) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        applet.resize(width, height);
      }
    });
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

* @author Alex Ruiz
*/
final class JFileChooserSelectFileTask {
  @RunsInEDT
  static void setSelectedFile(final @Nonnull JFileChooser fileChooser, final @Nonnull File file) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        checkEnabledAndShowing(fileChooser);
        checkSelectionMode(fileChooser, file);
        fileChooser.setSelectedFile(file);
View Full Code Here

Examples of org.fest.swing.edt.GuiTask

    });
  }

  @RunsInEDT
  static void setSelectedFiles(final @Nonnull JFileChooser fileChooser, final @Nonnull File[] files) {
    execute(new GuiTask() {
      @Override
      protected void executeInEDT() {
        checkEnabledAndShowing(fileChooser);
        if (files.length > 1 && !fileChooser.isMultiSelectionEnabled()) {
          throw new IllegalStateException(concat("Expecting file chooser ", format(fileChooser),
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.