Class AbstractSVGTransformList.SVGTransformItem

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean angleOnly
      Whether the rotation transform value specifies only an angle.
      protected java.lang.String itemStringValue
      String representation of the item.
      protected AbstractSVGList parent
      List the item belongs to.
      protected boolean xOnly
      Whether the transform value specifies only an x value, no y value.
      • Fields inherited from interface org.w3c.dom.svg.SVGTransform

        SVG_TRANSFORM_MATRIX, SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SCALE, SVG_TRANSFORM_SKEWX, SVG_TRANSFORM_SKEWY, SVG_TRANSFORM_TRANSLATE, SVG_TRANSFORM_UNKNOWN
    • Constructor Summary

      Constructors 
      Constructor Description
      SVGTransformItem()
      Creates a new, uninitialized SVGTransformItem.
      SVGTransformItem​(org.w3c.dom.svg.SVGTransform transform)
      Creates a new SVGTransformItem from the given SVGTransform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void assign​(org.w3c.dom.svg.SVGTransform transform)
      Copies the values from the given SVGTransform into this AbstractSVGTransformList.SVGTransformItem.
      protected org.w3c.dom.svg.SVGMatrix createMatrix()
      Creates the SVGMatrix used to store the transform.
      AbstractSVGList getParent()
      Returns the parent list of this item.
      protected java.lang.String getStringValue()
      Returns the string representation of this transform.
      java.lang.String getValueAsString()
      Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.
      protected void matrix​(float a, float b, float c, float d, float e, float f)
      Sets the transform to be a matrix transform.
      protected void resetAttribute()
      Notifies the parent list that this item has changed.
      protected void rotate​(float angle)
      Sets the transform to be rotation.
      protected void scale​(float x)
      Sets the transform to be an x scale.
      void setMatrix​(org.w3c.dom.svg.SVGMatrix matrix)
      DOM: Implements SVGTransform.setMatrix(SVGMatrix).
      void setParent​(AbstractSVGList list)
      Assigns a parent list to this item.
      void setRotate​(float angle, float cx, float cy)
      DOM: Implements SVGTransform.setRotate(float,float,float).
      void setScale​(float sx, float sy)
      DOM: Implements SVGTransform.setScale(float,float).
      void setSkewX​(float angle)
      DOM: Implements SVGTransform.setSkewX(float).
      void setSkewY​(float angle)
      DOM: Implements SVGTransform.setSkewY(float).
      void setTranslate​(float tx, float ty)
      DOM: Implements SVGTransform.setTranslate(float,float).
      protected void translate​(float x)
      Sets the transform to be an x translation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • xOnly

        protected boolean xOnly
        Whether the transform value specifies only an x value, no y value.
      • angleOnly

        protected boolean angleOnly
        Whether the rotation transform value specifies only an angle.
      • itemStringValue

        protected java.lang.String itemStringValue
        String representation of the item. This is a cached representation of the item while it is not changed.
    • Constructor Detail

      • SVGTransformItem

        public SVGTransformItem()
        Creates a new, uninitialized SVGTransformItem.
      • SVGTransformItem

        public SVGTransformItem​(org.w3c.dom.svg.SVGTransform transform)
        Creates a new SVGTransformItem from the given SVGTransform.
    • Method Detail

      • resetAttribute

        protected void resetAttribute()
        Notifies the parent list that this item has changed. This also discards the cached representation of the item.
      • setParent

        public void setParent​(AbstractSVGList list)
        Assigns a parent list to this item.
        Specified by:
        setParent in interface SVGItem
        Parameters:
        list - The list the item belongs.
      • getParent

        public AbstractSVGList getParent()
        Returns the parent list of this item.
        Specified by:
        getParent in interface SVGItem
        Returns:
        list the item belongs to. This could be if the item belongs to no list.
      • getValueAsString

        public java.lang.String getValueAsString()
        Returns the cached representation of the item if valid, otherwise recomputes the String representation of the item.
        Specified by:
        getValueAsString in interface SVGItem
        Returns:
        textual representation of the item to be inserted in the attribute value representing the list.
      • translate

        protected void translate​(float x)
        Sets the transform to be an x translation.
      • rotate

        protected void rotate​(float angle)
        Sets the transform to be rotation.
      • scale

        protected void scale​(float x)
        Sets the transform to be an x scale.
      • matrix

        protected void matrix​(float a,
                              float b,
                              float c,
                              float d,
                              float e,
                              float f)
        Sets the transform to be a matrix transform.
      • setMatrix

        public void setMatrix​(org.w3c.dom.svg.SVGMatrix matrix)
        DOM: Implements SVGTransform.setMatrix(SVGMatrix).
        Specified by:
        setMatrix in interface org.w3c.dom.svg.SVGTransform
        Overrides:
        setMatrix in class AbstractSVGTransform
      • setTranslate

        public void setTranslate​(float tx,
                                 float ty)
        DOM: Implements SVGTransform.setTranslate(float,float).
        Specified by:
        setTranslate in interface org.w3c.dom.svg.SVGTransform
        Overrides:
        setTranslate in class AbstractSVGTransform
      • setScale

        public void setScale​(float sx,
                             float sy)
        DOM: Implements SVGTransform.setScale(float,float).
        Specified by:
        setScale in interface org.w3c.dom.svg.SVGTransform
        Overrides:
        setScale in class AbstractSVGTransform
      • setRotate

        public void setRotate​(float angle,
                              float cx,
                              float cy)
        DOM: Implements SVGTransform.setRotate(float,float,float).
        Specified by:
        setRotate in interface org.w3c.dom.svg.SVGTransform
        Overrides:
        setRotate in class AbstractSVGTransform
      • setSkewX

        public void setSkewX​(float angle)
        DOM: Implements SVGTransform.setSkewX(float).
        Specified by:
        setSkewX in interface org.w3c.dom.svg.SVGTransform
        Overrides:
        setSkewX in class AbstractSVGTransform
      • setSkewY

        public void setSkewY​(float angle)
        DOM: Implements SVGTransform.setSkewY(float).
        Specified by:
        setSkewY in interface org.w3c.dom.svg.SVGTransform
        Overrides:
        setSkewY in class AbstractSVGTransform
      • createMatrix

        protected org.w3c.dom.svg.SVGMatrix createMatrix()
        Creates the SVGMatrix used to store the transform.
        Specified by:
        createMatrix in class AbstractSVGTransform
        Returns:
        SVGMatrix representing the transformation
      • getStringValue

        protected java.lang.String getStringValue()
        Returns the string representation of this transform.