Exemplo n.º 1
0
  /** Constructor */
  public MainTabBar() {
    super(new BorderLayout());

    scrollingTabContainer = new BContainer(new BorderLayout());
    add(scrollingTabContainer, BorderLayout.CENTER);

    tabContainer = new BContainer(GroupLayout.makeHoriz(GroupLayout.LEFT)); // buildTabContainer();
    // tabContainer.setStyleClass("main_title");
    // tabContainer.setPreferredSize(getDisplay().getWidth(), TAB_HEIGHT);

    // BScrollPane scrollPane = new BScrollPane(tabContainer, false, false);
    viewport = new BScrollPane.BViewport(tabContainer, false, true, -1);
    scrollingTabContainer.add(viewport, BorderLayout.CENTER);
    scrollingTabContainer.setPreferredSize(getDisplay().getWidth(), TAB_HEIGHT);
    scrollingTabContainer.setStyleClass("main_title");

    diagramLabel = new BLabel("");
    diagramLabel.setStyleClass("menu_background");
    add(diagramLabel, BorderLayout.SOUTH);
    diagramLabel.setPreferredSize(getDisplay().getWidth(), DESCRIPTION_HEIGHT);

    StaticsApplication.getApp()
        .addDiagramListener(
            new DiagramListener() {

              public void onDiagramCreated(Diagram diagram) {
                addTab(diagram);
              }

              public void onDiagramChanged(Diagram newDiagram) {
                activateTab(newDiagram);
              }
            });
  }
Exemplo n.º 2
0
 public BViewport() {
   super(GroupLayout.makeVert(GroupLayout.NONE, GroupLayout.TOP, GroupLayout.STRETCH));
 }