コード例 #1
0
  private void buildMainLayout() {
    // setMainWindow(new Window("Address Book Demo application"));

    MyApplication.debug(3, "buildMainLayout");
    // getWindow().setName("FirstPage!");
    layout = new VerticalLayout();
    layout.setSizeFull();

    layout.addComponent(createToolbar());
    layout.addComponent(horizontalSplit);

    /* Allocate all available extra space to the horizontal split panel */

    layout.setExpandRatio(horizontalSplit, 1);
    /* Set the initial split position so we can have a 200 pixel menu to the left */

    horizontalSplit.setSplitPosition(200, SplitPanel.UNITS_PIXELS);
    MyApplication.debug(3, "buildMainLayout 2");
    try {
      if (layout != null) {
        getWindow().setLayout(layout);
        MyApplication.debug(3, "buildMainLayout end");
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #2
0
  public HorizontalLayout createToolbar() {

    MyApplication.debug(3, "createToolbar");
    HorizontalLayout lo = new HorizontalLayout();
    lo.addComponent(newContact);
    lo.addComponent(search);
    lo.addComponent(share);
    lo.addComponent(help);

    return lo;
  }