示例#1
0
 @Override
 public void init() {
   LegacyWindow w = new LegacyWindow(getClass().getSimpleName());
   setMainWindow(w);
   // setTheme("tests-tickets");
   createUI((AbstractOrderedLayout) w.getContent());
 }
示例#2
0
  @Override
  public void init() {

    buildViews(new String[] {"main", "view2", "view3"});

    mainLayout = new VerticalLayout();
    mainLayout.setSizeFull();
    final LegacyWindow mainWin =
        new LegacyWindow("Test app for URI fragment management/reading", mainLayout);
    setMainWindow(mainWin);

    mainWin.addListener(
        new Root.FragmentChangedListener() {

          public void fragmentChanged(FragmentChangedEvent event) {
            getMainWindow().showNotification("Fragment now: " + event.getFragment());
            // try to change to view mapped by fragment string
            setView(event.getFragment());
          }
        });

    setView("main");
  }