Class DecoratedTabPanel

All Implemented Interfaces:
HasAttachHandlers, HasBeforeSelectionHandlers<Integer>, HasSelectionHandlers<Integer>, HasHandlers, EventListener, HasAnimation, HasVisibility, HasWidgets, IndexedPanel, IndexedPanel.ForIsWidget, IsRenderable, IsWidget, SourcesTabEvents, TabListener, Iterable<Widget>, EventListener

public class DecoratedTabPanel extends TabPanel
A TabPanel that uses a DecoratedTabBar with rounded corners.

This widget will only work in quirks mode. If your application is in Standards Mode, use TabLayoutPanel instead.

CSS Style Rules

  • .gwt-DecoratedTabPanel { the tab panel itself }
  • .gwt-TabPanelBottom { the bottom section of the tab panel (the deck containing the widget) }

Example

public class TabPanelExample implements EntryPoint {

  public void onModuleLoad() {
    // Create a tab panel with three tabs, each of which displays a different
    // piece of text.
    TabPanel tp = new TabPanel();
    tp.add(new HTML("Foo"), "foo");
    tp.add(new HTML("Bar"), "bar");
    tp.add(new HTML("Baz"), "baz");

    // Show the 'bar' tab initially.
    tp.selectTab(1);

    // Add it to the root panel.
    RootPanel.get().add(tp);
  }
}

See Also:
  • Constructor Details

    • DecoratedTabPanel

      public DecoratedTabPanel()
  • Method Details

    • createTabTextWrapper

      protected SimplePanel createTabTextWrapper()
      Description copied from class: TabPanel
      Create a SimplePanel that will wrap the contents in a tab. Subclasses can use this method to wrap tabs in decorator panels.
      Overrides:
      createTabTextWrapper in class TabPanel
      Returns:
      a SimplePanel to wrap the tab contents, or null to leave tabs unwrapped