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 |
Known Direct Subclasses |
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.
This widget will only work in quirks mode. If your application is in
Standards Mode, use StackLayoutPanel
instead.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty stack panel.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new child with the given widget and header, optionally interpreting
the header as HTML.
| |||||||||||
Adds a new child with the given widget and header.
| |||||||||||
Adds a new child with the given widget and header, optionally interpreting
the header as HTML.
| |||||||||||
Adds a child widget.
| |||||||||||
Gets the currently selected child index.
| |||||||||||
Inserts a child widget before the specified index.
| |||||||||||
Fired whenever a browser event is received.
| |||||||||||
Removes a child widget.
| |||||||||||
Removes the widget at the specified index.
| |||||||||||
Sets the text associated with a child by its index.
| |||||||||||
Sets the text associated with a child by its index.
| |||||||||||
Sets the html associated with a child by its index.
| |||||||||||
Shows the widget at the specified child index.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Affected Elements:
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.ComplexPanel
| |||||||||||
From class
com.google.gwt.user.client.ui.Panel
| |||||||||||
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IndexedPanel
| |||||||||||
From interface
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.InsertPanel
| |||||||||||
From interface
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
java.lang.Iterable
|
Creates an empty stack panel.
Adds a new child with the given widget and header, optionally interpreting the header as HTML.
w | the widget to be added |
---|---|
stackHtml | the header html associated with this widget |
Adds a new child with the given widget and header.
w | the widget to be added |
---|---|
stackText | the header text associated with this widget |
Adds a new child with the given widget and header, optionally interpreting the header as HTML.
w | the widget to be added |
---|---|
stackText | the header text associated with this widget |
asHTML | true to treat the specified text as HTML
|
Adds a child widget.
How to Override this Method
There are several important things that must take place in the correct order to properly add or insert a Widget to a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
adjustIndex(Widget, int)
.removeFromParent()
on the
Widget.WidgetCollection
at the appropriate index.adopt(Widget)
to finalize the add as the
very last step.w | the widget to be added |
---|
Gets the currently selected child index.
Inserts a child widget before the specified index. If the widget is already a child of this panel, it will be moved to the specified index.
w | the child widget to be inserted |
---|---|
beforeIndex | the index before which it will be inserted |
Fired whenever a browser event is received.
event | the event received |
---|
Removes a child widget.
How to Override this Method
There are several important things that must take place in the correct order to properly remove a Widget from a Panel. Not all of these steps will be relevant to every Panel, but all of the steps must be considered.
false
if it is not.orphan(Widget)
first while the child
Widget is still attached.WidgetCollection
.child | the widget to be removed |
---|
true
if the child was present
Removes the widget at the specified index.
index | the index of the widget to be removed |
---|
false
if the widget is not present
Sets the text associated with a child by its index.
index | the index of the child whose text is to be set |
---|---|
text | the text to be associated with it |
asHTML | true to treat the specified text as HTML
|
Sets the text associated with a child by its index.
index | the index of the child whose text is to be set |
---|---|
text | the text to be associated with it |
Sets the html associated with a child by its index.
index | the index of the child whose text is to be set |
---|---|
html | the html to be associated with it |
Shows the widget at the specified child index.
index | the index of the child to be shown |
---|
Affected Elements:
baseID | the base ID used by the main element |
---|