@Dependent
public class TabPanelWithDropdowns
extends com.google.gwt.user.client.ui.Composite
Modifier and Type | Class and Description |
---|---|
class |
TabPanelWithDropdowns.DropDownTab
Container for the menu items that appear when the dropdown tab is clicked.
|
Modifier and Type | Field and Description |
---|---|
protected org.gwtbootstrap3.client.ui.NavTabs |
tabBar
The bar at the top where the tabs sit.
|
protected org.gwtbootstrap3.client.ui.TabContent |
tabContent
The content area that shows the content for the currently selected tab.
|
Constructor and Description |
---|
TabPanelWithDropdowns() |
Modifier and Type | Method and Description |
---|---|
TabPanelWithDropdowns.DropDownTab |
addDropdownTab(String label)
Adds a new tab to this panel that doesn't have any contents itself, but can contain multiple items that appear in
a dropdown menu when the tab is clicked.
|
void |
addDropdownTab(TabPanelWithDropdowns.DropDownTab contents)
Adds a pre-made dropdown tab to this tab panel.
|
TabPanelEntry |
addItem(String label,
com.google.gwt.user.client.ui.Widget content)
Adds a normal tab (not a dropdown) with the given label and contents.
|
void |
addItem(TabPanelEntry tab)
Adds a normal tab (not a dropdown) with the given label and contents (at the end of the tab bar).
|
com.google.gwt.event.shared.HandlerRegistration |
addShowHandler(org.gwtbootstrap3.client.shared.event.TabShowHandler tabShowHandler)
Registers a handler that is notified just before any tab in this panel (nested under a dropdown or not) is shown.
|
com.google.gwt.event.shared.HandlerRegistration |
addShownHandler(org.gwtbootstrap3.client.shared.event.TabShownHandler tabShownHandler)
Registers a handler that is notified just after any tab in this panel (nested under a dropdown or not) is shown.
|
void |
clear()
Removes all tabs and content from this tab panel.
|
TabPanelEntry |
findEntryForTabWidget(org.gwtbootstrap3.client.ui.TabListItem tabWidget)
Finds the TabPanelEntry associated with the given tab widget, even if it's nested in a DropdownTab.
|
TabPanelEntry |
getActiveTab()
Returns the tab whose contents are currently being displayed.
|
int |
getSelectedTabIndex()
Returns the tab index associated with the current selected tab.
|
org.gwtbootstrap3.client.ui.NavTabs |
getTabBar() |
void |
init()
Creates an empty tab panel.
|
void |
insertItem(TabPanelEntry tab,
int index)
Adds a normal tab (not a dropdown) with the given label and contents (in a specific index).
|
boolean |
remove(TabPanelEntry tab)
Removes the given tab and its associated contents that were previously added with
addItem(String, Widget) . |
void |
selectTabIndex(int index) |
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
@UiField protected org.gwtbootstrap3.client.ui.NavTabs tabBar
@UiField protected org.gwtbootstrap3.client.ui.TabContent tabContent
public com.google.gwt.event.shared.HandlerRegistration addShowHandler(org.gwtbootstrap3.client.shared.event.TabShowHandler tabShowHandler)
tabShowHandler
- the handler that will receive the notifications.public com.google.gwt.event.shared.HandlerRegistration addShownHandler(org.gwtbootstrap3.client.shared.event.TabShownHandler tabShownHandler)
tabShownHandler
- the handler that will receive the notifications.@PostConstruct public void init()
public TabPanelEntry addItem(String label, com.google.gwt.user.client.ui.Widget content)
label
- the label for the tab itself.content
- the contents that should appear in the content area when the tab is selected.public void addItem(TabPanelEntry tab)
tab
- the label and contents associated with the new tab.public void insertItem(TabPanelEntry tab, int index)
tab
- the label and contents associated with the new tab.public org.gwtbootstrap3.client.ui.NavTabs getTabBar()
public boolean remove(TabPanelEntry tab)
addItem(String, Widget)
. Has no effect if the item is not currently in this tab panel.tab
- the item to remove.public TabPanelWithDropdowns.DropDownTab addDropdownTab(String label)
TabPanelWithDropdowns.DropDownTab.addItem(String, Widget)
and
DropDownTab#removeItem(String, Widget)
methods.label
- The text that should appear on the dropdown tab.public void addDropdownTab(TabPanelWithDropdowns.DropDownTab contents)
addDropdownTab(String)
and then removed.tab
- the tab to add backpublic void clear()
public TabPanelEntry getActiveTab()
public int getSelectedTabIndex()
public void selectTabIndex(int index)
public TabPanelEntry findEntryForTabWidget(org.gwtbootstrap3.client.ui.TabListItem tabWidget)
Copyright © 2012–2018 JBoss by Red Hat. All rights reserved.