Beispiel #1
0
 private static void renderShells(Display display) throws IOException {
   RenderVisitor visitor = new RenderVisitor();
   for (Shell shell : getShells(display)) {
     WidgetTreeVisitor.accept(shell, visitor);
     visitor.reThrowProblem();
   }
 }
Beispiel #2
0
 private static void visitWidgets(Display display) {
   WidgetTreeVisitor visitor =
       new AllWidgetTreeVisitor() {
         @Override
         public boolean doVisit(Widget widget) {
           getLCA(widget).readData(widget);
           return true;
         }
       };
   for (Shell shell : getShells(display)) {
     WidgetTreeVisitor.accept(shell, visitor);
   }
 }
Beispiel #3
0
 @Override
 public void clearPreserved(Display display) {
   ((WidgetRemoteAdapter) getAdapter(display)).clearPreserved();
   for (Shell shell : getShells(display)) {
     WidgetTreeVisitor.accept(
         shell,
         new AllWidgetTreeVisitor() {
           @Override
           public boolean doVisit(Widget widget) {
             ((WidgetRemoteAdapter) getAdapter(widget)).clearPreserved();
             return true;
           }
         });
   }
 }
Beispiel #4
0
 @Override
 public void preserveValues(Display display) {
   RemoteAdapter adapter = getAdapter(display);
   adapter.preserve(PROP_FOCUS_CONTROL, display.getFocusControl());
   adapter.preserve(PROP_EXIT_CONFIRMATION, getExitConfirmation());
   adapter.preserve(PROP_RESIZE_LISTENER, Boolean.valueOf(hasResizeListener(display)));
   ActiveKeysUtil.preserveActiveKeys(display);
   ActiveKeysUtil.preserveCancelKeys(display);
   ActiveKeysUtil.preserveMnemonicActivator(display);
   if (adapter.isInitialized()) {
     for (Shell shell : getShells(display)) {
       WidgetTreeVisitor.accept(
           shell,
           new AllWidgetTreeVisitor() {
             @Override
             public boolean doVisit(Widget widget) {
               getLCA(widget).preserveValues(widget);
               return true;
             }
           });
     }
   }
 }