Class HTMLPanel

public class HTMLPanel
extends ComplexPanel
A panel that contains HTML, and which can attach child widgets to identified elements within that HTML.

Constructors

HTMLPanel(String)Creates an HTML panel with the specified HTML contents.

Methods

add(Widget, String)Adds a child widget to the panel, contained within the HTML element specified by a given id.
createUniqueId()A helper method for creating unique IDs for elements within dynamically- generated HTML.

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

add

public void 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

createUniqueId

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

Return Value

a new unique identifier