示例#1
0
 /**
  * Sets the content Container. This is desirable for example, if the content Container shall be a
  * <code>ScrollContainer</code>.
  *
  * @param c the new container
  */
 public void setContentContainer(IContainer c) {
   removeWidget(content);
   if (!getContent().contains(c)) addWidget(c);
   ((Widget) c).setLayoutData(BorderLayoutData.CENTER);
   if (c instanceof Container) ((Container) c).setKeyTraversalRoot(false);
   updateMinSize();
   content = c;
 }
示例#2
0
  /**
   * Build the window structure. Override this method if you want to change the inner widgets
   * placement. Do not call this method. It is automaticaly call by the constructor.
   *
   * @param closeBtn
   * @param maximizeBtn
   * @param minimizeBtn
   */
  protected void build(boolean closeBtn, boolean maximizeBtn, boolean minimizeBtn) {
    titleBar = new Container();
    this.addWidget(titleBar);

    setLayoutManager(new BorderLayout());

    content = new Container();
    ((Container) content).setLayoutData(BorderLayoutData.CENTER);
    ((Container) content).setKeyTraversalRoot(true);
    this.addWidget(content);

    titleBar.setLayoutData(BorderLayoutData.NORTH);

    buildTitleBar(closeBtn, maximizeBtn, minimizeBtn);

    setSize(100, 120);
  }