Google Web Toolkit
Search Google Code:

# Class DeckPanel

public class DeckPanel
extends ComplexPanel
A panel that displays all of its child widgets in a 'deck', where only one can be visible at a time. It is used by TabPanel.

Once a widget has been added to a DeckPanel, its visibility, width, and height attributes will be manipulated. When the widget is removed from the DeckPanel, it will be visible, and its width and height attributes will be cleared.

## Constructors

DeckPanel() | Creates an empty deck panel.

## Methods

add(Widget) | Adds the specified widget to the deck.
getVisibleWidget() | Gets the index of the currently-visible widget.
insert(Widget, int) | Inserts a widget before the specified index.
remove(Widget) |
showWidget(int) | Shows the widget at the specified index.

## Constructor Detail

### DeckPanel

public DeckPanel()
Creates an empty deck panel.

## Method Detail

### add

public void add(Widget w)
Adds the specified widget to the deck.

#### Parameters

w
  the widget to be added

### getVisibleWidget

public int getVisibleWidget()
Gets the index of the currently-visible widget.

#### Return Value

the visible widget's index

### insert

public void insert(Widget w, int beforeIndex)
Inserts a widget before the specified index.

#### Parameters

w
  the widget to be inserted
beforeIndex
  the index before which it will be inserted

### remove

public boolean remove(Widget w)

#### Parameters

w

### showWidget

public void showWidget(int index)
Shows the widget at the specified index. This causes the currently- visible widget to be hidden.

#### Parameters

index
  the index of the widget to be shown