Package org.eclipse.swt.widgets

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


    shell.open();
    shell.layout();

    while (!shell.isDisposed()) {
      try {
        if (!display.readAndDispatch()) {
          display.sleep();
        }
      } catch (Exception e) {
        MessageDialog.openError(shell,
            i18nFile.getText(I18nFile.ERROR),
View Full Code Here


    viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    shell.setText("Configure a coat of arms"); //$NON-NLS-1$
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
  }
View Full Code Here

      }
    });

    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }

    }
    display.dispose();
View Full Code Here

      });

    }// end of else

    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    image.dispose();
    shell.dispose();
View Full Code Here

        true));

    shell.setText("Map"); //$NON-NLS-1$
    shell.open();
    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
  }
View Full Code Here

            IBoxEditAction action = editPolicy.getAction().getBoxEditAction();
            action.init(this);
            action.perform();
            Display display = getViewer().getControl().getDisplay();
            while( !action.isDone() ){
                if( !display.readAndDispatch() ){
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                        break;
                    }
View Full Code Here

            public void run(IProgressMonitor monitor) throws InvocationTargetException,
                    InterruptedException {
                monitor.beginTask(message, IProgressMonitor.UNKNOWN);
                while (committing) {
                    if (!display.readAndDispatch()) {
                        Thread.sleep(200);
                    }
                }
            }
        };
View Full Code Here

            });

            Display display = Display.getCurrent();
            while( !done[0] ) {
                if (display == null || !display.readAndDispatch()) {
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                        break;
                    }
View Full Code Here

            display = loopShell.getDisplay();
        }

        while (loopShell != null && !loopShell.isDisposed()) {
            try {
                if (!display.readAndDispatch()) {
                    display.sleep();
                }
            } catch (Throwable e) {
                UiPlugin.log( "Exception in UI thread while waiting", e); //$NON-NLS-1$
            }
View Full Code Here

        } else {
            while( !condition.isTrue() ) {
                Thread.yield();
                if (timeout > 0 && System.currentTimeMillis() - start > timeout)
                    throw new InterruptedException("Timed out waiting for condition " + condition); //$NON-NLS-1$
                if (!current.readAndDispatch())
                    synchronized (mutex2) {
                        mutex2.wait(interval);
                    }
            }
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.