Examples of OMSVGSVGElement


Examples of org.vectomatic.dom.svg.OMSVGSVGElement

  public static final OMSVGSVGElement parse(String rawSvg) throws ParserException {
    SVGSVGElement elt = impl.parse(rawSvg);
    if (!SVGConstants.SVG_NAMESPACE_URI.equals(DOMHelper.getNamespaceURI(elt))) {
      throw new ParserException(ParserException.Type.NotSvg, "Invalid root element: {" + DOMHelper.getNamespaceURI(elt) + "}" + elt.getTagName());
    }
    return new OMSVGSVGElement(elt);
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.OMSVGSVGElement

        SimplePanel borderpanel = new SimplePanel();
        borderpanel.setStyleName("header_panel");
        myDockLayoutPanel.addWest(greenLateralPanel, 10);
        myDockLayoutPanel.addWest(borderpanel, 2);

        final OMSVGSVGElement svg = images.logo_svg().getSvg();
        SVGImage myImage = new SVGImage(svg) {
            protected void onAttach() {
                OMSVGRect viewBox = svg.getViewBox().getBaseVal();
                if (viewBox.getWidth() == 0 || viewBox.getHeight() == 0) {
                    OMSVGRect bbox = svg.getBBox();
                    bbox.assignTo(viewBox);
                }
                svg.getStyle().setWidth(300, Unit.PX);
                svg.getStyle().setHeight(130, Unit.PX);
                super.onAttach();
            }
        };

        myImage.setStyleName("logo");
View Full Code Here

Examples of org.vectomatic.dom.svg.OMSVGSVGElement

    SimplePanel borderpanel = new SimplePanel();
    borderpanel.setStyleName("header_panel");
    myDockLayoutPanel.addWest(greenLateralPanel, 10);
    myDockLayoutPanel.addWest(borderpanel, 2);

    final OMSVGSVGElement svg = images.logo_svg().getSvg();
    SVGImage myImage = new SVGImage(svg)
    {
      protected void onAttach() {
          OMSVGRect viewBox = svg.getViewBox().getBaseVal();
        if (viewBox.getWidth() == 0 || viewBox.getHeight() == 0) {
          OMSVGRect bbox = svg.getBBox();
          bbox.assignTo(viewBox);
        }       
        svg.getStyle().setWidth(300, Unit.PX);
        svg.getStyle().setHeight(130, Unit.PX);
        super.onAttach();
        }
    }
                       
    myImage.setStyleName("logo");
View Full Code Here

Examples of org.vectomatic.dom.svg.OMSVGSVGElement

   * the document resulting from the parse
   */
  public OMSVGSVGElement parse(String rawSvg) throws JavaScriptException {
    SVGDocument doc = parseFromString(rawSvg, "text/xml").cast();
    SVGSVGElement svg = DOMHelper.importNode(DOMHelper.getCurrentDocument(), doc.getDocumentElement(), true).cast();
      return new OMSVGSVGElement(svg);
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.OMSVGSVGElement

    SVGDocument doc = parseFromString(rawSvg, "text/xml").cast();
    SVGSVGElement svg = DOMHelper.importNode(DOMHelper.getCurrentDocument(), doc.getDocumentElement(), true).cast();
    // For some reason xlink:href are not correctly evaluated in
    // some cases in mozilla. If one clones the node this seems
    // to solve the problem
      return new OMSVGSVGElement((SVGSVGElement)svg.cloneNode(true).cast());
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.OMSVGSVGElement

   */
  public final OMSVGSVGElement parse(String rawSvg) throws JavaScriptException {
    SVGDocument doc = parseFromString(rawSvg, "text/xml").cast();
    SVGSVGElement svg = DOMHelper.importNode(DOMHelper.getCurrentDocument(), doc.getDocumentElement(), true).cast();
    operaFix(svg);
      return new OMSVGSVGElement(svg);
  }
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.