
public class StackPanelExample implements EntryPoint {
public void onModuleLoad() {
// Create a stack panel containing three labels.
StackPanel panel = new StackPanel();
panel.add(new Label("Foo"), "foo");
panel.add(new Label("Bar"), "bar");
panel.add(new Label("Baz"), "baz");
// Add it to the root panel.
RootPanel.get().add(panel);
}
}
| StackPanel() | Creates an empty stack panel. |
| add(Widget) | Adds a new child with the given widget. |
| add(Widget, String) | Adds a new child with the given widget and header. |
| add(Widget, String, boolean) | Adds a new child with the given widget and header, optionally interpreting the header as HTML. |
| getSelectedIndex() | Gets the currently selected child index. |
| getWidget(int) | Gets the child widget at the specified index. |
| getWidgetCount() | Gets the number of child widgets in this panel. |
| getWidgetIndex(Widget) | Gets the index of the specified child widget. |
| onBrowserEvent(Event) | |
| remove(int) | Removes the widget at the specified index. |
| remove(Widget) | |
| setStackText(int, String) | Sets the text associated with a child by its index. |
| setStackText(int, String, boolean) | Sets the text associated with a child by its index. |
| showStack(int) | Shows the widget at the specified child index. |
true to treat the specified text as HTML-1 if it is not a child of
this panelfalse if the widget is not presenttrue to treat the specified text as HTML