| java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.google.gwt.user.client.ui.Panel com.google.gwt.user.client.ui.ComplexPanel com.google.gwt.user.client.ui.StackPanel
StackPanel | public class StackPanel extends ComplexPanel (Code) | | A panel that stacks its children vertically, displaying only one at a time,
with a header for each child which the user can click to display.
CSS Style Rules
- .gwt-StackPanel { the panel itself }
- .gwt-StackPanel .gwt-StackPanelItem { unselected items }
- .gwt-StackPanel .gwt-StackPanelItem-selected { selected items }
- .gwt-StackPanel .gwt-StackPanelContent { the wrapper around the contents
of the item }
Example
|
Constructor Summary | |
public | StackPanel() Creates an empty stack panel. |
Method Summary | |
public void | add(Widget w) Adds a new child with the given widget. | public void | add(Widget w, String stackText) Adds a new child with the given widget and header. | public void | add(Widget w, String stackText, boolean asHTML) Adds a new child with the given widget and header, optionally interpreting
the header as HTML. | public int | getSelectedIndex() Gets the currently selected child index. | public void | insert(Widget w, int beforeIndex) Inserts a widget before the specified index. | public void | onBrowserEvent(Event event) | public boolean | remove(int index) | public boolean | remove(Widget child) | public void | setStackText(int index, String text) Sets the text associated with a child by its index. | public void | setStackText(int index, String text, boolean asHTML) Sets the text associated with a child by its index. | public void | showStack(int index) Shows the widget at the specified child index. |
StackPanel | public StackPanel()(Code) | | Creates an empty stack panel.
|
add | public void add(Widget w)(Code) | | Adds a new child with the given widget.
Parameters: w - the widget to be added |
add | public void add(Widget w, String stackText)(Code) | | Adds a new child with the given widget and header.
Parameters: w - the widget to be added Parameters: stackText - the header text associated with this widget |
add | public void add(Widget w, String stackText, boolean asHTML)(Code) | | Adds a new child with the given widget and header, optionally interpreting
the header as HTML.
Parameters: w - the widget to be added Parameters: stackText - the header text associated with this widget Parameters: asHTML - true to treat the specified text as HTML |
getSelectedIndex | public int getSelectedIndex()(Code) | | Gets the currently selected child index.
selected child |
insert | public void insert(Widget w, int beforeIndex)(Code) | | Inserts a widget before the specified index.
Parameters: w - the widget to be inserted Parameters: beforeIndex - the index before which it will be inserted throws: IndexOutOfBoundsException - if beforeIndex is out ofrange |
onBrowserEvent | public void onBrowserEvent(Event event)(Code) | | |
remove | public boolean remove(int index)(Code) | | |
setStackText | public void setStackText(int index, String text)(Code) | | Sets the text associated with a child by its index.
Parameters: index - the index of the child whose text is to be set Parameters: text - the text to be associated with it |
setStackText | public void setStackText(int index, String text, boolean asHTML)(Code) | | Sets the text associated with a child by its index.
Parameters: index - the index of the child whose text is to be set Parameters: text - the text to be associated with it Parameters: asHTML - true to treat the specified text as HTML |
showStack | public void showStack(int index)(Code) | | Shows the widget at the specified child index.
Parameters: index - the index of the child to be shown |
|
|