## com.google.gwt.user.client.ui
Interface TabListener

All Superinterfaces:
  java.util.EventListener

All Known Implementing Classes:
  TabPanel

public interface TabListener
extends java.util.EventListener

Event listener interface for tab events, used primarily by `TabBar` and `TabPanel`.

Method Summary
`boolean` `onBeforeTabSelected(SourcesTabEvents sender, int tabIndex)` Fired just before a tab is selected.
`void` `onTabSelected(SourcesTabEvents sender, int tabIndex)` 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
  Returns:
    `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