Package org.eclipse.swt.widgets

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


          private void updateUi() {
            Display display = Display.getDefault();
            try {
              if (!isCanceled() && !display.isDisposed() && dialog.getShell() != null && !dialog.getShell().isDisposed()) {
                display.readAndDispatch();
                display.update();
              }
            }

            /*
             * Ensure to catch any Exception here and disable the update of the
View Full Code Here


        display.readAndDispatch();
//        just busy wait as sleep() seems to block until some input is recieved (e.g. mouse moved)
//        if (!display.readAndDispatch())
//          display.sleep();
      }
      display.update();
    }
    // Otherwise, perform a simple sleep.

    else {
      try {
View Full Code Here

        }
      } catch (Throwable e) {
        exceptionHandler.handleException(e);
      }
    }
    if (!display.isDisposed()) display.update();
  }

  /**
   * Sets whether the <code>open</code> method should block until the window
   * closes.
 
View Full Code Here

          }
        } catch (Throwable e) {
        }
      }
      if (!display.isDisposed()) {
        display.update();
        // proceed outstanding events
        while (display.readAndDispatch());
      }
    } finally {
      getEclipseShell().setEnabled(true);
View Full Code Here

                }
            } catch (Throwable e) {
                UiPlugin.log( "Exception in UI thread while waiting", e); //$NON-NLS-1$
            }
        }
        display.update();
    }

    private void addClosingListeners() {
        delegate.getShell().addListener(SWT.Close|SWT.Dispose, new Listener(){
View Full Code Here

      while (System.currentTimeMillis()<endTimeMillis){
        if (!display.readAndDispatch()){
          display.sleep();
        }
      }
      display.update();
    } else {
      try {
        Thread.sleep(waitTimeInMillis);
      } catch (InterruptedException e) {}
    }
View Full Code Here

    Display d = Display.getDefault();
    while(!shell.isDisposed())
    {
      if(!d.readAndDispatch()) d.sleep();
    }
    d.update();

    return ret;
  }
}
View Full Code Here

    Display d = Display.getDefault();
    while(!loopShell.isDisposed())
    {
      if(!d.readAndDispatch()) d.sleep();
    }
    d.update();
  }

  private FormData createFormData(FormAttachment top, FormAttachment bottom)
  {
    FormData formData = new FormData();
View Full Code Here

          localDisplay.sleep();
        }
      } catch (Throwable localThrowable2) {
        localThrowable2.printStackTrace();
      }
    localDisplay.update();
    return i;
  }


  private void initializeShell(Shell paramShell) {
View Full Code Here

        }
      } catch (Throwable e) {
      }
    }
    if (!display.isDisposed()) {
      display.update();
    }
  }
  ////////////////////////////////////////////////////////////////////////////
  //
  // TODO: remove when completely switching to D2
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.