Class Index | File Index

Classes


Class zwt.ui.tab.TabPanel


Extends zwt.ui.container.MultipleContainer.

A tab panel widget that is composed of a tab bar and a deck panel. Each widget in the deck panel is linked to a tab item in the tab bar.

CSS rules

.zwt_tabPanel {}
.zwt_tabPanel-top {}
.zwt_tabPanel-right {}
.zwt_tabPanel-bottom {}
.zwt_tabPanel-left {}
.zwt_tabPanel .zwt_tabBar {}
.zwt_tabPanel .zwt_deckPanel {}
.zwt_tabPanel .zwt_tabBar .zwt_tabBarItem {}
.zwt_tabPanel .zwt_tabBar .zwt_tabBarItem-selected {}

Defined in: TabPanel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
zwt.ui.tab.TabPanel(int_tabPlacement)
Construct a tab panel.
Field Summary
Field Attributes Field Name and Description
<static>  
zwt.ui.tab.TabPanel.BOTTOM
Indicate that the tab bar is on the bottom of the panel
<static>  
zwt.ui.tab.TabPanel.LEFT
Indicate that the tab bar is on the left of the panel
<static>  
zwt.ui.tab.TabPanel.RIGHT
Indicate that the tab bar is on the right of the panel
<static>  
zwt.ui.tab.TabPanel.TOP
Indicate that the tab bar is on the top of the panel
Method Summary
Method Attributes Method Name and Description
 
add(zwt_ui_Widget_widget, zwt_ui_tab_TabItem_item)
Add a widget to the panel linked to the specified tab item.
 
Deselect the current selected tab.
 
Return the current active widget.
 
Return the deck panel.
 
getTabAt(int_index)
Return the tab item at the specified index.
 
Return the tab bar.
 
Return the tab event manager attached to the panel's tab bar.
 
 
insert(zwt_ui_Widget_widget, int_index, zwt_ui_tab_TabItem_item)
Insert a widget in the panel linked to the specified tab item at the specified location.
 
processContentEvent(zwt_ui_container_ContentEvent_event)
Process the specified content event.
 
processFocusEvent(zwt_event_FocusEvent_event)
Delegate the processing of focus event to the underlying panel.
 
remove(zwt_ui_Widget_widget, boolean_selectNeighbor)
Remove the specified widget and optionally select the neighbor tab if the tab to remove is selected.
 
removeAt(int_index, boolean_selectNeighbor)
Remove the tab and the widget at the specified index and optionally select the neighbor tab if the tab to remove is selected.
 
select(zwt_ui_Widget_widget, boolean_scroll, boolean_animate)
Select the specified widget.
 
selectAt(int_index, boolean_scroll, boolean_animate)
Select the widget at the specified index.
 
selectTab(zwt_ui_tab_TabItem_item, boolean_scroll, boolean_animate)
Select the specified tab.
Methods borrowed from class zwt.ui.container.MultipleContainer:
clear, get, getLength, indexOf, isFocusable
Methods borrowed from class zwt.ui.container.Container:
getContentEventManager, isFocusContainer, setFocusContainer
Methods borrowed from class zwt.ui.Widget:
addStyle, draw, getContextFill, getDimension, getElement, getElementDimension, getFill, getFocusEventManager, getId, getKeyboardEventManager, getParent, getRelativeLeft, getRelativeTop, getStyle, getWheelEventManager, hasFocus, hasStyle, isVisible, onEvent, processEvent, processKeyboardEvent, processWheelEvent, redraw, removeStyle, replaceStyle, setFill, setFocusable, setId, setStyle, setVisible
Class Detail
zwt.ui.tab.TabPanel(int_tabPlacement)
Construct a tab panel.
Author: Jeremy KUHN.
Parameters:
{Integer} int_tabPlacement
the tab placement of the panel (one of zwt.ui.tab.TabPanel.TOP, zwt.ui.tab.TabPanel.LEFT, zwt.ui.tab.TabPanel.BOTTOM, zwt.ui.tab.TabPanel.RIGHT)
See:
zwt.ui.tab.TabItem
zwt.ui.tab.TabBar
zwt.ui.panel.DeckPanel
Field Detail
<static> {Integer} zwt.ui.tab.TabPanel.BOTTOM
Indicate that the tab bar is on the bottom of the panel

<static> {Integer} zwt.ui.tab.TabPanel.LEFT
Indicate that the tab bar is on the left of the panel

