本文整理匯總了Java中com.google.gwt.user.client.Element.setInnerText方法的典型用法代碼示例。如果您正苦於以下問題:Java Element.setInnerText方法的具體用法?Java Element.setInnerText怎麽用?Java Element.setInnerText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.Element
的用法示例。
在下文中一共展示了Element.setInnerText方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: attach
import com.google.gwt.user.client.Element; //導入方法依賴的package包/類
@Override
public void attach(final View view, final CanvasReadyCallback canvasReadyCallback) {
log("attach readyFn:"+readyFn);
exportReadyFn(readyFn, view, new CanvasReadyCallback() {
boolean initialized = false;
public void onCanvasReady(Canvas canvas) {
if (!initialized) {
initialized = true;
canvasReadyCallback.onCanvasReady(canvas);
} else {
resyncLayers();
}
}
});
// String codeBasePref = GWT.getHostPageBaseURL().startsWith("https") ? "https" : "http";
String swfUrl = Chronoscope.getURL(GWT.getModuleBaseURL() + "flcanvas.swf");
Element altContent = DOM.createElement("p");
altContent.setInnerText("Install Flash plugin to view chart.");
swfObjectElement = swfobj.create(swfObjectElementId, swfUrl, readyFn, altContent);
Bounds initialBounds = new Bounds(0,0,view.getWidth(), view.getHeight());
GwtView.initDivElement(canvasDivElement, initialBounds);
GwtView.positionDivElement(canvasDivElement, initialBounds);
// log("create rootLayer");
// rootLayer = createLayer(Layer.BACKGROUND, initialBounds);
if ((canvasDivElement != null) && (swfObjectElement != null)) {
DOM.appendChild(canvasDivElement, swfObjectElement);
}
// super.attach(view, canvasReadyCallback);
}
示例2: showError
import com.google.gwt.user.client.Element; //導入方法依賴的package包/類
@Override
public MapEditor.View showError(final SafeHtml message) {
final Element element = errorLabel.getElement();
element.setInnerText(message.asString());
element.getStyle().setDisplay(Style.Display.INLINE);
element.getStyle().setBorderColor("red");
element.getStyle().setBorderStyle(Style.BorderStyle.SOLID);
element.getStyle().setBorderWidth(1, Style.Unit.PX);
errorLabel.setVisible(true);
return this;
}
示例3: clearError
import com.google.gwt.user.client.Element; //導入方法依賴的package包/類
@Override
public MapEditor.View clearError() {
final Element element = errorLabel.getElement();
element.setInnerText("");
element.getStyle().setDisplay(Style.Display.NONE);
element.getStyle().setBorderWidth(0, Style.Unit.PX);
errorLabel.setVisible(false);
return this;
}
示例4: setText
import com.google.gwt.user.client.Element; //導入方法依賴的package包/類
@Override
public void setText(String text) {
this.text = text;
Element span = DOM.createElement("span");
span.setInnerText(text);
span.setAttribute("style", "padding-left:3px; vertical-align:middle;");
DOM.insertChild(getElement(), span, 0);
}