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

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

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

Element.cloneNode介绍

暂无

代码示例

代码示例来源:origin: com.extjs/gxt

/**
 * Clones the element.
 * 
 * @param deep true to clone children
 * @return the new element
 */
public Element cloneNode(boolean deep) {
 return (Element) dom.cloneNode(deep);
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

private void cloneAndAppendRow(VScrollTableRow row) {
  Element clonedTR = null;
  clonedTR = row.getElement().cloneNode(true).cast();
  clonedTR.getStyle().setVisibility(Visibility.VISIBLE);
  cloneTable.appendChild(clonedTR);
}

代码示例来源:origin: sk.seges.acris/acris-widgets-beantable

/**
 * Resizes the grid to the specified number of rows.
 * 
 * @param rows the number of rows
 * @throws IndexOutOfBoundsException
 */
public void resizeRows(int rows) {
 if (numRows == rows) {
  return;
 }
 if (rows < 0) {
  throw new IndexOutOfBoundsException("Cannot set number of rows to "
    + rows);
 }
 if (numRows < rows) {
  Element tr = createRow();
  getBodyElement().appendChild(tr);
  for (int i = numRows + 1; i < rows; i++) {
   getBodyElement().appendChild(tr.cloneNode(true));
  }
  numRows = rows;
 } else {
  while (numRows > rows) {
   // Fewer rows. Remove extraneous ones.
   removeRow(numRows - 1);
  }
 }
}

代码示例来源:origin: sk.seges.acris/acris-widgets-beantable

for (int i = 0; i < numRows; i++) {
 Element tr = getRowFormatter().getElement(i);
 tr.insertBefore(td.cloneNode(true), tr.getFirstChildElement());

代码示例来源:origin: sk.seges.acris/acris-widgets-beantable

mockScrollable = com.google.gwt.dom.client.Element.as(dataWrapper.cloneNode(false));
mockScrollable.getStyle().setProperty("position", "absolute");
mockScrollable.getStyle().setProperty("top", "0px");

相关文章

微信公众号

最新文章

更多

Element类方法