Package net.sf.latexdraw.parsers.svg

Examples of net.sf.latexdraw.parsers.svg.SVGNodeList



  @Before
  public void setUp() {
    doc  = new SVGDocument();
    list = new SVGNodeList();
  }
View Full Code Here


    node.setParent(null);
    assertNull(node.getParent());
    node.setParent(elt);
    assertEquals(elt, node.getParent());
    SVGNodeList list = elt.getChildren(getNameNode());
    assertEquals(1, list.getLength());
    node.setParent(null);
    list = elt.getChildren(getNameNode());
    assertEquals(0, list.getLength());
  }
View Full Code Here

   * @param elt The SVGMarkerElement uses to initialise the arrow.
   * @param owner The figure the has the arrow.
   * @since 2.0.0
   */
  protected void setArrow(final SVGMarkerElement elt, final IShape owner, final String svgMarker) {
    SVGNodeList nl = elt.getChildren(SVGElements.SVG_PATH);

    if(nl.getLength()==0) {
      nl = elt.getChildren(SVGElements.SVG_CIRCLE);

      if(nl.getLength()>0)
        setArrow((SVGCircleElement)nl.item(0), elt, owner);
    }
    else
      setArrow((SVGPathElement)nl.item(0), elt, owner, svgMarker);
  }
View Full Code Here

      shape.setDistLabelsX(values.get(0).getX());
      shape.setDistLabelsY(values.get(0).getY());
    }

    /* Looking for the two axe in order to get the position of the axes. */
    final SVGNodeList nl = elt.getChildren(SVGElements.SVG_G);
    int i=0;
        final int size = nl.getLength();
        SVGGElement l1=null;
        SVGGElement l2=null;
        SVGElement element;

    while((l1==null || l2==null) && i<size) {
      element = nl.item(i);

      if(element instanceof SVGGElement)
        if(l1==null)
          l1 = (SVGGElement)element;
        else
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.parsers.svg.SVGNodeList

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.