Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Display.asyncExec()


            return;
        }
        Display display = PlatformUI.getWorkbench().getDisplay();
        if (display == null)
            display = Display.getDefault();
        display.asyncExec(new Runnable(){
            public void run() {
                doUpdateScaleLabel();
            }

        });
View Full Code Here


        warning = "The map graphic is missing from your installation, talk to the creator of this page and make sure you have the correct plugins.";
    }

    private void queryForMapGraphic() {
        final Display display = findDisplay();
        display.asyncExec(new Runnable(){
            public void run() {
                MapGraphicChooserDialog dialog = new MapGraphicChooserDialog(display
                        .getActiveShell(), false);
                dialog.open();
                if (dialog.getSelectedResources().isEmpty()) {
View Full Code Here

  protected void openResource(final IFile resource) {
    final IWorkbenchPage activePage = VisualSwingPlugin.getActivePage();
    if (activePage != null) {
      final Display display = getShell().getDisplay();
      if (display != null) {
        display.asyncExec(new Runnable() {
          public void run() {
            try {
              IDE.openEditor(activePage, resource, true);
            } catch (PartInitException e) {
              VisualSwingPlugin.getLogger().error(e);
View Full Code Here

        }
      }
    }

    if (display != null && !display.isDisposed())
      display.asyncExec(runnable);
    else
      runnable.run();
  }

  /**
 
View Full Code Here

            Display display;
            if (shell != null)
              display= shell.getDisplay();
            else
              display= Display.getDefault();
            display.asyncExec(runnable);
          }
        }
      }
    };
View Full Code Here

      IWorkbench workbench= PlatformUI.getWorkbench();
      IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
      if (windows != null && windows.length > 0) {
        Display display= windows[0].getShell().getDisplay();
        display.asyncExec(runnable);
      } else {
        runnable.run();
      }
    }
  }
View Full Code Here

  public void close(final boolean save) {

    enableSanityChecking(false);

    Display display= getSite().getShell().getDisplay();
    display.asyncExec(new Runnable() {
      public void run() {
        if (fSourceViewer != null)
          getSite().getPage().closeEditor(AbstractTextEditor.this, save);
      }
    });
View Full Code Here

    } else {
      IWorkbench workbench= PlatformUI.getWorkbench();
      IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
      if (windows != null && windows.length > 0) {
        Display display= windows[0].getShell().getDisplay();
        display.asyncExec(runnable);
      } else {
        runnable.run();
      }
    }
  }
View Full Code Here

     * Close the editor asynchronously.
     * @param save the save parameter.
     */
    protected void close(final boolean save) {
        Display display = getSite().getShell().getDisplay();
        display.asyncExec(new Runnable() {
            public void run() {
                getSite().getPage().closeEditor(MultiPageODOMEditor.this, save);
            }
        });
    }
View Full Code Here

     *
     * @param save the save parameter.
     */
    protected void close(final boolean save) {
        Display display = getSite().getShell().getDisplay();
        display.asyncExec(new Runnable() {
            public void run() {
                getSite().getPage().closeEditor(ODOMEditorPart.this, save);
            }
        });
    }
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.