Class DisclosurePanel

java.lang.Object
All Implemented Interfaces:
HasAttachHandlers, HasCloseHandlers<DisclosurePanel>, HasOpenHandlers<DisclosurePanel>, HasHandlers, EventListener, FiresDisclosureEvents, HasAnimation, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IsRenderable, IsWidget, Iterable<Widget>

A widget that consists of a header and a content panel that discloses the content when a user clicks on the header.

CSS Style Rules

.gwt-DisclosurePanel
the panel's primary style
.gwt-DisclosurePanel-open
dependent style set when panel is open
.gwt-DisclosurePanel-closed
dependent style set when panel is closed

The header and content sections can be easily selected using css with a child selector:
.gwt-DisclosurePanel-open .header { ... }

Use in UiBinder Templates

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>