Exemplo n.º 1
0
  @Override
  public void onPageClosed(PageClosedEvent event) {
    final Page page = event.getPage();

    if (page.willClose()) {
      pages.remove(page);
      current.setWidget(pages.peek());
    }
  }
Exemplo n.º 2
0
  @Inject
  public LayoutViewStack(EventBus eventBus) {
    this.eventBus = checkNotNull(eventBus);
    this.pages = Lists.newLinkedList();
    this.current = new SimplePanel();

    PageAddedEvent.bind(eventBus, this);
    PageClosedEvent.bind(eventBus, this);

    initWidget(current);
  }