Examples of Div


Examples of org.htmlparser.tags.Div

        parser.addScanner(new TableScanner(parser));
        parser.addScanner(new DivScanner());
        parseAndAssertNodeCount(1);
        assertType("node should be table", TableTag.class, node[0]);
        TableTag tableTag = (TableTag) node[0];
        Div div = (Div) tableTag.searchFor(Div.class).toNodeArray()[0];
        assertEquals("div contents", "some text", div.toPlainTextString());
    }
View Full Code Here

Examples of org.htmlparser.tags.Div

        createParser("<div><INPUT type=\"text\" name=\"X\">Hello</INPUT></div>");
        parser.addScanner(new DivScanner());
        parser.addScanner(new InputTagScanner());
        parseAndAssertNodeCount(1);
        assertType("node should be div", Div.class, node[0]);
        Div div = (Div) node[0];
        assertType("child not input", InputTag.class, div.getChild(0));
    }
View Full Code Here

Examples of org.htmlparser.tags.Div

        createParser(testHTML, "http://www.cia.gov");
        parser.registerScanners();
        parseAndAssertNodeCount(1);
        // Check the tags
        assertType("node", Div.class, node[0]);
        Div div = (Div) node[0];
        Tag fontTag = (Tag) div.children().nextNode();
        assertEquals(
            "Second tag should be corrected",
            "font face=\"Arial,helvetica,\" sans-serif=\"sans-serif\" size=\"2\" color=\"#FFFFFF\"",
            fontTag.getText());
        // Try to parse the parameters from this tag.
View Full Code Here

Examples of org.htmlparser.tags.Div

                + "</DIV>");
        parser.registerScanners();
        parser.addScanner(new DivScanner());
        parser.addScanner(new SpanScanner());
        parseAndAssertNodeCount(1);
        Div div = (Div) node[0];
        NodeList nodeList = new NodeList();
        div.collectInto(nodeList, Span.class);
        Node[] spans = nodeList.toNodeArray();
        assertSpanContent(spans);
    }
View Full Code Here

Examples of org.htmlparser.tags.Div

        super(filter, MATCH_STRING);
    }

    public Tag createTag(TagData tagData, CompositeTagData compositeTagData)
    {
        return new Div(tagData, compositeTagData);
    }
View Full Code Here

Examples of org.htmlparser.tags.Div

    {
        createParser("<div style=\"page-break-before: always; \" />");
        parser.registerScanners();
        parseAndAssertNodeCount(1);
        assertType("div tag", Div.class, node[0]);
        Div div = (Div) node[0];
        assertStringEquals(
            "style",
            "page-break-before: always; ",
            div.getAttribute("style"));
    }
View Full Code Here

Examples of org.jacoco.examples.expressions.Div

    IExpression e = factor();
    while (true) {
      if (accept('*')) {
        e = new Mul(e, factor());
      } else if (accept('/')) {
        e = new Div(e, factor());
      } else {
        return e;
      }
    }
  }
View Full Code Here

Examples of org.kohsuke.rngom.ast.builder.Div

    }
  }

  final public void Div(GrammarSection section, Scope scope, Annotations a) throws ParseException {
  Token t;
  Div div = section.makeDiv();
    t = jj_consume_token(6);
    jj_consume_token(11);
    a = GrammarBody(div, scope, a);
                                                 topLevelComments(div);
    jj_consume_token(12);
    div.endDiv(makeLocation(t), a);
  }
View Full Code Here

Examples of org.structr.web.entity.html.Div

      final List<Div> divs = collectNodes(nodes, Div.class);

      assertEquals("Wrong number of divs returned from node query", 4, divs.size());

      // check first div, should have no siblings and one child
      final Div firstDiv = divs.get(0);
      assertEquals("Wrong number of children", 1, firstDiv.getChildRelationships().size());
      assertNull("Node should not have siblings", firstDiv.getNextSibling());

      // check second div, should have no siblings and two children
      final Div secondDiv = divs.get(1);
      assertEquals("Wrong number of children", 2, secondDiv.getChildRelationships().size());
      assertNull("Node should not have siblings", secondDiv.getNextSibling());

      // check third div, should have one sibling and one #text child
      final Div thirdDiv = divs.get(2);
      assertEquals("Wrong number of children", 1, thirdDiv.getChildRelationships().size());
      assertNotNull("Node should have one sibling", thirdDiv.getNextSibling());

      // check fourth div, should have no siblings and no children
      final Div fourthDiv = divs.get(3);
      assertEquals("Wrong number of children", 0, fourthDiv.getChildRelationships().size());
      assertNull("Node should not have siblings", fourthDiv.getNextSibling());




View Full Code Here

Examples of org.zkoss.zul.Div

public class LiveGroupRenderer implements RowRenderer {

  public void render(Row row, java.lang.Object data) {
    if(data instanceof String[]) {
      String[] ary = (String[]) data;
      Div div = new Div();
      Image icon = new Image();
      icon.setStyle("padding: 0px 10px");
      icon.setSrc("/img/Centigrade-Widget-Icons/EnvelopeOpen-16x16.png");
      div.appendChild(icon);
      new Label(ary[0]).setParent(div);
      row.appendChild(div);
      new Label(ary[1]).setParent(row);
      new Label(ary[2]).setParent(row);
      new Label(ary[3]).setParent(row);
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.