GWT 2.4.0

com.google.gwt.user.client.ui
Class SimpleLayoutPanel

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.SimpleLayoutPanel
All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, AcceptsOneWidget, HasOneWidget, HasVisibility, HasWidgets, HasWidgets.ForIsWidget, IsWidget, ProvidesResize, RequiresResize, java.lang.Iterable<Widget>

public class SimpleLayoutPanel
extends SimplePanel
implements RequiresResize, ProvidesResize

A simple panel that ProvidesResize to its one child.


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.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
SimpleLayoutPanel()
           
 
Method Summary
protected  void onLoad()
          This method is called immediately after a widget becomes attached to the browser's document.
 void onResize()
          This method must be called whenever the implementor's size has been modified.
protected  void onUnload()
          This method is called immediately before a widget will be detached from the browser's document.
 boolean remove(Widget w)
          Removes a child widget.
 void setWidget(Widget w)
          Sets this panel's widget.
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents
 
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, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLayoutPanel

public SimpleLayoutPanel()
Method Detail

onResize

public void onResize()
Description copied from interface: RequiresResize
This method must be called whenever the implementor's size has been modified.

Specified by:
onResize in interface RequiresResize

remove

public boolean remove(Widget w)
Description copied from class: Panel
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.

  1. Validate: Make sure this Panel is actually the parent of the child Widget; return false if it is not.
  2. Orphan: Call Panel.orphan(Widget) first while the child Widget is still attached.
  3. Physical Detach: Adjust the DOM to account for the removal of the child Widget. The Widget's Element must be physically removed from the DOM.
  4. Logical Detach: Update the Panel's state variables to reflect the removal of the child Widget. Example: the Widget is removed from the Panel's WidgetCollection.

Specified by:
remove in interface HasWidgets
Overrides:
remove in class SimplePanel
Parameters:
w - the widget to be removed
Returns:
true if the child was present

setWidget

public void setWidget(Widget w)
Description copied from class: SimplePanel
Sets this panel's widget. Any existing child widget will be removed.

Specified by:
setWidget in interface HasOneWidget
Overrides:
setWidget in class SimplePanel
Parameters:
w - the panel's new widget, or null to clear the panel

onLoad

protected void onLoad()
Description copied from class: Widget
This method is called immediately after a widget becomes attached to the browser's document.

Overrides:
onLoad in class Widget

onUnload

protected void onUnload()
Description copied from class: Widget
This method is called immediately before a widget will be detached from the browser's document.

Overrides:
onUnload in class Widget

GWT 2.4.0