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

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

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

Element.getNodeName介绍

暂无

代码示例

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

if ("body".equals(getElement().getNodeName().toLowerCase(Locale.ROOT))) {
 return;

代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl

/**
 * Clone a single SVG element.
 * 
 * @param source
 *            The source SVG element.
 * @return Returns the clone.
 */
private static Element clone(Element source) {
  if (source == null || source.getNodeName() == null) {
    return null;
  }
  if ("#text".equals(source.getNodeName())) {
    return Document.get().createTextNode(source.getNodeValue()).cast();
  }
  Element clone = createElementNS(Dom.NS_SVG, source.getNodeName());
  cloneAttributes(source, clone);
  for (int i = 0; i < source.getChildCount(); i++) {
    Element child = source.getChild(i).cast();
    clone.appendChild(clone(child));
  }
  return clone;
}

代码示例来源:origin: org.geomajas/geomajas-gwt-client-impl

/**
 * Clone a single SVG element.
 * 
 * @param source
 *            The source SVG element.
 * @return Returns the clone.
 */
private static Element clone(Element source) {
  if (source == null || source.getNodeName() == null) {
    return null;
  }
  if ("#text".equals(source.getNodeName())) {
    return Document.get().createTextNode(source.getNodeValue()).cast();
  }
  Element clone = createElementNS(Dom.NS_SVG, source.getNodeName());
  cloneAttributes(source, clone);
  for (int i = 0; i < source.getChildCount(); i++) {
    Element child = source.getChild(i).cast();
    clone.appendChild(clone(child));
  }
  return clone;
}

代码示例来源:origin: org.geomajas/geomajas-client-common-gwt

/**
 * Clone a single SVG element.
 * 
 * @param source
 *            The source SVG element.
 * @return Returns the clone.
 */
public Element cloneSvgElement(Element source) {
  if (source == null || source.getNodeName() == null) {
    return null;
  }
  if ("#text".equals(source.getNodeName())) {
    return Document.get().createTextNode(source.getNodeValue()).cast();
  }
  Element clone = createElementNS(Dom.NS_SVG, source.getNodeName(), Dom.createUniqueId());
  cloneAttributes(source, clone);
  for (int i = 0; i < source.getChildCount(); i++) {
    Element child = source.getChild(i).cast();
    clone.appendChild(cloneSvgElement(child));
  }
  return clone;
}

代码示例来源:origin: org.overlord/overlord-commons-gwt

/**
 * @see com.google.gwt.user.client.ui.Panel#add(com.google.gwt.user.client.ui.Widget)
 */
@Override
public void add(Widget w) {
  if (w == null)
    throw new NullPointerException("Cannot add a null widget."); //$NON-NLS-1$
  w.removeFromParent();
  children.add(w);
  
  Element li;
  if (w.getElement().getNodeName().toLowerCase().equals("li")) { //$NON-NLS-1$
    // The widget is a list item.  Simply use it. 
    li = w.getElement();
  } else {
    // The widget needs wrapped with a list item.
    li = Document.get().createLIElement().cast();
    DOM.appendChild(li, w.getElement());
  }
  liMap.put(w, li);
  DOM.appendChild(getElement(), li);
  adopt(w);
}

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

if ("body".equals(getElement().getNodeName().toLowerCase(Locale.ROOT))) {
 return;

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

if ("body".equals(StringCase.toLower(getElement().getNodeName()))) {
 return;

相关文章

微信公众号

最新文章

更多

Element类方法