java.lang.Object | ||||
↳ | com.google.gwt.user.client.ui.UIObject | |||
↳ | com.google.gwt.user.client.ui.Widget | |||
↳ | com.google.gwt.user.client.ui.Composite | |||
↳ | com.google.gwt.user.client.ui.TabBar |
Known Direct Subclasses |
A horizontal bar of folder-style tabs, most commonly used as part of a
TabPanel
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TabBar.Tab | Set of characteristic interfaces supported by TabBar tabs. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From interface
com.google.gwt.user.client.ui.KeyboardListener
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty tab bar.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new tab with the specified text.
| |||||||||||
Adds a new tab with the specified text.
| |||||||||||
Adds a new tab with the specified widget.
| |||||||||||
Adds a new tab with the specified text.
| |||||||||||
This method is deprecated.
Use
addBeforeSelectionHandler(BeforeSelectionHandler)
and addSelectionHandler(SelectionHandler) instead
| |||||||||||
Gets the tab that is currently selected.
| |||||||||||
Gets the given tab.
| |||||||||||
Gets the number of tabs present.
| |||||||||||
Gets the specified tab's HTML.
| |||||||||||
Inserts a new tab at the specified index.
| |||||||||||
Inserts a new tab at the specified index.
| |||||||||||
Inserts a new tab at the specified index.
| |||||||||||
Inserts a new tab at the specified index.
| |||||||||||
Check if a tab is enabled or disabled.
| |||||||||||
This method is deprecated.
add a
BeforeSelectionHandler instead. Alternatively, if
you need to access to the individual tabs, add a click handler to each
TabBar.Tab element instead.
| |||||||||||
This method is deprecated.
add a key down handler to the individual
TabBar.Tab objects
instead.
| |||||||||||
This method is deprecated.
this method has been doing nothing for the entire last release,
if what you wanted to do was to listen to key press events on tabs, add the
key press handler to the individual tab wrappers instead.
| |||||||||||
This method is deprecated.
this method has been doing nothing for the entire last release,
if what you wanted to do was to listen to key up events on tabs, add the
key up handler to the individual tab wrappers instead.
| |||||||||||
Removes the tab at the specified index.
| |||||||||||
This method is deprecated.
Instead use the
removeHandler()
call on the object returned by an add*Handler method
| |||||||||||
Programmatically selects the specified tab and fires events.
| |||||||||||
Programmatically selects the specified tab.
| |||||||||||
Enable or disable a tab.
| |||||||||||
Sets a tab's contents via HTML.
| |||||||||||
Sets a tab's contents via safe html.
| |||||||||||
Sets a tab's text contents.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a
SimplePanel that will wrap the contents in a tab. | |||||||||||
Inserts a new tab at the specified index.
| |||||||||||
Affected Elements:
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.Composite
| |||||||||||
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.logical.shared.HasBeforeSelectionHandlers | |||||||||||
From interface com.google.gwt.event.logical.shared.HasSelectionHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.ClickListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.KeyboardListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.SourcesTabEvents
|
Creates an empty tab bar.
Adds a new tab with the specified text.
html | the new tab's html |
---|
Adds a new tab with the specified text.
text | the new tab's text |
---|---|
asHTML | true to treat the specified text as html
|
Adds a new tab with the specified widget.
widget | the new tab's widget |
---|
Adds a new tab with the specified text.
text | the new tab's text |
---|
This method is deprecated.
Use addBeforeSelectionHandler(BeforeSelectionHandler)
and addSelectionHandler(SelectionHandler)
instead
Adds a listener interface to receive click events.
listener | the listener interface to add |
---|
Gets the tab that is currently selected.
Gets the given tab. This method is final because the Tab interface will expand. Therefore it is highly likely that subclasses which implemented this method would end up breaking.
index | the tab's index |
---|
Gets the number of tabs present.
Gets the specified tab's HTML.
index | the index of the tab whose HTML is to be retrieved |
---|
Inserts a new tab at the specified index.
text | the new tab's text |
---|---|
asHTML | true to treat the specified text as HTML |
beforeIndex | the index before which this tab will be inserted |
Inserts a new tab at the specified index.
text | the new tab's text |
---|---|
beforeIndex | the index before which this tab will be inserted |
Inserts a new tab at the specified index.
widget | widget to be used in the new tab |
---|---|
beforeIndex | the index before which this tab will be inserted |
Inserts a new tab at the specified index.
html | the new tab's html |
---|---|
beforeIndex | the index before which this tab will be inserted |
Check if a tab is enabled or disabled. If disabled, the user cannot select the tab.
index | the index of the tab |
---|
This method is deprecated.
add a BeforeSelectionHandler
instead. Alternatively, if
you need to access to the individual tabs, add a click handler to each
TabBar.Tab
element instead.
Fired when the user clicks on a widget.
sender | the widget sending the event. |
---|
This method is deprecated.
add a key down handler to the individual TabBar.Tab
objects
instead.
Fired when the user depresses a physical key.
sender | the widget that was focused when the event occurred. |
---|---|
keyCode | the physical key that was depressed. Constants for this value are defined in this interface with the KEY prefix. |
modifiers | the modifier keys pressed at when the event occurred. This
value is a combination of the bits defined by
MODIFIER_SHIFT ,
MODIFIER_CTRL , and
MODIFIER_ALT |
This method is deprecated.
this method has been doing nothing for the entire last release,
if what you wanted to do was to listen to key press events on tabs, add the
key press handler to the individual tab wrappers instead.
Fired when a keyboard action generates a character. This occurs after onKeyDown and onKeyUp are fired for the physical key that was pressed.
It should be noted that many browsers do not generate keypress events for
non-printing keyCode values, such as KEY_ENTER
or
arrow keys. These keyCodes can be reliably captured either with
onKeyDown(Widget, char, int)
or
onKeyUp(Widget, char, int)
.
sender | the widget that was focused when the event occurred. |
---|---|
keyCode | the Unicode character that was generated by the keyboard action. |
modifiers | the modifier keys pressed at when the event occurred. This
value is a combination of the bits defined by
MODIFIER_SHIFT ,
MODIFIER_CTRL , and
MODIFIER_ALT |
This method is deprecated.
this method has been doing nothing for the entire last release,
if what you wanted to do was to listen to key up events on tabs, add the
key up handler to the individual tab wrappers instead.
Fired when the user releases a physical key.
sender | the widget that was focused when the event occurred. |
---|---|
keyCode | the physical key that was released. Constants for this value are defined in this interface with the KEY prefix. |
modifiers | the modifier keys pressed at when the event occurred. This
value is a combination of the bits defined by
MODIFIER_SHIFT ,
MODIFIER_CTRL , and
MODIFIER_ALT |
Removes the tab at the specified index.
index | the index of the tab to be removed |
---|
This method is deprecated.
Instead use the removeHandler()
call on the object returned by an add*Handler method
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
Programmatically selects the specified tab and fires events. Use index -1 to specify that no tab should be selected.
index | the index of the tab to be selected |
---|
true
if successful, false
if the change
is denied by the BeforeSelectionHandler
.
Programmatically selects the specified tab. Use index -1 to specify that no tab should be selected.
index | the index of the tab to be selected |
---|---|
fireEvents | true to fire events, false not to |
true
if successful, false
if the change
is denied by the BeforeSelectionHandler
.
Enable or disable a tab. When disabled, users cannot select the tab.
index | the index of the tab to enable or disable |
---|---|
enabled | true to enable, false to disable |
Sets a tab's contents via HTML.
Use care when setting an object's HTML; it is an easy way to expose
script-based security problems. Consider using
setTabText(int, String)
or setTabHTML(int, SafeHtml)
whenever possible.
index | the index of the tab whose HTML is to be set |
---|---|
html | the tab new HTML |
Sets a tab's contents via safe html.
index | the index of the tab whose HTML is to be set |
---|---|
html | the tab new HTML |
Sets a tab's text contents.
index | the index of the tab whose text is to be set |
---|---|
text | the object's new text |
Create a SimplePanel
that will wrap the contents in a tab.
Subclasses can use this method to wrap tabs in decorator panels.
SimplePanel
to wrap the tab contents, or null to leave
tabs unwrapped
Inserts a new tab at the specified index.
widget | widget to be used in the new tab |
---|---|
beforeIndex | the index before which this tab will be inserted |
Affected Elements:
baseID | the base ID used by the main element |
---|