コード例 #1
0
ファイル: NavigationPanel.java プロジェクト: xiaozhu/guvnor
  private void addPackagesPanel() {
    DockLayoutPanel packageDockLayoutPanel = new DockLayoutPanel(Unit.EM);
    final PackagesTree packagesTreeItem = new PackagesTree();
    ScrollPanel packagesTreeItemPanel = new ScrollPanel(packagesTreeItem);

    if (CapabilitiesManager.getInstance().shouldShow(Capabilities.SHOW_CREATE_NEW_ASSET)) {
      packageDockLayoutPanel.addNorth(PackagesNewMenu.getMenu(packagesTreeItem), 2);
    }
    packageDockLayoutPanel.add(packagesTreeItemPanel);

    add(packageDockLayoutPanel, packagesTreeItem.getHeaderHTML(), 2);

    // lazy loaded to easy startup wait time.
    DeferredCommand.addCommand(
        new Command() {
          public void execute() {
            packagesTreeItem.loadPackageList();
          }
        });
  }