|
GWT 2.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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
public class HTMLPanel
A panel that contains HTML, and which can attach child widgets to identified elements within that HTML.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
---|
IndexedPanel.ForIsWidget |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
HasWidgets.ForIsWidget |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
HTMLPanel(SafeHtml safeHtml)
Initializes the panel's HTML from a given SafeHtml object. |
|
HTMLPanel(java.lang.String html)
Creates an HTML panel with the specified HTML contents inside a DIV element. |
|
HTMLPanel(java.lang.String tag,
java.lang.String html)
Creates an HTML panel whose root element has the given tag, and with the specified HTML contents. |
Method Summary | |
---|---|
void |
add(Widget widget)
Adds a child widget to the panel. |
void |
add(Widget widget,
Element elem)
Adds a child widget to the panel, contained within an HTML element. |
void |
add(Widget widget,
java.lang.String id)
Adds a child widget to the panel, contained within the HTML element specified by a given id. |
void |
addAndReplaceElement(Widget widget,
Element toReplace)
Adds a child widget to the panel, replacing the HTML element. |
void |
addAndReplaceElement(Widget widget,
Element toReplace)
Deprecated. use addAndReplaceElement(Widget, Element) |
void |
addAndReplaceElement(Widget widget,
java.lang.String id)
Adds a child widget to the panel, replacing the HTML element specified by a given id. |
static java.lang.String |
createUniqueId()
A helper method for creating unique IDs for elements within dynamically- generated HTML. |
Element |
getElementById(java.lang.String id)
Finds an element within this panel by its id. |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HTMLPanel(java.lang.String html)
html
- the panel's HTMLpublic HTMLPanel(SafeHtml safeHtml)
SafeHtml
object.
Similar to HTMLPanel(String)
safeHtml
- the html to set.public HTMLPanel(java.lang.String tag, java.lang.String html)
tag
- the tag of the root elementhtml
- the panel's HTMLMethod Detail |
---|
public static java.lang.String createUniqueId()
public void add(Widget widget)
add
in interface HasWidgets
add
in class Panel
widget
- the widget to be addedHasWidgets.add(Widget)
public void add(Widget widget, java.lang.String id)
widget
- the widget to be addedid
- the id of the element within which it will be containedpublic void add(Widget widget, Element elem)
widget
- the widget to be addedelem
- the element within which it will be containedpublic final void addAndReplaceElement(Widget widget, Element toReplace)
widget
- the widget to be addedtoReplace
- the element to be replaced by the widget@Deprecated public void addAndReplaceElement(Widget widget, Element toReplace)
addAndReplaceElement(Widget, Element)
widget
- the widget to be addedtoReplace
- the element to be replaced by the widgetpublic void addAndReplaceElement(Widget widget, java.lang.String id)
widget
- the widget to be addedid
- the id of the element to be replaced by the widgetpublic Element getElementById(java.lang.String id)
element
within this panel by its id.
This method uses
Document.getElementById(String)
, so the
id must still be unique within the document.
id
- the id of the element to be found
null
if none is found
|
GWT 2.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |