List of usage examples for com.google.gwt.user.client.ui RootLayoutPanel remove
@Override
public boolean remove(Widget w)
From source file:org.penpusher.client.Penpusher.java
License:Open Source License
@Override public void onModuleLoad() { final SimpleEventBus eventBus = new SimpleEventBus(); final ApplicationModel model = ApplicationModel.create(eventBus); final ApplicationController ctrl = new ApplicationController(eventBus); // Instantiates view final RootLayoutPanel root = RootLayoutPanel.get(); final MainPanel mainPane = new MainPanel(ctrl, model); root.add(mainPane);/* ww w . ja v a 2s. c om*/ eventBus.addHandler(SessionEvent.TYPE, new SessionEventHandler() { @Override public void onSession(final SessionEvent event) { // Load forms and categories. Forms must be loaded first. ctrl.loadForms(model.getFormModel()); ctrl.loadCategories(model.getCategoryModel()); } }); eventBus.addHandler(SignOutCompletedEvent.TYPE, new SignOutCompletedEventHandler() { @Override public void onSignOutCompleted(final SignOutCompletedEvent event) { root.remove(mainPane); root.add(new SignOutPanel()); } }); // Gets session information ctrl.getSession(model); }
From source file:org.rstudio.studio.client.application.Application.java
License:Open Source License
@Handler public void onShowRequestLog() { GWT.runAsync(new RunAsyncCallback() { public void onFailure(Throwable reason) { Window.alert(reason.toString()); }/*from w ww . j a va2 s .co m*/ public void onSuccess() { final RequestLogVisualization viz = new RequestLogVisualization(); final RootLayoutPanel root = RootLayoutPanel.get(); root.add(viz); root.setWidgetTopBottom(viz, 10, Unit.PX, 10, Unit.PX); root.setWidgetLeftRight(viz, 10, Unit.PX, 10, Unit.PX); viz.addCloseHandler(new CloseHandler<RequestLogVisualization>() { public void onClose(CloseEvent<RequestLogVisualization> event) { root.remove(viz); } }); } }); }