本文整理匯總了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);
}
}