<static> {Integer} zwt.ui.tab.TabPanel.RIGHT
Indicate that the tab bar is on the right of the panel

<static> {Integer} zwt.ui.tab.TabPanel.TOP
Indicate that the tab bar is on the top of the panel
Method Detail
add(zwt_ui_Widget_widget, zwt_ui_tab_TabItem_item)
Add a widget to the panel linked to the specified tab item.
Parameters:
{zwt.ui.Widget} zwt_ui_Widget_widget
The widget to add
{zwt.ui.tab.TabItem} zwt_ui_tab_TabItem_item
The tab item to add

deselect()
Deselect the current selected tab.

{zwt.ui.Widget} getActiveWidget()
Return the current active widget.
Returns:
The active widget

{zwt.ui.panel.DeckPanel} getDeckPanel()
Return the deck panel.
Returns:
The deck panel

{zwt.ui.tab.TabItem} getTabAt(int_index)
Return the tab item at the specified index.
Parameters:
{Integer} int_index
The index of the Tab item in the tab bar
Returns:
A Tab item or null if there's no item in the tab bar at the specified index

{zwt.ui.tab.TabBar} getTabBar()
Return the tab bar.
Returns:
The tab bar

{zwt.ui.tab.TabEventManager} getTabEventManager()
Return the tab event manager attached to the panel's tab bar.
Returns:
The tab event manager

{Integer} getTabPlacement()
Return the tab placement of the panel (one of zwt.ui.tab.TabPanel.TOP, zwt.ui.tab.TabPanel.LEFT, zwt.ui.tab.TabPanel.BOTTOM, zwt.ui.tab.TabPanel.RIGHT).
Returns:
The tab placement.

insert(zwt_ui_Widget_widget, int_index, zwt_ui_tab_TabItem_item)
Insert a widget in the panel linked to the specified tab item at the specified location.
Parameters:
{zwt.ui.Widget} zwt_ui_Widget_widget
The widget to insert
{Integer} int_index
The index where to insert the widget
{zwt.ui.tab.TabItem} zwt_ui_tab_TabItem_item
The tab item to link to the widget

processContentEvent(zwt_ui_container_ContentEvent_event)
Process the specified content event.

This implementation simply notifies the content event manager.

Parameters:
{zwt.ui.container.ContentEvent} zwt_ui_container_ContentEvent_event
The content event to process

processFocusEvent(zwt_event_FocusEvent_event)
Delegate the processing of focus event to the underlying panel.
Parameters:
{zwt.event.FocusEvent} zwt_event_FocusEvent_event
The focus event to process

remove(zwt_ui_Widget_widget, boolean_selectNeighbor)
Remove the specified widget and optionally select the neighbor tab if the tab to remove is selected.
Parameters:
{Integer} zwt_ui_Widget_widget
The widget to remove
{Boolean} boolean_selectNeighbor
true to select the neighbor tab, false otherwise

removeAt(int_index, boolean_selectNeighbor)
Remove the tab and the widget at the specified index and optionally select the neighbor tab if the tab to remove is selected.
Parameters:
{Integer} int_index
The index of the tab to remove
{Boolean} boolean_selectNeighbor
true to select the neighbor tab, false otherwise

select(zwt_ui_Widget_widget, boolean_scroll, boolean_animate)
Select the specified widget. This method will select the tab item and show the specified widget.
Parameters:
{zwt.ui.Widget} zwt_ui_Widget_widget
The widget to select
{Boolean} boolean_scroll
true to scroll to the tab, true by default
{Boolean} boolean_animate
true to use scroll animation, false by default

selectAt(int_index, boolean_scroll, boolean_animate)
Select the widget at the specified index. This method will select the tab item and show the widget.
Parameters:
{Integer} int_index
The index of the widget item to select
{Boolean} boolean_scroll
true to scroll to the tab, true by default
{Boolean} boolean_animate
true to use scroll animation, false by default

selectTab(zwt_ui_tab_TabItem_item, boolean_scroll, boolean_animate)
Select the specified tab. This method will select the specified tab item and show the specified widget.
Parameters:
{zwt.ui.tab.TabItem} zwt_ui_tab_TabItem_item
The tab item to select
{Boolean} boolean_scroll
true to scroll to the tab, true by default
{Boolean} boolean_animate
true to use scroll animation, false by default

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jan 12 2012 02:07:53 GMT+0100 (CET)