public class Tab extends Object implements IsWidget, HasWidgets, HasClickHandlers, HasStyle, IsResponsive, HasIcon, HasEnabled
TabPanel.
It's for UiBinder. Tab class provide easy syntax on UiBinder.
Example:
<b:TabPanel>
<b:Tab heading="Typically">
<b:Heading size="3">Typically Tab</b:Heading>
<b:Paragraph>
huhuhu hahha
</b:Paragraph>
</b:Tab>
<b:Tab heading="Custom">
<b:customTab>
<b:Image resources="{res.logo}"/>
</b:customTab>
<b:Heading size="3">CustomTab Tab</b:Heading>
</b:Tab>
</b:TabPanel>
}
HasWidgets.ForIsWidget| Constructor and Description |
|---|
Tab()
Create tmpy tab
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Widget w)
Add widget to tab pane.
|
HandlerRegistration |
addClickHandler(ClickHandler handler)
add ClickEventHandler to TabLink
|
void |
addDecorate(Widget w) |
void |
addStyle(Style style)
add TabLink style
Adds the provided style to the widget.
|
TabLink |
asTabLink()
Return TabLink
|
Widget |
asWidget()
Tab as a TabLink
|
void |
clear()
Clear tab pane children
|
void |
fireEvent(GwtEvent<?> event)
fire TabLink event
|
String |
getHeading()
Get Tab text
|
protected TabPane |
getTabPane()
Get Container TabPane
|
boolean |
isActive()
has active style name
|
boolean |
isEnabled()
Returns true if the widget is enabled, false if not.
|
Iterator<Widget> |
iterator()
|
boolean |
remove(Widget w)
|
void |
removeStyle(Style style)
remove TabLink style
Removes the provided style from the widget.
|
void |
setActive(boolean active)
Set tab active
|
void |
setBaseIcon(BaseIconType type)
Sets the BaseType of the Icon.
|
void |
setCustomIconStyle(String customIconStyle)
Set custom icon style.
|
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled.
|
void |
setHeading(String text)
Set tab text
|
void |
setHideOn(Device device)
Set TabLink and TabPane show on device.
|
void |
setIcon(IconType type)
set TabLink icon type.
|
void |
setIconPosition(IconPosition position)
Set icon position , left or right
|
void |
setIconSize(IconSize size)
Set TabLink icon size
Sets the size of the icon.
|
void |
setShowOn(Device device)
Set TabLink and TabPane show on device.
|
void |
setStyle(Style style)
set TabLink style
Replaces the widet's style with the provided one.
|
public Tab()
public boolean isEnabled()
isEnabled in interface HasEnabledpublic void setEnabled(boolean enabled)
setEnabled in interface HasEnabledenabled - true to enable the widget, false
to disable itprotected TabPane getTabPane()
public void setActive(boolean active)
active - public boolean isActive()
public void setHeading(String text)
text - tab textpublic String getHeading()
public void add(Widget w)
add in interface HasWidgetspublic void clear()
clear in interface HasWidgetspublic Iterator<Widget> iterator()
iterator in interface HasWidgetsiterator in interface Iterable<Widget>public boolean remove(Widget w)
remove in interface HasWidgetsComplexPanel.remove(Widget) resultpublic HandlerRegistration addClickHandler(ClickHandler handler)
addClickHandler in interface HasClickHandlerspublic void setBaseIcon(BaseIconType type)
setBaseIcon in interface HasIconpublic void setIconSize(IconSize size)
Default is DEFAULT.
setIconSize in interface HasIconsize - the new size.public void setShowOn(Device device)
The widget is not shown on any other device.
Only works if responsive design is turned on!
setShowOn in interface IsResponsiveConfigurator.hasResponsiveDesign(),
IsResponsive.setHideOn(Device)public void setHideOn(Device device)
The widget is not hidden on any other device.
Only works if responsive design is turned on!
setHideOn in interface IsResponsiveConfigurator.hasResponsiveDesign(),
IsResponsive.setShowOn(Device)public void setStyle(Style style)
public void removeStyle(Style style)
removeStyle in interface HasStylestyle - the style to be removed from the Widget.public void fireEvent(GwtEvent<?> event)
fireEvent in interface HasHandlers@UiChild(limit=1, tagname="customTab") public void addDecorate(Widget w)
public void setCustomIconStyle(String customIconStyle)
It sets css class name to <i> tag. You can set any icons style.
setCustomIconStyle in interface HasIconpublic void setIconPosition(IconPosition position)
setIconPosition in interface HasIconposition - icon's positionCopyright © 2012-2014 gwtbootstrap. All Rights Reserved.