本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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);
}
}
示例5: AriaStatus
import com.google.gwt.user.client.DOM; //导入方法依赖的package包/类
public AriaStatus(boolean assertive) {
this(DOM.createSpan(), assertive);
}
示例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;
}