Exemple #1
0
 private static void renderBeep(Display display) {
   IDisplayAdapter displayAdapter = getDisplayAdapter(display);
   if (displayAdapter.isBeepCalled()) {
     displayAdapter.resetBeep();
     getRemoteObject(display).call(METHOD_BEEP, null);
   }
 }
Exemple #2
0
 private static void renderFocus(Display display) {
   if (!display.isDisposed()) {
     IDisplayAdapter displayAdapter = getDisplayAdapter(display);
     RemoteAdapter widgetAdapter = getAdapter(display);
     Object oldValue = widgetAdapter.getPreserved(PROP_FOCUS_CONTROL);
     if (!widgetAdapter.isInitialized()
         || oldValue != display.getFocusControl()
         || displayAdapter.isFocusInvalidated()) {
       // TODO [rst] Added null check as a NPE occurred in some rare cases
       Control focusControl = display.getFocusControl();
       if (focusControl != null) {
         getRemoteObject(display).set(PROP_FOCUS_CONTROL, getId(display.getFocusControl()));
       }
     }
   }
 }
 private static void attachThread(Display display) {
   IDisplayAdapter adapter = display.getAdapter(IDisplayAdapter.class);
   adapter.attachThread();
 }
 private static void setActiveShell(final Shell shell) {
   Object adapter = shell.getDisplay().getAdapter(IDisplayAdapter.class);
   IDisplayAdapter displayAdapter = (IDisplayAdapter) adapter;
   displayAdapter.setActiveShell(shell);
 }