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

java.lang.Object
  extended bycom.google.gwt.user.client.ui.UIObject
      extended bycom.google.gwt.user.client.ui.Widget
          extended bycom.google.gwt.user.client.ui.Panel
All Implemented Interfaces:
EventListener, HasWidgets
Direct Known Subclasses:
ComplexPanel, HTMLTable, SimplePanel

public abstract class Panel
extends Widget
implements HasWidgets

Abstract base class for all panels, which are widgets that can contain other widgets.


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
Panel()
           
 
Method Summary
abstract  boolean add(Widget w)
          Adds a new child widget to the panel.
protected  void adopt(Widget w)
          This method must be called as part of the add method of any panel.
abstract  void clear()
          Removes all widgets from this panel.
protected  void disown(Widget w)
          This method must be called whenever a Widget is removed.
protected  void onAttach()
          This method is called when a widget is attached to the browser's document.
protected  void onDetach()
          This method is called when a widget is detached from the browser's document.
abstract  boolean remove(Widget w)
          Removes a widget from the panel.
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onBrowserEvent, onLoad
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode
 
Methods inherited from interface com.google.gwt.user.client.ui.HasWidgets
iterator
 

Constructor Detail

Panel

public Panel()
Method Detail

add

public abstract boolean add(Widget w)
Adds a new child widget to the panel.

Parameters:
w - the child widget to be added
Returns:
true on success (some panels place restrictions on how children may be added or inserted)

clear

public abstract void clear()
Removes all widgets from this panel.


disown

protected void disown(Widget w)
This method must be called whenever a Widget is removed. It ensures that the Widget's parent is cleared.


adopt

protected void adopt(Widget w)
This method must be called as part of the add method of any panel. It ensures that the Widget's parent is set properly.


remove

public abstract boolean remove(Widget w)
Removes a widget from the panel.

Parameters:
w - the widget to be removed
Returns:
true if the widget was present

onAttach

protected final void onAttach()
Description copied from class: Widget
This method is called when a widget is attached to the browser's document. It must not be overridden, except by Panel. To receive notification when a widget is attached to the document, override the Widget.onLoad() method.

Overrides:
onAttach in class Widget

onDetach

protected final void onDetach()
Description copied from class: Widget
This method is called when a widget is detached from the browser's document. It must not be overridden, except by Panel.

Overrides:
onDetach in class Widget


This javadoc distribution was not produced by Google. The official documentation is here.