Esempio n. 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();
   }
 }
Esempio n. 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);
   }
 }
Esempio n. 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;
           }
         });
   }
 }
Esempio n. 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;
             }
           });
     }
   }
 }