本文整理了Java中com.google.gwt.dom.client.Element.getInnerHTML()
方法的一些代码示例,展示了Element.getInnerHTML()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getInnerHTML()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getInnerHTML
[英]All of the markup and content within a given element.
[中]给定元素中的所有标记和内容。
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public String getHTML() {
return contentElem.getInnerHTML();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets an HTML representation of an element's children.
*
* @param elem the element whose HTML is to be retrieved
* @return the HTML representation of the element's children
* @deprecated Use {@link Element#getInnerHTML()} instead.
*/
@Deprecated
public static String getInnerHTML(Element elem) {
return elem.getInnerHTML();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the face's contents as html.
*
* @return face's contents as html
*
*/
@Override
public String getHTML() {
return getFace().getInnerHTML();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public final String getHTML() {
return beforeInitPlaceholder == null ? getHTMLImpl() : beforeInitPlaceholder.getInnerHTML();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Get the inner text or html of the element, taking the inner span wrap into consideration, if
* needed. Prefer using {@link #getText} or {@link #getHtml} instead of this method.
*
* @param isHtml true to get the inner html, false to get the inner text
* @return the text or html
*/
public String getTextOrHtml(boolean isHtml) {
Element elem = isSpanWrapped ? element.getFirstChildElement() : element;
return isHtml ? elem.getInnerHTML() : elem.getInnerText();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override @SuppressIsSafeHtmlCastCheck
protected void onElementInitialized() {
// Issue 1897: This method is called after a timeout, during which time the
// element might by detached.
if (!initializing) {
return;
}
initializing = false;
isReady = true;
// When the iframe is ready, ensure cached content is set.
if (beforeInitPlaceholder != null) {
setHTMLImpl(beforeInitPlaceholder.getInnerHTML());
setEnabledImpl(isEnabled());
beforeInitPlaceholder = null;
}
super.onElementInitialized();
// Focus on the element now that it is initialized
if (isPendingFocus) {
isPendingFocus = false;
setFocus(true);
}
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* {@inheritDoc}
*/
@Override
public String getHTML()
{
return rElement.getInnerHTML();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the specified tab's HTML.
*
* @param index the index of the tab whose HTML is to be retrieved
* @return the tab's HTML
*/
public String getTabHTML(int index) {
if (index >= getTabCount()) {
return null;
}
ClickDelegatePanel delPanel = (ClickDelegatePanel) panel.getWidget(index + 1);
SimplePanel focusablePanel = delPanel.getFocusablePanel();
Widget widget = focusablePanel.getWidget();
if (widget instanceof HTML) {
return ((HTML) widget).getHTML();
} else if (widget instanceof Label) {
return ((Label) widget).getText();
} else {
// This will be a focusable panel holding a user-supplied widget.
return focusablePanel.getElement().getParentElement().getInnerHTML();
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets an HTML representation of an element's children.
*
* @param elem the element whose HTML is to be retrieved
* @return the HTML representation of the element's children
* @deprecated Use {@link Element#getInnerHTML()} instead.
*/
@Deprecated
public static String getInnerHTML(Element elem) {
return elem.getInnerHTML();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets an HTML representation of an element's children.
*
* @param elem the element whose HTML is to be retrieved
* @return the HTML representation of the element's children
* @deprecated Use {@link Element#getInnerHTML()} instead.
*/
@Deprecated
public static String getInnerHTML(Element elem) {
return elem.getInnerHTML();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the face's contents as html.
*
* @return face's contents as html
*
*/
@Override
public String getHTML() {
return getFace().getInnerHTML();
}
代码示例来源:origin: geogebra/geogebra
/**
* Gets the face's contents as html.
*
* @return face's contents as html
*
*/
@Override
public String getHTML() {
return getFace().getInnerHTML();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the face's contents as html.
*
* @return face's contents as html
*
*/
@Override
public String getHTML() {
return getFace().getInnerHTML();
}
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
/**
* Get the innerHTML of the first matched element.
*/
public String html() {
return isEmpty() ? "" : get(0).getInnerHTML();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Get the inner text or html of the element, taking the inner span wrap into
* consideration, if needed.
*
* @param isHtml true to get the inner html, false to get the inner text
* @return the text or html
*/
public String getTextOrHtml(boolean isHtml) {
Element elem = isSpanWrapped ? element.getFirstChildElement() : element;
return isHtml ? elem.getInnerHTML() : elem.getInnerText();
}
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
@Override
protected void appendElement(ListBox wrapped, Element element, String namespaceURI,
List<IsWidget> childWidgets) {
if (!ITEM_TAG.equals(element.getTagName())
|| !UiBinderXmlUtils.CLIENTUI_NSURI.equals(namespaceURI)) {
super.appendElement(wrapped, element, namespaceURI, childWidgets);
} else {
// handle <g:item> tag
String item = element.getInnerHTML();
String value = element.getAttribute("value");
wrapped.addItem(item, value);
}
}
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
private void handleCell(Grid wrapped, Element element, int columnIndex) {
checkGridSize(wrapped, columnIndex);
wrapped.setHTML(currentRowIndex, columnIndex, element.getInnerHTML());
handleCellStyle(wrapped, element, columnIndex);
}
代码示例来源:origin: org.jbpm/jbpm-gwt-form-api
public void removeItem(String item) {
int index = 0;
for (; index < element.getChildCount(); index++) {
Node child = element.getChild(index);
Element elemChild = Element.as(child);
String elemHTML = elemChild.getInnerHTML();
if (elemHTML != null && elemHTML.equals(item)) {
removeItem(index);
break;
}
}
}
代码示例来源:origin: GwtMaterialDesign/gwt-material
public void testToastStructure() {
MaterialToast.fireToast("test");
Element toastContainer = $("body").find("#toast-container").asElement();
assertNotNull(toastContainer);
assertEquals(toastContainer.getChildCount(), 1);
assertNotNull(toastContainer.getChild(0));
assertTrue(toastContainer.getChild(0) instanceof Element);
Element toastElement = (Element) toastContainer.getChild(0);
assertEquals(toastElement.getInnerHTML(), "test");
toastContainer.setInnerHTML("");
}
}
代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material
public void testToastStructure() {
MaterialToast.fireToast("test");
Element toastContainer = $("body").find("#toast-container").asElement();
assertNotNull(toastContainer);
assertEquals(toastContainer.getChildCount(), 1);
assertNotNull(toastContainer.getChild(0));
assertTrue(toastContainer.getChild(0) instanceof Element);
Element toastElement = (Element) toastContainer.getChild(0);
assertEquals(toastElement.getInnerHTML(), "test");
toastContainer.setInnerHTML("");
}
}
内容来源于网络,如有侵权,请联系作者删除!