private static void renderShells(Display display) throws IOException { RenderVisitor visitor = new RenderVisitor(); for (Shell shell : getShells(display)) { WidgetTreeVisitor.accept(shell, visitor); visitor.reThrowProblem(); } }
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); } }
@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; } }); } }
@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; } }); } } }