|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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
public final class 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 { ... }
| Constructor Summary | |
|---|---|
DisclosurePanel()
Creates an empty DisclosurePanel that is initially closed. |
|
DisclosurePanel(DisclosurePanelImages images,
java.lang.String headerText,
boolean isOpen)
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. |
|
DisclosurePanel(java.lang.String headerText)
Creates a DisclosurePanel that will be initially closed using the specified text in the header. |
|
DisclosurePanel(java.lang.String headerText,
boolean isOpen)
Creates a DisclosurePanel with the specified header text and an initial open/close state. |
|
DisclosurePanel(Widget header)
Creates a DisclosurePanel that will be initially closed using a widget as the header. |
|
DisclosurePanel(Widget header,
boolean isOpen)
Creates a DisclosurePanel using a widget as the header and an initial open/close state. |
|
| Method Summary | |
|---|---|
void |
add(Widget w)
Adds a child widget. |
void |
addEventHandler(DisclosureHandler handler)
Attaches an event handler to the panel to receive DisclosureEvent
notification. |
void |
clear()
Removes all child widgets. |
Widget |
getContent()
Gets the widget that was previously set in setContent(Widget). |
Widget |
getHeader()
Gets the widget that is currently being used as a header. |
HasText |
getHeaderTextAccessor()
Gets a HasText instance to provide access to the headers's text, if
the header widget does provide such access. |
boolean |
isOpen()
Determines whether the panel is open. |
java.util.Iterator |
iterator()
Gets an iterator for the contained widgets. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
removeEventHandler(DisclosureHandler handler)
Removes an event handler from the panel. |
void |
setContent(Widget content)
Sets the content widget which can be opened and closed by this panel. |
void |
setHeader(Widget headerWidget)
Sets the widget used as the header for the panel. |
void |
setOpen(boolean isOpen)
Changes the visible state of this DisclosurePanel. |
| Methods inherited from class com.google.gwt.user.client.ui.Composite |
|---|
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DisclosurePanel()
public DisclosurePanel(DisclosurePanelImages images,
java.lang.String headerText,
boolean isOpen)
images - a bundle that provides disclosure panel specific imagesheaderText - the text to be displayed in the headerisOpen - the initial open/close state of the content panelpublic DisclosurePanel(java.lang.String headerText)
headerText - the text to be displayed in the header.
public DisclosurePanel(java.lang.String headerText,
boolean isOpen)
headerText - the text to be displayed in the headerisOpen - the initial open/close state of the content panelpublic DisclosurePanel(Widget header)
header - the widget to be used as a header
public DisclosurePanel(Widget header,
boolean isOpen)
header - the widget to be used as a headerisOpen - the initial open/close state of the content panel| Method Detail |
|---|
public void add(Widget w)
HasWidgets
add in interface HasWidgetsw - the widget to be addedpublic final void addEventHandler(DisclosureHandler handler)
DisclosureEvent
notification.
addEventHandler in interface FiresDisclosureEventshandler - the handler to be added (should not be null)public void clear()
HasWidgets
clear in interface HasWidgetspublic final Widget getContent()
setContent(Widget).
public final Widget getHeader()
public final HasText getHeaderTextAccessor()
HasText instance to provide access to the headers's text, if
the header widget does provide such access.
HasText,
null otherwisepublic final boolean isOpen()
true if panel is in open statepublic java.util.Iterator iterator()
HasWidgetsIterator.remove().
iterator in interface HasWidgetspublic boolean remove(Widget w)
HasWidgets
remove in interface HasWidgetsw - the widget to be removed
true if the widget was presentpublic final void removeEventHandler(DisclosureHandler handler)
removeEventHandler in interface FiresDisclosureEventshandler - the handler to be removedpublic final void setContent(Widget content)
content - the widget to be used as the content panelpublic final void setHeader(Widget headerWidget)
headerWidget - the widget to be used as the headerpublic final void setOpen(boolean isOpen)
DisclosurePanel.
isOpen - true to open the panel, false
to close
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||