Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.NodeList


     */

    public void apply(XPathContext context) {
        switch (position) {
            case FIRST: {
                NodeList list = content.getChildNodes();
                int count = list.getLength();
                for (int i=count-1; i>=0; i--) {
                    targetNode.insertFirst(list.getItem(i));
                }
                break;
            }
            case LAST:{
                while (content.hasChildNodes()) {
                    targetNode.appendChild(content.getFirstChild());
                }
                break;
            }
            case BEFORE: {
                Node refNode = targetNode.getChild(position);
                NodeList list = content.getChildNodes();
                int count = list.getLength();
                for (int i=0; i < count; i++) {
                    targetNode.insertBefore(list.getItem(i), refNode);
                }
                break;
            }
            case AFTER: {
                Node refNode = targetNode.getChild(position);
                NodeList list = content.getChildNodes();
                int count = list.getLength();
                for (int i=count-1; i>=0; i--) {
                    targetNode.insertAfter(list.getItem(i), refNode);
                }
                break;
            }
            default:
                throw new UnsupportedOperationException("Unknown insert position " + position);
View Full Code Here


    public CharSequence getStringValueCS() {
        switch (nodeKind) {
            case Type.DOCUMENT:
            case Type.ELEMENT:
                NodeList children1 = node.getChildNodes();
                StringBuffer sb1 = new StringBuffer(16);
                expandStringValue(children1, sb1);
                return sb1;             

            case Type.ATTRIBUTE:
View Full Code Here

public class ChartDemoJS implements EntryPoint {

  public void onModuleLoad() {
//    GWT.setUncaughtExceptionHandler(new ClientExceptionHandler());

    NodeList nl = Document.get().getElementsByTagName("style");
    final ArrayList<String> toLoad = new ArrayList<String>();
    for (int i = 0; i < nl.getLength(); i++) {
      Element e = (Element) nl.getItem(i);
      if ("text/gss".equals(e.getAttribute("type"))) {
        GWT.log("Style = " + e.getInnerText(), null);
      }
    }
View Full Code Here

   
    Element iqElement = (Element)packet.getNode();
    if(iqElement.getElementsByTagName("ijab").getItem(0) != null)
    {
      Node iNode = iqElement.getElementsByTagName("ijab").getItem(0);
      NodeList nodeList = iNode.getChildNodes();
      for(int index = 0;index<nodeList.getLength();index++)
      {
        Node node = nodeList.getItem(index);
        String name = node.getNodeName();
        if(name.equals("showOnlineOnly"))
        {
          iJabPrefs.instance().showOnlineOnly = TextUtils.str2bool(node.getNodeValue());
        }
View Full Code Here

        public void setHTML(String html) {
            this.html = html;
            DOM.setInnerHTML(getElement(), html);
            if (BrowserInfo.get().isIE6() && client != null) {
                // Find possible icon element
                final NodeList imgs = getElement().getElementsByTagName("IMG");
                if (imgs.getLength() > 0) {
                    client.addPngFix((Element) imgs.getItem(0).cast());
                }
            }
        }
View Full Code Here

        if (uidl.hasAttribute("type")) {
            final String type = uidl.getStringAttribute("type");
            if (type.equals("image")) {
                Element el = null;
                boolean created = false;
                NodeList nodes = getElement().getChildNodes();
                if (nodes != null && nodes.getLength() == 1) {
                    Node n = nodes.getItem(0);
                    if (n.getNodeType() == Node.ELEMENT_NODE) {
                        Element e = (Element) n;
                        if (e.getTagName().equals("IMG")) {
                            el = e;
                        }
View Full Code Here

        public void setHTML(String html) {
            this.html = html;
            DOM.setInnerHTML(getElement(), html);
            if (BrowserInfo.get().isIE6() && client != null) {
                // Find possible icon element
                final NodeList imgs = getElement().getElementsByTagName("IMG");
                if (imgs.getLength() > 0) {
                    client.addPngFix((Element) imgs.getItem(0).cast());
                }
            }
        }
View Full Code Here

    }
    return data;
  }

  protected void doAllWidths(List<String> ws, String tw) {
    NodeList gs = getGroups();
    for (int i = 0, len = gs.getLength(); i < len; i++) {
      Element s = gs.getItem(i).getChildNodes().getItem(2).cast();
      s.getStyle().setProperty("width", tw);
      if (s.getFirstChild() == null) return;
      s.getFirstChildElement().getStyle().setProperty("width", tw);
      TableSectionElement tse = s.getFirstChildElement().cast();
      NodeList<Element> cells = (NodeList) tse.getRows().getItem(0).getChildNodes();
View Full Code Here

    buf.append("</div>");
  }

  protected void doWidth(int col, String w, String tw) {
    if (!enableGrouping) return;
    NodeList gs = getGroups();
    for (int i = 0, len = gs.getLength(); i < len; i++) {
      Element s = gs.getItem(i).getChildNodes().getItem(2).cast();
      s.getStyle().setProperty("width", tw);
      s.getFirstChildElement().getStyle().setProperty("width", tw);

      TableSectionElement tse = s.getFirstChildElement().cast();
      Element e = tse.getRows().getItem(0).getChildNodes().getItem(col).cast();
View Full Code Here

  }

  @Override
  protected void templateOnColumnHiddenUpdated(int col, boolean hidden, String tw) {
    if (!enableGrouping) return;
    NodeList gs = getGroups();
    String display = hidden ? "none" : "";
    for (int i = 0, len = gs.getLength(); i < len; i++) {
      Element s = gs.getItem(i).getChildNodes().getItem(2).cast();
      s.getStyle().setProperty("width", tw);
      s.getFirstChildElement().getStyle().setProperty("width", tw);
      TableSectionElement tse = s.getFirstChildElement().cast();
      Element e = tse.getRows().getItem(0).getChildNodes().getItem(col).cast();
      e.getStyle().setProperty("display", display);
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.NodeList

Copyright © 2018 www.massapicom. 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.