Class AbstractSVGPreserveAspectRatio

java.lang.Object
org.apache.batik.dom.svg.AbstractSVGPreserveAspectRatio
All Implemented Interfaces:
XMLConstants, CSSConstants, SVGConstants, org.w3c.dom.svg.SVGPreserveAspectRatio
Direct Known Subclasses:
SVGOMAnimatedPreserveAspectRatio.AnimSVGPARValue, SVGOMAnimatedPreserveAspectRatio.BaseSVGPARValue

public abstract class AbstractSVGPreserveAspectRatio extends Object implements org.w3c.dom.svg.SVGPreserveAspectRatio, SVGConstants
Abstract implementation for SVGPreservAspectRatio This is the base implementation for SVGPreservAspectRatio
  • Field Details

    • ALIGN_VALUES

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

      protected static final 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 Details

    • AbstractSVGPreserveAspectRatio

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

    • getValueAsString

      public static 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(String value) throws DOMException
      Throws:
      DOMException
    • createDOMException

      protected abstract DOMException createDOMException(short type, String key, Object[] args)
    • setValueAsString

      protected void setValueAsString(String value) throws DOMException
      Throws:
      DOMException
    • getValueAsString

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