Package com.kitfox.svg.xml

Examples of com.kitfox.svg.xml.StyleAttribute


    {
//        if (trackManager.getNumTracks() == 0) return false;
        boolean changeState = super.updateTime(curTime);

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean shapeChange = false;
       
        if (getPres(sty.setName("x1")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != x1)
            {
                x1 = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("y1")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != y1)
            {
                y1 = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("x2")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != x2)
            {
                x2 = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("y2")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != y2)
            {
                y2 = newVal;
                shapeChange = true;
            }
View Full Code Here


   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("transform")))
        {
            xform = parseTransform(sty.getStringValue());
        }
    }
View Full Code Here

     * @return - true if this node has changed state as a result of the time
     * update
     */
    public boolean updateTime(double curTime) throws SVGException
    {
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("transform")))
        {
            AffineTransform newXform = parseTransform(sty.getStringValue());
            if (!newXform.equals(xform))
            {
                xform = newXform;
                return true;
            }
View Full Code Here

*/
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("x"))) x = sty.getFloatValueWithUnits();

        if (getPres(sty.setName("y"))) y = sty.getFloatValueWithUnits();

        if (getPres(sty.setName("width"))) width = sty.getFloatValueWithUnits();

        if (getPres(sty.setName("height"))) height = sty.getFloatValueWithUnits();

        if (getPres(sty.setName("xlink:href")))
        {
            URI src = sty.getURIValue(getXMLBase());
            href = diagram.getUniverse().getElement(src);
        }
       
        //Determine use offset/scale
        refXform = new AffineTransform();
View Full Code Here

    {
//        if (trackManager.getNumTracks() == 0) return false;
        boolean changeState = super.updateTime(curTime);

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean shapeChange = false;
       
        if (getPres(sty.setName("x")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != x)
            {
                x = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("y")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != y)
            {
                y = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("width")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != width)
            {
                width = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("height")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != height)
            {
                height = newVal;
                shapeChange = true;
            }
        }
       
        if (getPres(sty.setName("xlink:href")))
        {
            URI src = sty.getURIValue(getXMLBase());
            SVGElement newVal = diagram.getUniverse().getElement(src);
            if (newVal != href)
            {
                href = newVal;
                shapeChange = true;
View Full Code Here

   
    protected void build() throws SVGException
    {
        super.build();
       
        StyleAttribute sty = new StyleAttribute();
       
        if (getPres(sty.setName("unicode"))) unicode = sty.getStringValue();
    }
View Full Code Here

      return;
   
    element = diagram.getElement( id );
    elementName = id;
    if ( element != null ) {
      StyleAttribute sa = element.getPresAbsolute( "visibility" );
      String visibility;
      if ( sa != null )
        hidden = "hidden".equals( sa.getStringValue());
      else {
        hidden = false;
        try {
          element.addAttribute( "visibility", AnimationElement.AT_XML, "hidden" );
        }
View Full Code Here

    protected void build() throws SVGException
    {
        super.build();

        StyleAttribute sty = new StyleAttribute();

        if (getPres(sty.setName("cx")))
        {
            cx = sty.getFloatValueWithUnits();
        }

        if (getPres(sty.setName("cy")))
        {
            cy = sty.getFloatValueWithUnits();
        }

        if (getPres(sty.setName("r")))
        {
            r = sty.getFloatValueWithUnits();
        }

        circle.setFrame(cx - r, cy - r, r * 2f, r * 2f);
    }
View Full Code Here

    {
//        if (trackManager.getNumTracks() == 0) return false;
        boolean changeState = super.updateTime(curTime);

        //Get current values for parameters
        StyleAttribute sty = new StyleAttribute();
        boolean shapeChange = false;

        if (getPres(sty.setName("cx")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != cx)
            {
                cx = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("cy")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != cy)
            {
                cy = newVal;
                shapeChange = true;
            }
        }

        if (getPres(sty.setName("r")))
        {
            float newVal = sty.getFloatValueWithUnits();
            if (newVal != r)
            {
                r = newVal;
                shapeChange = true;
            }
View Full Code Here

    protected void build() throws SVGException
    {
        super.build();

        StyleAttribute sty = new StyleAttribute();

        if (getPres(sty.setName("refX")))
        {
            refX = sty.getFloatValueWithUnits();
        }
        if (getPres(sty.setName("refY")))
        {
            refY = sty.getFloatValueWithUnits();
        }
        if (getPres(sty.setName("markerWidth")))
        {
            markerWidth = sty.getFloatValueWithUnits();
        }
        if (getPres(sty.setName("markerHeight")))
        {
            markerHeight = sty.getFloatValueWithUnits();
        }

        if (getPres(sty.setName("orient")))
        {
            if ("auto".equals(sty.getStringValue()))
            {
                orient = Float.NaN;
            } else
            {
                orient = sty.getFloatValue();
            }
        }

        if (getPres(sty.setName("viewBox")))
        {
            float[] dim = sty.getFloatList();
            viewBox = new Rectangle2D.Float(dim[0], dim[1], dim[2], dim[3]);
        }

        if (viewBox == null)
        {
            viewBox = new Rectangle(0, 0, 1, 1);
        }

        if (getPres(sty.setName("markerUnits")))
        {
            String markerUnits = sty.getStringValue();
            if (markerUnits != null && markerUnits.equals("userSpaceOnUse"))
            {
                markerUnitsStrokeWidth = false;
            }
        }
View Full Code Here

TOP

Related Classes of com.kitfox.svg.xml.StyleAttribute

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.