本文整理了Java中com.google.gwt.dom.client.Element.getId()
方法的一些代码示例,展示了Element.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getId()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:getId
[英]The element's identifier.
[中]元素的标识符。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Obtains the field name of a previously rendered DOM Element.
* @param uiId identifier of the fields contained in a previously rendered DOM structure
* @param element which may correspond to {@code ui:field}
* @return the field name or {@code null} if the {@code element} does not have
* an id attribute as would be produced by {@link #buildInnerId(String, String)}) with
* {@code fieldName} and {@code uiId}
*/
private static String getFieldName(String uiId, Element element) {
String id = element.getId();
if (id == null) {
return null;
}
int split = id.indexOf(UI_ID_SEPARATOR);
return split != -1 && uiId.length() == split && id.startsWith(uiId)
? id.substring(split + 1)
: null;
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* An instance of {@link Id} is created.
*
* @param element Element with a unique id value set
*/
private Id(Element element) {
assert element != null : "Element cannot be null";
init(element.getId());
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
/**
* Scroll the page to the y-position of the given element. The element must
* be attached to the DOM (obviously!).
*
* This method will not fire jquery mobile scroll events.
*/
public static void silentScroll(Element e) {
if (e.getId() != null)
Mobile.silentScroll(getTop(e.getId()));
}
代码示例来源:origin: oVirt/ovirt-engine
private static void hideAllCellWidgetTooltipsExcept(String elementId) {
for (Element e : cellWidgetElementReapList) {
if (!elementId.equals(e.getId())) {
hideTooltip(e);
}
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* An instance of {@link Id} is created.
*
* @param element Element with a unique id value set
*/
private Id(Element element) {
assert element != null : "Element cannot be null";
init(element.getId());
}
代码示例来源:origin: org.uberfire/uberfire-widgets-commons
@Override
public void execute() {
initPopover(div.getId(),
placement.name().toLowerCase());
}
});
代码示例来源:origin: org.uberfire/uberfire-widgets-commons
@Override
public void execute() {
showPopover(parent.getFirstChildElement().getId());
}
});
代码示例来源:origin: kiegroup/appformer
@Override
public void execute() {
initPopover(div.getId(),
placement.name().toLowerCase());
}
});
代码示例来源:origin: kiegroup/appformer
@Override
public void execute() {
showPopover(parent.getFirstChildElement().getId());
}
});
代码示例来源:origin: jqm4gwt/jqm4gwt
public static RootPanel getRootPanel() {
String id = Mobile.getPageContainer().getId();
if (id != null && id.isEmpty()) id = null;
return RootPanel.get(id);
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
public void addLabel(WidgetLabel label) {
label.setFor(getContentWidgetElement().getId());
this.label = label;
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
@Override
public void hide() {
hidePopover( div.getId() );
cancel();
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3
/**
* Ensures the given element has a non-empty id.
*
* @param element The element being examined.
* @see Document#createUniqueId()
*/
private void ensureId(final Element element) {
final String id = element.getId();
if (id == null || id.isEmpty()) {
element.setId(Document.get().createUniqueId());
}
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
protected void initWidget(Widget wrapperWidget) {
super.initWidget(wrapperWidget);
contentWidgetContainer.add(contentWidget);
// Assign ID to content widget element if it's missing or empty
Element contentWidgetElement = getContentWidgetElement();
if (contentWidgetElement.getId() == null || contentWidgetElement.getId().isEmpty()) {
setElementId(DOM.createUniqueId());
}
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3
/**
* Ensures the given element has a non-empty id.
*
* @param element The element being examined.
* @see Document#createUniqueId()
*/
private void ensureId(final Element element) {
final String id = element.getId();
if (id == null || id.isEmpty()) {
element.setId(Document.get().createUniqueId());
}
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3
@Override
public void setDataTargetWidget(final Widget widget) {
final Element element = widget.getElement();
ensureId(element);
this.setDataTarget("#" + element.getId());
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3
@Override
public void setDataTargetWidget(final Widget widget) {
final Element element = widget.getElement();
ensureId(element);
this.setDataTarget("#" + element.getId());
}
代码示例来源:origin: gwt-test-utils/gwt-test-utils
private static void storeId(Widget widget, Element element) {
String id = element.getId();
if ((widget.getElement() == element || WidgetUtils.getWidget(element) == widget) && id != null && !id.isEmpty()) {
INSTANCE.indexedObjectFinder.mapById.put(id, widget);
for (int i = 0; i < element.getChildCount(); i++) {
if (element.getChild(i) instanceof Element) {
storeId(widget, (Element) element.getChild(i));
}
}
}
}
代码示例来源:origin: org.opennms.features/org.opennms.features.gwt-ksc-add
private void createView(final Element elem, final List<KscReport> kscReportList) {
final GraphInfo info = new GraphInfo(elem);
GWT.log("creating view for graph " + info);
new AppController(kscReportList, info).go(RootPanel.get(elem.getId()));
}
}
代码示例来源:origin: org.opennms.features/org.opennms.features.gwt-graph-resources-list
private void createKscReportListView(Element element) {
KscReportListAppController nodeSnmpReportList = new KscReportListAppController(getResourceListData(getDataObjectAttribute(element)), getBaseUrl());
nodeSnmpReportList.go(RootPanel.get(element.getId()));
}
内容来源于网络,如有侵权,请联系作者删除!