Class HTMLPanel
A panel that contains HTML, and which can attach child widgets to identified
elements within that HTML.
Constructors
Methods
add(Widget) | This overload of the add method will always fail, as the html panel cannot
add children with no id specified. |
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 id's for elements within dynamically-
generated HTML. |
remove(Widget) | |
Constructor Detail
HTMLPanel
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
This overload of the add method will always fail, as the html panel cannot
add children with no id specified.
Parameters
- w
-
add
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
Return Value
true
if successful,
false
if no
element with the specified id is found
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.
Return Value
a new unique identifier
remove
public boolean
remove(
Widget w)
Parameters
- w
-