java.lang.Object | ||||
↳ | com.google.gwt.user.client.ui.UIObject | |||
↳ | com.google.gwt.user.client.ui.Widget | |||
↳ | com.google.gwt.user.client.ui.Composite | |||
↳ | com.google.gwt.user.client.ui.DisclosurePanel |
A widget that consists of a header and a content panel that discloses the content when a user clicks on the header.
The header and content sections can be easily selected using css with a child
selector:
.gwt-DisclosurePanel-open .header { ... }
DisclosurePanel elements in
UiBinder
templates can
have one widget child and one of two types of header elements. A
<g:header> element can hold text (not html), or a <g:customHeader> element
can hold a widget. (Note that the tags of the header elements are not
capitalized. This is meant to signal that the header is not a runtime object,
and so cannot have a ui:field
attribute.)
For example:
<g:DisclosurePanel> <g:header>Text header</g:header> <g:Label>Widget body</g:Label> </g:DisclosurePanel> <g:DisclosurePanel> <g:customHeader> <g:Label>Widget header</g:Label> </g:customHeader> <g:Label>Widget body</g:Label> </g:DisclosurePanel>
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty DisclosurePanel that is initially closed.
| |||||||||||
This constructor is deprecated.
use
DisclosurePanel(ImageResource, ImageResource, String)
and setOpen(boolean)
| |||||||||||
Creates a DisclosurePanel with the specified header text, an initial
open/close state and a bundle of images to be used in the default header
widget.
| |||||||||||
Creates a DisclosurePanel that will be initially closed using the specified
text in the header.
| |||||||||||
This constructor is deprecated.
use
DisclosurePanel(String) and
setOpen(boolean)
| |||||||||||
This constructor is deprecated.
use
DisclosurePanel() and setHeader(Widget)
| |||||||||||
This constructor is deprecated.
use
DisclosurePanel() , setOpen(boolean) and
setHeader(Widget) instead
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a child widget.
| |||||||||||
This method is deprecated.
Use
addOpenHandler(OpenHandler) and
addCloseHandler(CloseHandler) instead
| |||||||||||
Removes all child widgets.
| |||||||||||
Gets the widget that was previously set in
setContent(Widget) . | |||||||||||
Gets the widget that is currently being used as a header.
| |||||||||||
Gets a
HasText instance to provide access to the headers's text, if
the header widget does provide such access. | |||||||||||
Returns true if animations are enabled, false if not.
| |||||||||||
Determines whether the panel is open.
| |||||||||||
Gets an iterator for the contained widgets.
| |||||||||||
Removes a child widget.
| |||||||||||
This method is deprecated.
Use the
removeHandler() method on the
object returned by an add*Handler method instead
| |||||||||||
Enable or disable animations.
| |||||||||||
Sets the content widget which can be opened and closed by this panel.
| |||||||||||
Sets the widget used as the header for the panel.
| |||||||||||
Changes the visible state of this
DisclosurePanel . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Affected Elements:
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.Composite
| |||||||||||
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.logical.shared.HasCloseHandlers | |||||||||||
From interface com.google.gwt.event.logical.shared.HasOpenHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.FiresDisclosureEvents
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasAnimation
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasWidgets
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
java.lang.Iterable
|
Creates an empty DisclosurePanel that is initially closed.
This constructor is deprecated.
use
DisclosurePanel(ImageResource, ImageResource, String)
and setOpen(boolean)
Creates a DisclosurePanel with the specified header text, an initial open/close state and a bundle of images to be used in the default header widget.
images | a bundle that provides disclosure panel specific images |
---|---|
headerText | the text to be displayed in the header |
isOpen | the initial open/close state of the content panel |
Creates a DisclosurePanel with the specified header text, an initial open/close state and a bundle of images to be used in the default header widget.
openImage | the open state image resource |
---|---|
closedImage | the closed state image resource |
headerText | the text to be displayed in the header |
Creates a DisclosurePanel that will be initially closed using the specified text in the header.
headerText | the text to be displayed in the header |
---|
This constructor is deprecated.
use DisclosurePanel(String)
and
setOpen(boolean)
Creates a DisclosurePanel with the specified header text and an initial open/close state.
headerText | the text to be displayed in the header |
---|---|
isOpen | the initial open/close state of the content panel |
This constructor is deprecated.
use DisclosurePanel()
and setHeader(Widget)
Creates a DisclosurePanel that will be initially closed using a widget as the header.
header | the widget to be used as a header |
---|
This constructor is deprecated.
use DisclosurePanel()
, setOpen(boolean)
and
setHeader(Widget)
instead
Creates a DisclosurePanel using a widget as the header and an initial open/close state.
header | the widget to be used as a header |
---|---|
isOpen | the initial open/close state of the content panel |
This method is deprecated.
Use addOpenHandler(OpenHandler)
and
addCloseHandler(CloseHandler)
instead
Attaches an event handler to the panel to receive DisclosureEvent
notification.
handler | the handler to be added (should not be null) |
---|
Removes all child widgets.
Gets the widget that was previously set in setContent(Widget)
.
Gets the widget that is currently being used as a header.
Returns true if animations are enabled, false if not.
Determines whether the panel is open.
true
if panel is in open state
Gets an iterator for the contained widgets. This iterator is required to
implement remove()
.
Removes a child widget.
w | the widget to be removed |
---|
true
if the widget was present
This method is deprecated.
Use the removeHandler()
method on the
object returned by an add*Handler method instead
Removes an event handler from the panel.
handler | the handler to be removed |
---|
Enable or disable animations.
enable | true to enable, false to disable |
---|
Sets the content widget which can be opened and closed by this panel. If there is a preexisting content widget, it will be detached.
content | the widget to be used as the content panel |
---|
Sets the widget used as the header for the panel.
headerWidget | the widget to be used as the header |
---|
Changes the visible state of this DisclosurePanel
.
isOpen | true to open the panel, false to
close
|
---|
Affected Elements:
baseID | the base ID used by the main element |
---|