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

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
              extended bycom.google.gwt.user.client.ui.SimplePanel
All Implemented Interfaces:
EventListener, HasWidgets
Direct Known Subclasses:
FocusPanel, PopupPanel, ScrollPanel

public abstract class SimplePanel
extends Panel

Abstract base class for panels that contain only one widget.


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
protected SimplePanel()
          Creates an empty panel that uses a DIV for its contents.
protected SimplePanel(Element elem)
          Creates an empty panel that uses the specified browser element for its contents.
 
Method Summary
 boolean add(Widget w)
          Adds a new child widget to the panel.
 void clear()
          Removes all widgets from this panel.
protected  Element getContainerElement()
          Override this method to specify that an element other than the root element be the container for the panel's child widget.
 Widget getWidget(int index)
           
 int getWidgetCount()
           
 int getWidgetIndex(Widget child)
           
 Iterator iterator()
          Gets an iterator for the contained widgets.
 boolean remove(Widget w)
          Removes a widget from the panel.
protected  void setWidget(Widget w)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, disown, onAttach, onDetach
 
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
 

Constructor Detail

SimplePanel

protected SimplePanel()
Creates an empty panel that uses a DIV for its contents.


SimplePanel

protected SimplePanel(Element elem)
Creates an empty panel that uses the specified browser element for its contents.

Method Detail

add

public boolean add(Widget w)
Description copied from class: Panel
Adds a new child widget to the panel.

Specified by:
add in class 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 void clear()
Description copied from class: Panel
Removes all widgets from this panel.

Specified by:
clear in class Panel

getWidget

public Widget getWidget(int index)

getWidgetCount

public int getWidgetCount()

getWidgetIndex

public int getWidgetIndex(Widget child)

iterator

public Iterator iterator()
Description copied from interface: HasWidgets
Gets an iterator for the contained widgets.


remove

public boolean remove(Widget w)
Description copied from class: Panel
Removes a widget from the panel.

Specified by:
remove in class Panel
Parameters:
w - the widget to be removed
Returns:
true if the widget was present

getContainerElement

protected Element getContainerElement()
Override this method to specify that an element other than the root element be the container for the panel's child widget. This can be useful when you want to create a simple panel that decorates its contents.

Returns:
the element to be used as the panel's container

setWidget

protected void setWidget(Widget w)


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