当前位置: 首页>>代码示例>>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;未经允许,请勿转载。