Package org.eclipse.swt.widgets

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


        new IssuesBrowser(parent);
        parent.setSize(640, 480);
        parent.open();

        while (!parent.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
        display.dispose();
        System.exit(0);
View Full Code Here


    OpenProjectElementCommand omCommand = new OpenProjectElementCommand(map);
    omCommand.run(new NullProgressMonitor());
   
    Display display = Display.getCurrent();
    while(!display.isDisposed() && !done) {
      display.readAndDispatch();
    }
   
    assertEquals(map,ApplicationGIS.getActiveMap());
   
   
View Full Code Here

      contextService.registerShell(dialog, IContextService.TYPE_NONE);
      addKeyListener(table, dialog);
      addTraverseListener(table);

      while (!dialog.isDisposed()) {
        if (!display.readAndDispatch()) {
          display.sleep();
        }
      }
    } finally {
      if (!dialog.isDisposed()) {
View Full Code Here

        }
      }};
      initThread.start();

      while (true) {
        if (!display.readAndDispatch()) {
          if (initDone[0])
            break;
          display.sleep();
        }
       
View Full Code Here

          }};
        t.start();
        while(t.isAlive()) {
          try {
            Display d = getDisplay();
            while(d != null && !d.isDisposed() && d.readAndDispatch()) {
              // loop
            }
            t.join(10);
          } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
View Full Code Here

    }

    s.pack();
    s.open();
    while(!s.isDisposed()) {
      if(!d.readAndDispatch())
        d.sleep();
    }
    d.dispose();

    System.exit(0);
View Full Code Here

      }
    }

    if(PluginManager.getEnableSwt()) {
      Display display = Display.getCurrent();
      while(display.readAndDispatch());
    }

    // Version check thread
    new Thread() {
      @Override
View Full Code Here

    // SWT requires the main thread to be the event thread
    if(PluginManager.getEnableSwt()) {
      Display display = Display.getCurrent();
      while(!display.isDisposed()) {
        if(!display.readAndDispatch())
          display.sleep();
      }
      System.exit(0);
    }
  }
View Full Code Here

      m_shell.setVisible(true);
      m_shell.setActive();
      Display display = Display.getCurrent();
      while (m_shell.isVisible()) {
        try {
          if (!display.readAndDispatch()) {
            display.sleep();
          }
        } catch (Throwable e) {
        }
      }
View Full Code Here

        }
      }
      if (!display.isDisposed()) {
        display.update();
        // proceed outstanding events
        while (display.readAndDispatch());
      }
    } finally {
      getEclipseShell().setEnabled(true);
    }
  }
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.