Package com.google.gwt.topspin.desktop.client.TabBar

Examples of com.google.gwt.topspin.desktop.client.TabBar.Tab


    panel = new Panel(getCompositeContainer());

    tabBar = new TabBar(panel.getContainer());
    tabBar.addTabSelectedListener(new TabBar.TabSelectedListener() {
      public void onTabSelected(TabSelectedEvent event) {
        Tab tab = event.getTab();
        int index = tabs.indexOf(tab);
        selectTab(index);
      }
    });

    deckPanel = new DeckPanel(panel.getContainer());
    deckContainer = new WrapperContainer(deckPanel.getContainer()) {
      public void add(Widget widget) {
        super.add(widget);

        widgets.add(widget);
        tabs.add(new TabBar.Tab(tabBar));
      }

      public void remove(Widget widget) {
        super.remove(widget);

        int tabIndex = getTabIndexForWidget(widget);
        assert (tabIndex != -1);

        Tab tab = tabs.get(tabIndex);
        tab.destroy();

        // TODO(jgw): Deal with the selected widget being removed.

        widgets.remove(tabIndex);
        tabs.remove(tabIndex);
View Full Code Here

TOP

Related Classes of com.google.gwt.topspin.desktop.client.TabBar.Tab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.