org.gwtbootstrap3.client.ui
Class TabListItem

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by org.gwtbootstrap3.client.ui.base.ComplexWidget
                      extended by org.gwtbootstrap3.client.ui.base.AbstractListItem
                          extended by org.gwtbootstrap3.client.ui.base.AbstractAnchorListItem
                              extended by org.gwtbootstrap3.client.ui.AnchorListItem
                                  extended by org.gwtbootstrap3.client.ui.TabListItem
All Implemented Interfaces:
HasClickHandlers, HasAttachHandlers, HasHandlers, EventListener, Focusable, HasEnabled, HasText, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IndexedPanel, IndexedPanel.ForIsWidget, IsWidget, Iterable<Widget>, HasActive, HasDataTarget, HasDataToggle, HasHref, HasIcon, HasIconPosition, HasId, HasInlineStyle, HasPull, HasResponsiveness, HasTargetHistoryToken

public class TabListItem
extends AnchorListItem
implements HasDataTarget

List item for the nav tabs, needs special toggle and JS to make it work properly

Bootstrap Documentation

UiBinder example

 <b:NavTabs>
    <b:TabListItem/>
    <b:TabListItem/>
 </b:NavTabs>
 
 

Author:
Joshua Godi
See Also:
NavTabs

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
IndexedPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class org.gwtbootstrap3.client.ui.base.AbstractAnchorListItem
anchor
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Fields inherited from interface org.gwtbootstrap3.client.ui.base.HasHref
EMPTY_HREF, HREF
 
Constructor Summary
TabListItem()
          Creates the default widget with no text
TabListItem(String text)
          Creates the default widget with the desired text
 
Method Summary
 HandlerRegistration addShowHandler(TabShowHandler showHandler)
          Add a show handler for the tab
 HandlerRegistration addShownHandler(TabShownHandler shownHandler)
          Add a shown handler for the tab
 String getDataTarget()
          Gets the data target of the widget
 String getHref()
          Get the HREF of the widget
 String getHTML()
           
protected  void onLoad()
          
protected  void onShow(Event evt)
          Can be override by subclasses to handle Tabs's "show" event however it's recommended to add an event handler to the tab.
protected  void onShown(Event evt)
          Can be override by subclasses to handle Tabs's "shown" event however it's recommended to add an event handler to the tab.
protected  void onUnload()
          
 void setDataTarget(String dataTarget)
          Sets the data target for the widget
 void setDataTargetWidget(Widget widget)
           
 void setDataTargetWidgets(List<Widget> widgets)
           
 void setEnabled(boolean enabled)
          
 void setHref(String href)
          We override set href here because we want to ensure that projects with gwt places and gwtp don't try to execute a place change event with it being clicked
 void setHTML(String html)
           
 void showTab()
          Forces the tab pane associated with this list item to be shown and default fires the events
 void showTab(boolean fireEvents)
          Forces the tab pane associated with this list item to be shown
 
Methods inherited from class org.gwtbootstrap3.client.ui.AnchorListItem
getText, setText
 
Methods inherited from class org.gwtbootstrap3.client.ui.base.AbstractAnchorListItem
addClickHandler, getDataToggle, getIcon, getIconFlip, getIconPosition, getIconRotate, getIconSize, getTabIndex, getTargetHistoryToken, isIconBordered, isIconFixedWidth, isIconLight, isIconMuted, isIconSpin, setAccessKey, setDataToggle, setFocus, setIcon, setIconBordered, setIconFixedWidth, setIconFlip, setIconLight, setIconMuted, setIconPosition, setIconRotate, setIconSize, setIconSpin, setTabIndex, setTargetHistoryToken
 
Methods inherited from class org.gwtbootstrap3.client.ui.base.AbstractListItem
getId, getPull, isActive, isEnabled, setActive, setHiddenOn, setId, setPull, setVisibleOn
 
Methods inherited from class org.gwtbootstrap3.client.ui.base.ComplexWidget
add, insert, setColor, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

TabListItem

public TabListItem()
Creates the default widget with no text


TabListItem

public TabListItem(String text)
Creates the default widget with the desired text

Parameters:
text - text for the list item
Method Detail

showTab

public void showTab()
Forces the tab pane associated with this list item to be shown and default fires the events


showTab

public void showTab(boolean fireEvents)
Forces the tab pane associated with this list item to be shown

Parameters:
fireEvents - true=fire show/hide events, false=don't fire show/hide events

addShowHandler

public HandlerRegistration addShowHandler(TabShowHandler showHandler)
Add a show handler for the tab

Parameters:
showHandler - show handler
Returns:
HandlerRegistration to manage handles

addShownHandler

public HandlerRegistration addShownHandler(TabShownHandler shownHandler)
Add a shown handler for the tab

Parameters:
shownHandler - show handler
Returns:
HandlerRegistration to manage handles

setHref

public void setHref(String href)
We override set href here because we want to ensure that projects with gwt places and gwtp don't try to execute a place change event with it being clicked

Specified by:
setHref in interface HasHref
Overrides:
setHref in class AbstractAnchorListItem
Parameters:
href - String href

getHref

public String getHref()
Get the HREF of the widget

Specified by:
getHref in interface HasHref
Overrides:
getHref in class AbstractAnchorListItem
Returns:
String href

setDataTargetWidgets

public void setDataTargetWidgets(List<Widget> widgets)
Specified by:
setDataTargetWidgets in interface HasDataTarget

setDataTargetWidget

public void setDataTargetWidget(Widget widget)
Specified by:
setDataTargetWidget in interface HasDataTarget

setDataTarget

public void setDataTarget(String dataTarget)
Sets the data target for the widget

Specified by:
setDataTarget in interface HasDataTarget
Parameters:
dataTarget - data target string

getDataTarget

public String getDataTarget()
Gets the data target of the widget

Specified by:
getDataTarget in interface HasDataTarget
Returns:
data target

setEnabled

public void setEnabled(boolean enabled)

Specified by:
setEnabled in interface HasEnabled
Overrides:
setEnabled in class AbstractAnchorListItem

onLoad

protected void onLoad()

Overrides:
onLoad in class Widget

onUnload

protected void onUnload()

Overrides:
onUnload in class Widget

getHTML

public String getHTML()

setHTML

public void setHTML(String html)

onShow

protected void onShow(Event evt)
Can be override by subclasses to handle Tabs's "show" event however it's recommended to add an event handler to the tab.

Parameters:
evt - Event
See Also:
ShowEvent

onShown

protected void onShown(Event evt)
Can be override by subclasses to handle Tabs's "shown" event however it's recommended to add an event handler to the tab.

Parameters:
evt - Event
See Also:
ShownEvent


Copyright © 2015. All rights reserved.