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

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.ComplexPanel
                  extended bycom.google.gwt.user.client.ui.HTMLPanel
All Implemented Interfaces:
EventListener, HasWidgets

public class HTMLPanel
extends ComplexPanel

A panel that contains HTML, and which can attach child widgets to identified elements within that HTML.


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
HTMLPanel(String html)
          Creates an HTML panel with the specified HTML contents.
 
Method Summary
 boolean add(Widget w)
          This overload of the add method will always fail, as the html panel cannot add children with no id specified.
 boolean add(Widget widget, String id)
          Adds a child widget to the panel, contained within the HTML element specified by a given id.
static String createUniqueId()
          A helper method for creating unique id's for elements within dynamically- generated HTML.
 boolean remove(Widget w)
          Removes a widget from the panel.
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
clear, getWidget, getWidgetCount, getWidgetIndex, insert, iterator
 
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

HTMLPanel

public HTMLPanel(String html)
Creates an HTML panel with the specified HTML contents. Any element within this HTML that has a specified id can contain a child widget.

Parameters:
html - the panel's HTML
Method Detail

createUniqueId

public static String createUniqueId()
A helper method for creating unique id's for elements within dynamically- generated HTML. This is important because no two elements in a document should have the same id.

Returns:
a new unique identifier

add

public boolean add(Widget w)
This overload of the add method will always fail, as the html panel cannot add children with no id specified.

Overrides:
add in class ComplexPanel

add

public boolean add(Widget widget,
                   String id)
Adds a child widget to the panel, contained within the HTML element specified by a given id.

Parameters:
widget - the widget to be added
id - the id of the element within which it will be contained
Returns:
true if successful, false if no element with the specified id is found

remove

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

Overrides:
remove in class ComplexPanel


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