Class AbstractSVGPreserveAspectRatio

    • Field Detail

      • ALIGN_VALUES

        protected static final java.lang.String[] ALIGN_VALUES
        Strings for the 'align' values.
      • MEET_OR_SLICE_VALUES

        protected static final java.lang.String[] MEET_OR_SLICE_VALUES
        Strings for the 'meet-or-slice' values.
      • align

        protected short align
        align property by default the value is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID
      • meetOrSlice

        protected short meetOrSlice
        meetOrSlice property by default the value is SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET;
    • Constructor Detail

      • AbstractSVGPreserveAspectRatio

        public AbstractSVGPreserveAspectRatio()
        Creates a new instance of AbstractSVGPreserveAspectRatio
    • Method Detail

      • getValueAsString

        public static java.lang.String getValueAsString​(short align,
                                                        short meetOrSlice)
        Returns a string representation of a preserve aspect ratio value specified numerically.
        Parameters:
        align - the align value, one of the SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_* constants
        meetOrSlice - the meet-or-slice value, one of the SVGPreserveAspectRatio.SVG_MEETORSLICE_* constants
      • getAlign

        public short getAlign()
        Specified by:
        getAlign in interface org.w3c.dom.svg.SVGPreserveAspectRatio
      • getMeetOrSlice

        public short getMeetOrSlice()
        Specified by:
        getMeetOrSlice in interface org.w3c.dom.svg.SVGPreserveAspectRatio
      • setAlign

        public void setAlign​(short align)
        Specified by:
        setAlign in interface org.w3c.dom.svg.SVGPreserveAspectRatio
      • setMeetOrSlice

        public void setMeetOrSlice​(short meetOrSlice)
        Specified by:
        setMeetOrSlice in interface org.w3c.dom.svg.SVGPreserveAspectRatio
      • reset

        public void reset()
      • setAttributeValue

        protected abstract void setAttributeValue​(java.lang.String value)
                                           throws org.w3c.dom.DOMException
        Throws:
        org.w3c.dom.DOMException
      • createDOMException

        protected abstract org.w3c.dom.DOMException createDOMException​(short type,
                                                                       java.lang.String key,
                                                                       java.lang.Object[] args)
      • setValueAsString

        protected void setValueAsString​(java.lang.String value)
                                 throws org.w3c.dom.DOMException
        Throws:
        org.w3c.dom.DOMException
      • getValueAsString

        public java.lang.String getValueAsString()
        Returns the string representation of the preserve aspect ratio value.