예제 #1
0
  public void attach() {

    buildview();
    //	this.setCaption("New Nurse");
    //	getWindow().setClosable(true);
    navigationView.setCaption("New Nurse");
    setWidth("100%");
    setHeight("80%");
    this.setClosable(true);
    this.setModal(true);
  }
예제 #2
0
  @SuppressWarnings("serial")
  public NotAllowedPopover() {
    setWidth("75%");

    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setSpacing(true);
    setHeight("150px");

    Label lbl;
    layout.addComponent(
        lbl =
            new Label(
                "This mmowgli game does not allow guest access.  Thank you for your interest."));

    layout.setExpandRatio(lbl, 1.0f);
    Button closeButt;
    layout.addComponent(closeButt = new Button("Close"));

    NavigationView nv = new NavigationView(layout);
    nv.setCaption("Access Not Allowed");
    setContent(nv);
    this.center();

    closeButt.addClickListener(
        new ClickListener() {
          @Override
          public void buttonClick(ClickEvent event) {
            HSess.init();
            GameLinks links = GameLinks.getTL();
            HSess.close();

            UI.getCurrent().getPage().setLocation(links.getThanksForInterestLink());
            getSession().close();
          }
        });
  }