|
GWT 2.7.0 | |||||||
| 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.Panel
com.google.gwt.user.client.ui.HeaderPanel
public class HeaderPanel
A panel that includes a header (top), footer (bottom), and content (middle) area. The header and footer areas resize naturally. The content area is allocated all of the remaining space between the header and footer area.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
HasWidgets.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.Widget |
|---|
eventsToSink |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR |
| Constructor Summary | |
|---|---|
HeaderPanel()
|
|
| Method Summary | |
|---|---|
void |
add(Widget w)
Adds a widget to this panel. |
Widget |
getContentWidget()
Get the content widget that appears between the header and footer. |
Widget |
getFooterWidget()
Get the footer widget at the bottom of the panel. |
Widget |
getHeaderWidget()
Get the header widget at the top of the panel. |
java.util.Iterator<Widget> |
iterator()
Gets an iterator for the contained widgets. |
void |
onAttach()
This method is called when a widget is attached to the browser's document. |
void |
onDetach()
This method is called when a widget is detached from the browser's document. |
void |
onResize()
This method must be called whenever the implementor's size has been modified. |
boolean |
remove(Widget w)
Removes a child widget. |
void |
setContentWidget(Widget w)
Set the widget in the content portion between the header and footer. |
void |
setFooterWidget(Widget w)
Set the widget in the footer portion at the bottom of the panel. |
void |
setHeaderWidget(Widget w)
Set the widget in the header portion at the top of the panel. |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HeaderPanel()
| Method Detail |
|---|
public void add(Widget w)
add in interface HasWidgetsadd in class Panelw - the child widget to be addedHasWidgets.add(Widget)public Widget getContentWidget()
Widgetpublic Widget getFooterWidget()
Widgetpublic Widget getHeaderWidget()
Widgetpublic java.util.Iterator<Widget> iterator()
HasWidgetsIterator.remove().
iterator in interface HasWidgetsiterator in interface java.lang.Iterable<Widget>public void onAttach()
Widget
This method is called when a widget is attached to the browser's document.
To receive notification after a Widget has been added to the document,
override the Widget.onLoad() method or use Widget.addAttachHandler(com.google.gwt.event.logical.shared.AttachEvent.Handler).
It is strongly recommended that you override Widget.onLoad() or
Widget.doAttachChildren() instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onAttach() to ensure that the Widget has been attached
to its underlying Element.
onAttach in class WidgetWidget.onLoad(),
Widget.doAttachChildren()public void onDetach()
Widget
This method is called when a widget is detached from the browser's
document. To receive notification before a Widget is removed from the
document, override the Widget.onUnload() method or use Widget.addAttachHandler(com.google.gwt.event.logical.shared.AttachEvent.Handler).
It is strongly recommended that you override Widget.onUnload() or
Widget.doDetachChildren() instead of this method to avoid inconsistencies
between logical and physical attachment states.
Subclasses that override this method must call
super.onDetach() to ensure that the Widget has been detached
from the underlying Element. Failure to do so will result in application
memory leaks due to circular references between DOM Elements and JavaScript
objects.
onDetach in class WidgetWidget.onUnload(),
Widget.doDetachChildren()public void onResize()
RequiresResize
onResize in interface RequiresResizepublic boolean remove(Widget w)
PanelHow 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.Panel.orphan(Widget) first while the child
Widget is still attached.WidgetCollection.
remove in interface HasWidgetsremove in class Panelw - the widget to be removed
true if the child was presentpublic void setContentWidget(Widget w)
w - the widget to use as the contentpublic void setFooterWidget(Widget w)
w - the widget to use as the footerpublic void setHeaderWidget(Widget w)
w - the widget to use as the header
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||