本文整理了Java中com.google.gwt.dom.client.Element.getInnerText()
方法的一些代码示例,展示了Element.getInnerText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getInnerText()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getInnerText
[英]The text between the start and end tags of the object.
[中]对象的开始标记和结束标记之间的文本。
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public String getText() {
return contentElem.getInnerText();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
public final String getText() {
return labelTD.getInnerText();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the text contained within an element. If the element has child
* elements, only the text between them will be retrieved.
*
* @param elem the element whose inner text is to be retrieved
* @return the text inside this element
* @deprecated Use {@link Element#getInnerText()} instead.
*/
@Deprecated
public static String getInnerText(Element elem) {
return elem.getInnerText();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the face's contents as text.
*
* @return face's contents as text
*
*/
@Override
public String getText() {
return getFace().getInnerText();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public final String getText() {
return beforeInitPlaceholder == null ? getTextImpl() : beforeInitPlaceholder.getInnerText();
}
代码示例来源: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
/**
* Gets the text within the specified cell.
*
* @param row the cell's row
* @param column the cell's column
* @return the cell's text contents
* @throws IndexOutOfBoundsException
*/
public String getText(int row, int column) {
checkCellBounds(row, column);
Element e = cellFormatter.getElement(row, column);
return e.getInnerText();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Creates a ValueLabel widget that wraps an existing <span> element.
* <p>
* The ValueLabel's value will be initialized with the element's content,
* passed through the <code>parser</code>.
* <p>
* This element must already be attached to the document. If the element is
* removed from the document, you must call
* {@link RootPanel#detachNow(Widget)}.
*
* @param element the element to be wrapped
* @param renderer the renderer used to render values into the element
* @param parser the parser used to initialize the ValueLabel's value from the
* element's content
*/
public static <T> ValueLabel<T> wrap(Element element,
Renderer<? super T> renderer, Parser<? extends T> parser)
throws ParseException {
ValueLabel<T> label = wrap(element, renderer);
label.setValue(parser.parse(element.getInnerText()));
// Mark it attached and remember it for cleanup.
label.onAttach();
RootPanel.detachOnWindowClose(label);
return label;
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
/**
* Returns the value of the "main" text element
*/
@Override
public String getText() {
return headerElem != null ? headerElem.getInnerText() : null;
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
/**
* Returns the value of the "main" text element
*/
@Override
public String getText() {
return headerElem != null ? headerElem.getInnerText() : null;
}
代码示例来源:origin: jqm4gwt/jqm4gwt
/**
* Returns the value of the count bubble or null if no count has been set
*/
public Integer getCount() {
if (countElem == null) return null;
return Integer.parseInt(countElem.getInnerText());
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
/**
* Returns the value of the count bubble or null if no count has been set
*/
public Integer getCount() {
if (countElem == null) return null;
return Integer.parseInt(countElem.getInnerText());
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the face's contents as text.
*
* @return face's contents as text
*
*/
@Override
public String getText() {
return getFace().getInnerText();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the face's contents as text.
*
* @return face's contents as text
*
*/
@Override
public String getText() {
return getFace().getInnerText();
}
代码示例来源:origin: geogebra/geogebra
/**
* Gets the face's contents as text.
*
* @return face's contents as text
*
*/
@Override
public String getText() {
return getFace().getInnerText();
}
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
public void addElement(Element element) {
sb.append("<").append(element.getTagName());
// TODO : append attributes
sb.append(">").append(element.getInnerText()).append("</").append(element.getTagName()).append(
">");
}
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
public Label create(Element e) {
Label label = new Label();
label.setText(e.getInnerText());
WidgetsUtils.replaceOrAppend(e, label);
return label;
}
}
代码示例来源:origin: net.sf.gwt-widget/gwt-sl
private Message decodeMessage(Element e) {
Message message = new Message();
String content = e.getInnerText();
String[] parts = content.split(",");
message.setContent(URL.decodeQueryString(parts[0]));
for (int i = 1; i < parts.length; i++) {
String[] keyValuePair = parts[i].split("=");
message.getAttributes().put(URL.decodeQueryString(keyValuePair[0]), URL.decodeQueryString(keyValuePair[1]));
}
message.setSerialNumber(Integer.parseInt(e.getAttribute("id")));
return message;
}
代码示例来源:origin: com.googlecode.gwtquery/gwtquery
public T create(Element e) {
T textBox = createWidget();
if (getEquivalentTagName().equalsIgnoreCase(e.getTagName())) {
copyAttributes((InputElement) e.cast(),
(InputElement) textBox.getElement().cast());
} else {
textBox.setValue(e.getInnerText());
}
WidgetsUtils.replaceOrAppend(e, textBox);
return (T) textBox;
}
代码示例来源:origin: oVirt/ovirt-engine
void attachAlert(AlertPanel alertPanel) {
// Add widget's DOM element straight into HTML body
RootPanel.get().add(alertPanel);
// Use tool tip in case the textual content overflows
Element messageDivElement = alertPanel.getMessageAt(0).getElement();
if (ElementUtils.detectHorizontalOverflow(messageDivElement)) {
alertPanel.getAlertTooltip().setText(messageDivElement.getInnerText());
alertPanel.getAlertTooltip().setPlacement(Placement.BOTTOM);
}
}
内容来源于网络,如有侵权,请联系作者删除!