本文整理汇总了Java中com.google.gwt.user.client.DOM.appendChild方法的典型用法代码示例。如果您正苦于以下问题:Java DOM.appendChild方法的具体用法?Java DOM.appendChild怎么用?Java DOM.appendChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.DOM
的用法示例。
在下文中一共展示了DOM.appendChild方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AriaCheckBox
import com.google.gwt.user.client.DOM; //导入方法依赖的package包/类
public AriaCheckBox(Element elem) {
super(elem);
iAriaLabel = DOM.createLabel();
iAriaLabel.setId(DOM.createUniqueId());
iAriaLabel.setClassName("unitime-AriaLabel");
DOM.appendChild(getElement(), iAriaLabel);
Roles.getCheckboxRole().setAriaLabelledbyProperty(elem, Id.of(iAriaLabel));
}
示例2: setAriaLabel
import com.google.gwt.user.client.DOM; //导入方法依赖的package包/类
@Override
public void setAriaLabel(String text) {
if (iWidget instanceof HasAriaLabel) {
((HasAriaLabel)iWidget).setAriaLabel(text);
} else {
if (iAriaLabel == null) {
iAriaLabel = DOM.createLabel();
iAriaLabel.setId(DOM.createUniqueId());
iAriaLabel.setClassName("hidden-label");
DOM.appendChild(getElement(), iAriaLabel);
Roles.getCheckboxRole().setAriaLabelledbyProperty(iWidget.getElement(), Id.of(iAriaLabel));
}
iAriaLabel.setInnerText(text);
}
}
示例3: MiniProgressBar
import com.google.gwt.user.client.DOM; //导入方法依赖的package包/类
/**
* Create a progress bar within the given range starting at the specified
* progress amount.
*
* @param minProgress the minimum progress
* @param maxProgress the maximum progress
* @param curProgress the current progress
* @param textFormatter the text formatter
*/
public MiniProgressBar(double minProgress, double maxProgress,
double curProgress, TextFormatter textFormatter) {
this.minProgress = minProgress;
this.maxProgress = maxProgress;
this.curProgress = curProgress;
setTextFormatter(textFormatter);
// Create the outer shell
setElement(DOM.createDiv());
DOM.setStyleAttribute(getElement(), "position", "relative");
setStyleName("gwt-ProgressBar-shell");
// Create the bar element
barElement = DOM.createDiv();
DOM.appendChild(getElement(), barElement);
DOM.setStyleAttribute(barElement, "height", "100%");
setBarStyleName("gwt-ProgressBar-bar");
// Create the text element
textElement = DOM.createDiv();
DOM.appendChild(getElement(), textElement);
DOM.setStyleAttribute(textElement, "position", "absolute");
DOM.setStyleAttribute(textElement, "top", "0px");
//Set the current progress
setProgress(curProgress);
}
示例4: ensureDropTargetArea
import com.google.gwt.user.client.DOM; //导入方法依赖的package包/类
private void ensureDropTargetArea() {
if (dropTargetArea == null) {
dropTargetArea = DOM.createDiv();
setDropTargetAreaVisible(false);
DOM.setStyleAttribute(dropTargetArea, "border", "2px solid " + DROP_TARGET_AREA_COLOR);
DOM.appendChild(container.getRootPanel().getElement(), dropTargetArea);
}
}
示例5: ensureDividerInited
import com.google.gwt.user.client.DOM; //导入方法依赖的package包/类
private void ensureDividerInited() {
if (dividerElement == null) {
dividerElement = DOM.createDiv();
DOM.setStyleAttribute(dividerElement, "backgroundColor", DIVIDER_COLOR);
setDividerVisible(false);
DOM.appendChild(container.getRootPanel().getElement(), dividerElement);
}
}