|
|||||||||
| 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.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.Container<Component>
com.extjs.gxt.ui.client.widget.HtmlContainer
public class HtmlContainer
A specialized container whose contents can be specified as an existing element, an html fragment, or a remote url. When adding children a css selector is used to identify the element the child will be inserted into.
Code snippet:HtmlContainer hc = new HtmlContainer(
"<div class=text style='padding:5px'>"
+ "<h1>Heading1</h1>"
+ "<i>Some text</i></br>"
+ "<div class=b1></div>"
+ "<u>Final text</u></div>");
hc.add(new Button("Test"), "div.b1");
hc.setBorders(true);
hc.setSize(200, 100);
hc.setPosition(10, 10);
RootPanel.get().add(hc);
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
HtmlContainer()
Creates a new container. |
|
HtmlContainer(com.google.gwt.user.client.Element elem)
Creates a new container. |
|
HtmlContainer(com.google.gwt.http.client.RequestBuilder requestBuilder)
Creates a new container. |
|
HtmlContainer(java.lang.String html)
Creates a container. |
|
| Method Summary | |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget widget,
java.lang.String selector)
Adds a component to this Container. |
com.google.gwt.http.client.RequestBuilder.Method |
getHttpMethod()
Returns the HTTP method. |
java.lang.String |
getRequestData()
Returns the request data. |
java.lang.String |
getTagName()
|
boolean |
isDeferDownload()
Returns true if defer download is enabled. |
void |
setDeferDownload(boolean deferDownload)
True to defer remote requests until the component is rendered (defaults to false). |
void |
setHtml(java.lang.String html)
Sets the container's inner html. |
void |
setHttpMethod(com.google.gwt.http.client.RequestBuilder.Method httpMethod)
The method used when requesting remote content (defaults to RequestBuilder.GET). |
void |
setRequestData(java.lang.String requestData)
The request data to be used in remote calls (defaults to null). |
void |
setTagName(java.lang.String tagName)
The HTML tag name that will wrap the text (defaults to 'div'). |
void |
setUrl(java.lang.String url)
Retrieves and sets the container's content from the given url. |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Container |
|---|
disable, enable, findItem, getItem, getItemByItemId, getItemCount, getItems, getLayoutTarget, getWidget, indexOf, iterator, removeAll, scrollIntoView |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HtmlContainer()
public HtmlContainer(com.google.gwt.user.client.Element elem)
elem - the component's elementpublic HtmlContainer(com.google.gwt.http.client.RequestBuilder requestBuilder)
requestBuilder - the request to be used when setting a urlpublic HtmlContainer(java.lang.String html)
html - the containers inner html| Method Detail |
|---|
public void add(com.google.gwt.user.client.ui.Widget widget,
java.lang.String selector)
widget - the widget to add. If the widget is not a Component it will
be wrapped in a WidgetComponentselector - the css selector (ie div.class) used to identify the
components parentpublic com.google.gwt.http.client.RequestBuilder.Method getHttpMethod()
setUrl(String)
public java.lang.String getRequestData()
public java.lang.String getTagName()
public boolean isDeferDownload()
public void setDeferDownload(boolean deferDownload)
deferDownload - true to deferpublic void setHtml(java.lang.String html)
html - the htmlpublic void setHttpMethod(com.google.gwt.http.client.RequestBuilder.Method httpMethod)
setUrl(String)
httpMethod - public void setRequestData(java.lang.String requestData)
requestData - the request datapublic void setTagName(java.lang.String tagName)
tagName - the new tag namepublic void setUrl(java.lang.String url)
url - the url
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||