com.google.gwt.dom.client.Element.setId()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(302)

本文整理了Java中com.google.gwt.dom.client.Element.setId()方法的一些代码示例,展示了Element.setId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setId()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setId

Element.setId介绍

[英]The element's identifier.
[中]元素的标识符。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. @Override
  2. public R id(String id) {
  3. assertCanAddAttribute().setId(id);
  4. return getReturnBuilder();
  5. }

代码示例来源:origin: com.googlecode.gwtquery/gwtquery

  1. public void setAttribute(Element e, String key, Object value) {
  2. e.setId(value == null ? null : value.toString());
  3. super.setAttribute(e, key, value);
  4. }
  5. }

代码示例来源:origin: OpenNMS/opennms

  1. @Override
  2. protected void onLoad() {
  3. super.onLoad();
  4. m_widgetContainer.setSize("100%", "100%");
  5. m_svg.setId("TopologyComponent");
  6. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. @Override
  2. public R id(String id) {
  3. assertCanAddAttribute().setId(id);
  4. return getReturnBuilder();
  5. }

代码示例来源:origin: oVirt/ovirt-engine

  1. @Override
  2. public void setElementId(String elementId) {
  3. getContentWidgetElement().setId(elementId);
  4. updateLabelElementId(elementId);
  5. }

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app

  1. @Override
  2. protected void onLoad() {
  3. super.onLoad();
  4. m_widgetContainer.setSize("100%", "100%");
  5. m_svg.setId("TopologyComponent");
  6. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. @Override
  2. public R id(String id) {
  3. assertCanAddAttribute().setId(id);
  4. return getReturnBuilder();
  5. }

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3

  1. /**
  2. * Ensures the given element has a non-empty id.
  3. *
  4. * @param element The element being examined.
  5. * @see Document#createUniqueId()
  6. */
  7. private void ensureId(final Element element) {
  8. final String id = element.getId();
  9. if (id == null || id.isEmpty()) {
  10. element.setId(Document.get().createUniqueId());
  11. }
  12. }

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

  1. /**
  2. * Ensures the given element has a non-empty id.
  3. *
  4. * @param element The element being examined.
  5. * @see Document#createUniqueId()
  6. */
  7. private void ensureId(final Element element) {
  8. final String id = element.getId();
  9. if (id == null || id.isEmpty()) {
  10. element.setId(Document.get().createUniqueId());
  11. }
  12. }

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material-addins

  1. /**
  2. * Executes callback method depending on how far into the page you've scrolled
  3. */
  4. public void apply() {
  5. if (element != null) {
  6. String uid = DOM.createUniqueId();
  7. element.setId(uid);
  8. JsScrollfire.apply("#" + uid, offset, callback::call);
  9. } else {
  10. GWT.log("You must set the element before applying the scrollfire", new IllegalStateException());
  11. }
  12. }

代码示例来源:origin: de.novanic.gwteventservice/gwteventservice

  1. private static Element createFrameElement() {
  2. Frame theDummyFrame = new Frame();
  3. theDummyFrame.setVisible(false);
  4. final Element theDummyFrameElement = theDummyFrame.getElement();
  5. theDummyFrameElement.setId("gwteventservice_dummy_frame");
  6. return theDummyFrameElement;
  7. }

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone

  1. JQMRadio() {
  2. Element element = input.getElement();
  3. element.setId(Document.get().createUniqueId());
  4. element.setAttribute("type", "radio");
  5. setElement(element);
  6. setLabel(new FormLabel());
  7. }

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library

  1. JQMRadio() {
  2. Element element = input.getElement();
  3. element.setId(Document.get().createUniqueId());
  4. element.setAttribute("type", "radio");
  5. setElement(element);
  6. setLabel(new FormLabel());
  7. }

代码示例来源:origin: fr.lteconsulting/hexa.core

  1. private static void ensureFrame()
  2. {
  3. com.google.gwt.dom.client.Element frame = Document.get().getElementById( "__printingFrame" );
  4. if( frame == null )
  5. {
  6. frame = DOM.createIFrame();
  7. frame.setId( "__printingFrame" );
  8. frame.setAttribute( "style", "width:0;height:0;border:0" );
  9. Document.get().getBody().appendChild( frame );
  10. }
  11. }

代码示例来源:origin: ltearno/hexa.tools

  1. private static void ensureFrame()
  2. {
  3. com.google.gwt.dom.client.Element frame = Document.get().getElementById( "__printingFrame" );
  4. if( frame == null )
  5. {
  6. frame = DOM.createIFrame();
  7. frame.setId( "__printingFrame" );
  8. frame.setAttribute( "style", "width:0;height:0;border:0" );
  9. Document.get().getBody().appendChild( frame );
  10. }
  11. }

代码示例来源:origin: org.eclipse.che.core/che-core-ide-ui

  1. private void ensureTreeElement() {
  2. DivElement element = Document.get().createDivElement();
  3. element.addClassName(treeStyles.treeStylesCss().tree());
  4. rootContainer = Document.get().createDivElement();
  5. rootContainer.addClassName(treeStyles.treeStylesCss().contentTree());
  6. rootContainer.setId("content-Tree");
  7. element.appendChild(rootContainer);
  8. setElement(element);
  9. }

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library

  1. protected JQMTableGrid() {
  2. super(Document.get().createTableElement());
  3. Element table = getElement();
  4. table.setId(Document.get().createUniqueId());
  5. tHead = new CustomFlowPanel(Document.get().createTHeadElement());
  6. tBody = new CustomFlowPanel(Document.get().createTBodyElement());
  7. add(tHead);
  8. add(tBody);
  9. }

代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone

  1. protected JQMTableGrid() {
  2. super(Document.get().createTableElement());
  3. Element table = getElement();
  4. table.setId(Document.get().createUniqueId());
  5. tHead = new CustomFlowPanel(Document.get().createTHeadElement());
  6. tBody = new CustomFlowPanel(Document.get().createTBodyElement());
  7. add(tHead);
  8. add(tBody);
  9. }

代码示例来源:origin: OpenNMS/opennms

  1. protected LoadTracker() {
  2. if(Document.get().getElementById(m_trackerDivId) == null) {
  3. Element div = DOM.createDiv();
  4. div.getStyle().setPosition(Position.ABSOLUTE);
  5. div.getStyle().setTop(0.0, Unit.PX);
  6. div.getStyle().setLeft(-9999.0, Unit.PX);
  7. div.getStyle().setVisibility(Visibility.HIDDEN);
  8. div.setId("loadTracker");
  9. Document.get().getBody().appendChild(div);
  10. }
  11. }

代码示例来源:origin: org.opennms.features.topology/org.opennms.features.topology.app

  1. protected LoadTracker() {
  2. if(Document.get().getElementById(m_trackerDivId) == null) {
  3. Element div = DOM.createDiv();
  4. div.getStyle().setPosition(Position.ABSOLUTE);
  5. div.getStyle().setTop(0.0, Unit.PX);
  6. div.getStyle().setLeft(-9999.0, Unit.PX);
  7. div.getStyle().setVisibility(Visibility.HIDDEN);
  8. div.setId("loadTracker");
  9. Document.get().getBody().appendChild(div);
  10. }
  11. }

相关文章

Element类方法