Google Web Toolkit
Search Google Code:

# Interface TabListener

public interface TabListener
extends EventListener
// Implemented by `TabPanel`
Event listener interface for tab events, used primarily by TabBar and TabPanel.

## Methods

onBeforeTabSelected(SourcesTabEvents, int) | Fired just before a tab is selected.
onTabSelected(SourcesTabEvents, int) | Fired when a tab is selected.

## Method Detail

### onBeforeTabSelected

public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex)
Fired just before a tab is selected.

#### Parameters

sender
  the TabBar or TabPanel whose tab was selected.
tabIndex
  the index of the tab about to be selected

#### Return Value

`false` to disallow the selection. If any listener returns false, then the selection will be disallowed.

### onTabSelected

public void onTabSelected(SourcesTabEvents sender, int tabIndex)
Fired when a tab is selected.

#### Parameters

sender
  the TabBar or TabPanel whose tab was selected
tabIndex
  the index of the tab that was selected