當前位置: 首頁>>代碼示例>>Java>>正文


Java DOM.createSpan方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.DOM.createSpan方法的典型用法代碼示例。如果您正苦於以下問題:Java DOM.createSpan方法的具體用法?Java DOM.createSpan怎麽用?Java DOM.createSpan使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.DOM的用法示例。


在下文中一共展示了DOM.createSpan方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AccessibleCheckBox

import com.google.gwt.user.client.DOM; //導入方法依賴的package包/類
protected AccessibleCheckBox(Element elem) {
    super(DOM.createSpan());
    inputElem = InputElement.as(elem);
    labelElem = Document.get().createLabelElement();

    getElement().appendChild(inputElem);
    getElement().appendChild(labelElem);

    String uid = DOM.createUniqueId();
    inputElem.setPropertyString("id", uid);
    labelElem.setHtmlFor(uid);

    // Accessibility: setting tab index to be 0 by default, ensuring element
    // appears in tab sequence. FocusWidget's setElement method already
    // calls setTabIndex, which is overridden below. However, at the time
    // that this call is made, inputElem has not been created. So, we have
    // to call setTabIndex again, once inputElem has been created.
    setTabIndex(0);
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:20,代碼來源:AccessibleCheckBox.java

示例2: addRow

import com.google.gwt.user.client.DOM; //導入方法依賴的package包/類
public int addRow(Widget header, Widget... widgets) {
	if (header.getElement().getId() == null || header.getElement().getId().isEmpty())
		header.getElement().setId(DOM.createUniqueId());
	P head = new P(DOM.createSpan(), "header-cell");
	head.add(header);
	add(head);
	for (Widget widget: widgets) {
		P body = new P(DOM.createSpan(), "content-cell");
		add(body);
		if (widget instanceof UniTimeTable) {
			ScrollPanel scroll = new ScrollPanel(widget);
			scroll.addStyleName("scroll");
			body.add(scroll);
		} else {
			body.add(widget);
		}
	}
	if (widgets.length > 0) {
		if (widgets[0] instanceof UniTimeWidget)
			Roles.getTextboxRole().setAriaLabelledbyProperty(((UniTimeWidget)widgets[0]).getWidget().getElement(), Id.of(header.getElement()));
		else
			Roles.getTextboxRole().setAriaLabelledbyProperty(widgets[0].getElement(), Id.of(header.getElement()));			
	}
	return getWidgetCount() - widgets.length;
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:26,代碼來源:FlowForm.java

示例3: addBottomRow

import com.google.gwt.user.client.DOM; //導入方法依賴的package包/類
protected int addBottomRow(Widget widget, boolean printable) {
	P row = new P(DOM.createSpan(), "row-cell", "unitime-MainTableBottomHeader", "unitime-TopLine");
	if (!printable)
		row.addStyleName("unitime-NoPrint");
	removeStyleName("unitime-NotPrintableBottomLine");
	row.add(widget);
	add(row);
	return getWidgetCount() - 1;
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:10,代碼來源:FlowForm.java

示例4: RoomsOrInstructors

import com.google.gwt.user.client.DOM; //導入方法依賴的package包/類
public RoomsOrInstructors(List<String> list, String delimiter) {
	super("itemize");
	if (list != null)
		for (Iterator<String> i = list.iterator(); i.hasNext(); ) {
			P p = new P(DOM.createSpan(), "item");
			p.setText(i.next() + (i.hasNext() ? delimiter : ""));
			add(p);
		}
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:10,代碼來源:CourseFinderClasses.java

示例5: AriaStatus

import com.google.gwt.user.client.DOM; //導入方法依賴的package包/類
public AriaStatus(boolean assertive) {
	this(DOM.createSpan(), assertive);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:4,代碼來源:AriaStatus.java

示例6: addHeaderRow

import com.google.gwt.user.client.DOM; //導入方法依賴的package包/類
public int addHeaderRow(Widget widget) {
	P row = new P(DOM.createSpan(), "row-cell", "unitime-MainTableHeader");
	row.add(widget);
	add(row);
	return getWidgetCount() - 1;
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:7,代碼來源:FlowForm.java


注:本文中的com.google.gwt.user.client.DOM.createSpan方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。