本文整理了Java中com.google.gwt.dom.client.Element.setTitle()
方法的一些代码示例,展示了Element.setTitle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setTitle()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setTitle
[英]The element's advisory title.
[中]元素的咨询标题。
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public void setTitle(String title) {
contentElem.setTitle(title);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public R title(String title) {
assertCanAddAttribute().setTitle(title);
return getReturnBuilder();
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public R title(String title) {
assertCanAddAttribute().setTitle(title);
return getReturnBuilder();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public R title(String title) {
assertCanAddAttribute().setTitle(title);
return getReturnBuilder();
}
代码示例来源:origin: dashbuilder/dashbuilder
protected void addItem(String iconClass, String id, String name, String description, Command onClicked) {
Element nameEl = onClicked != null ? Document.get().createAnchorElement() : Document.get().createSpanElement();
nameEl.setInnerText(name);
nameEl.setClassName(onClicked != null ? "uf-navtree-widget-non-clicked" : "uf-navtree-widget-non-clickable");
if (description != null && !description.equals(name)) {
nameEl.setTitle(description);
}
SpanElement iconSpan = Document.get().createSpanElement();
iconSpan.setClassName("uf-navtree-widget-icon " + iconClass);
DivElement div = Document.get().createDivElement();
div.appendChild(iconSpan);
div.appendChild(nameEl);
navWidget.appendChild((Node) div);
itemMap.put(id, nameEl);
if (onClicked != null) {
Event.sinkEvents(nameEl, Event.ONCLICK);
Event.setEventListener(nameEl, event -> {
if (Event.ONCLICK == event.getTypeInt()) {
onClicked.execute();
}
});
}
}
}
代码示例来源:origin: org.dashbuilder/dashbuilder-navigation-client
protected void addItem(String iconClass, String id, String name, String description, Command onClicked) {
Element nameEl = onClicked != null ? Document.get().createAnchorElement() : Document.get().createSpanElement();
nameEl.setInnerText(name);
nameEl.setClassName(onClicked != null ? "uf-navtree-widget-non-clicked" : "uf-navtree-widget-non-clickable");
if (description != null && !description.equals(name)) {
nameEl.setTitle(description);
}
SpanElement iconSpan = Document.get().createSpanElement();
iconSpan.setClassName("uf-navtree-widget-icon " + iconClass);
DivElement div = Document.get().createDivElement();
div.appendChild(iconSpan);
div.appendChild(nameEl);
navWidget.appendChild((Node) div);
itemMap.put(id, nameEl);
if (onClicked != null) {
Event.sinkEvents(nameEl, Event.ONCLICK);
Event.setEventListener(nameEl, event -> {
if (Event.ONCLICK == event.getTypeInt()) {
onClicked.execute();
}
});
}
}
}
代码示例来源:origin: com.extjs/gxt
protected void onStepOutApp() {
if (FocusManager.get().isInsertExitFocusElement()) {
if (stepout == null) {
stepout = Document.get().createElement("div");
stepout.setTitle(GXT.MESSAGES.aria_leaveApplication());
stepout.getStyle().setProperty("outline", "none");
El.fly(stepout).setTabIndex(0);
Element body = XDOM.getBody();
body.appendChild(stepout);
}
El.fly(stepout).focus();
}
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
public void setCaption(String caption) {
final MatchResult localisedPropertyMatcher = localisedPropertyCaptionPattern.exec(caption);
if (localisedPropertyMatcher != null && localisedPropertyMatcher.getGroupCount() > 2) {
caption = localisedPropertyMatcher.getGroup(1);
label.setInnerText(caption);
final Element localeLabel = SpanElement.as(DOM.createSpan());
localeLabel.setClassName("locale-label");
localeLabel.setInnerText(localisedPropertyMatcher.getGroup(2));
if (requirementAsterisk != null && label.isOrHasChild(requirementAsterisk)) {
label.insertAfter(localeLabel, requirementAsterisk);
} else {
label.insertFirst(localeLabel);
}
} else {
label.setInnerText(caption);
}
if (caption != null) {
label.setTitle(caption);
}
}
代码示例来源:origin: korpling/ANNIS
tdElement.setTitle(event.getStringAttribute("tooltip"));
内容来源于网络,如有侵权,请联系作者删除!