Examples of cloneNode()


Examples of com.google.code.appengine.imageio.metadata.IIOMetadataNode.cloneNode()

        cloned.setUserObject(getUserObject());

        if (deep) { // Clone recursively
            IIOMetadataNode c = firstChild;
            while (c != null) {
                cloned.insertBefore(c.cloneNode(true), null);
                c = c.nextSibling;
            }
        }

        return cloned;  //To change body of implemented methods use File | Settings | File Templates.
View Full Code Here

Examples of com.google.gwt.dom.client.DivElement.cloneNode()

    // find our stock box, creating if necessary
    DivElement stockBoxDiv = (DivElement) document.getElementById("stockbox." + tick.getSymbol());
    if (stockBoxDiv == null) {
      DivElement prototype = (DivElement) document.getElementById("prototypeStockBox");
      stockBoxDiv = (DivElement) prototype.cloneNode(true);
      stockBoxDiv.setId("stockbox." + tick.getSymbol());
      RootPanel.getBodyElement().appendChild(stockBoxDiv);
    }
    return stockBoxDiv;
  }
View Full Code Here

Examples of com.google.gwt.dom.client.Element.cloneNode()

  public void visualizeOrientationEvent(ClientOrientationEvent e) {
    Element rotateMe = Document.get().getElementById("rotateMe-" + e.getClientId());
    if (rotateMe == null) {
      // must be a new client! We will clone the template for this new client.
      Element template = Document.get().getElementById("rotateMeTemplate");
      rotateMe = (Element) template.cloneNode(true);
      rotateMe.setId("rotateMe-" + e.getClientId());
      rotateMe.getFirstChildElement().setInnerText(e.getClientId());
      template.getParentElement().appendChild(rotateMe);
    }
View Full Code Here

Examples of com.google.gwt.dom.client.TableCellElement.cloneNode()

      // Add a full row to get ideal widths
      TableRowElement tr = Document.get().createTRElement();
      TableCellElement td = Document.get().createTDElement();
      td.setInnerHTML("<div style=\"height:1px;width:1px;\"></div>");
      for (int i = 0; i < columnCount + offset; i++) {
        tr.appendChild(td.cloneNode(true));
      }
      getTableBody(table).appendChild(tr);
      return new IdealColumnWidthInfo(table, tr, columnCount, offset);
    }
View Full Code Here

Examples of com.google.gwt.user.client.Element.cloneNode()

    }
    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.
View Full Code Here

Examples of com.google.javascript.rhino.Node.cloneNode()

            Node expr = n.getFirstChild();
            n.setType(Token.FOR);
            Node empty = IR.empty();
            empty.copyInformationFrom(n);
            n.addChildBefore(empty, expr);
            n.addChildAfter(empty.cloneNode(), expr);
            reportCodeChange("WHILE node");
          }
          break;

        case Token.FUNCTION:
View Full Code Here

Examples of javax.xml.soap.SOAPElement.cloneNode()

            Iterator it = header.extractAllHeaderElements();
            ArrayList<Element> list = new ArrayList<Element>();
            while (it.hasNext()) {
                SOAPElement nxtSoapElement = (SOAPElement) it.next();
                list.add((Element) nxtSoapElement.cloneNode(true));
            }

            Element[] elems = (Element[]) list
                    .toArray(new Element[list.size()]); // Use generics
            localInHeaders.set(elems);
View Full Code Here

Examples of mf.org.w3c.dom.Node.cloneNode()

            Node d;
            if (defaults != null &&
                (d = defaults.getNamedItem(name)) != null &&
                findNamePoint(name, index+1) < 0) {
                    NodeImpl clone = (NodeImpl)d.cloneNode(true);
                    if (d.getLocalName() !=null){
                            // we must rely on the name to find a default attribute
                            // ("test:attr"), but while copying it from the DOCTYPE
                            // we should not loose namespace URI that was assigned
                            // to the attribute in the instance document.
View Full Code Here

Examples of mf.org.w3c.dom.Node.cloneNode()

            if (defaults != null
                    && (d = defaults.getNamedItem(nodeName)) != null)
            {
                int j = findNamePoint(nodeName,0);
                if (j>=0 && findNamePoint(nodeName, j+1) < 0) {
                    NodeImpl clone = (NodeImpl)d.cloneNode(true);
                    clone.ownerNode = ownerNode;
                    if (d.getLocalName() != null) {
                        // we must rely on the name to find a default attribute
                        // ("test:attr"), but while copying it from the DOCTYPE
                        // we should not loose namespace URI that was assigned
View Full Code Here

Examples of org.apache.lenya.xml.DOMParserFactory.cloneNode()

                DOMParserFactory dpf = new DOMParserFactory();

                // Create a new document, where the actual content starts at the root element, which is the inner part of requestDoc
                Document contentDocument = dpf.getDocument();
                contentDocument.appendChild(
                    dpf.cloneNode(contentDocument, contentNode, true));
                new DOMWriter(new FileOutputStream(tempFile)).printWithoutFormatting(
                    contentDocument);
            } catch (Exception e) {
                getLogger().error(".act(): Exception during writing to temp file", e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.