Esempio n. 1
0
  /* (non-Javadoc)
   * @see de.jwic.base.Application#createRootControl(de.jwic.base.IControlContainer)
   */
  public Control createRootControl(IControlContainer container) {

    // specify an exit URL
    getSessionContext().setExitURL("byebye.html");

    // specify the page
    Page page = new Page(container);
    page.setTitle("jWic Control Demo");
    page.setTemplateName("de.jwic.samples.controls.Page"); // specify a template

    Button btExit = new Button(page, "exit");
    btExit.setTitle("Exit");
    btExit.addSelectionListener(
        new SelectionListener() {
          public void objectSelected(SelectionEvent event) {
            exitApplication();
          };
        });
    btExit.setWidth(80);

    // WindowControl window = new WindowControl(page, "window");
    // window.setTitle("jWic Control Demo");
    ControlContainer sf = new ControlContainer(page, "window");
    // sf.setTitle("jWic Control Demo");

    createControls(sf);

    container.getSessionContext().setActionController(new TestRecorderActionController());

    return page;
  }
Esempio n. 2
0
  /*
   * (non-Javadoc)
   * @see de.xwic.appkit.webbase.dialog.AbstractDialogWindow#show()
   */
  public void show() {
    if (baseContainer == null) {
      createControls();
    }

    // -30, in case of scrollbars.. just to be safe
    int left = Page.findPage(this).getPageSize().width - getWidth() - 70;
    if (left != getLeft()) {
      setLeft(left);
    }

    setTop(173);

    setVisible(true);
  }