com.google.gwt.user.client.ui
Class HTMLPanel
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.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.
|
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.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
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
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 addedid - 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.