Class TimingParser

    • Field Detail

      • useSVG11AccessKeys

        protected boolean useSVG11AccessKeys
        Allows the use of accessKey() timing specifiers with a single character, as specified in SVG 1.1.
      • useSVG12AccessKeys

        protected boolean useSVG12AccessKeys
        Allows the use of accessKey() timing specifiers with a DOM 3 key name, as specified in SVG 1.2.
    • Constructor Detail

      • TimingParser

        public TimingParser​(boolean useSVG11AccessKeys,
                            boolean useSVG12AccessKeys)
        Creates a new TimingParser.
        Parameters:
        useSVG11AccessKeys - allows the use of accessKey() timing specifiers with a single character
        useSVG12AccessKeys - allows the use of accessKey() with a DOM 3 key name
    • Method Detail

      • parseTimingSpecifier

        protected java.lang.Object[] parseTimingSpecifier()
                                                   throws ParseException,
                                                          java.io.IOException
        Parses a timing specifier. Returns an array of Objects of the form:
        • { TIME_OFFSET, offset }
        • { TIME_SYNCBASE, offset, id, time-symbol }
        • { TIME_EVENTBASE, offset, id, event-ref }
        • { TIME_REPEAT, offset, id, repeat-count }
        • { TIME_ACCESSKEY, offset, character }
        • { TIME_ACCESSKEY_SVG12, offset, key-name }
        • { TIME_MEDIA_MARKER, id, marker-name }
        • { TIME_WALLCLOCK, wallclock-value }
        • { TIME_INDEFINITE }
        Throws:
        ParseException
        java.io.IOException
      • parseName

        protected java.lang.String parseName()
                                      throws ParseException,
                                             java.io.IOException
        Parses an XML name with optional escaping in the middle.
        Throws:
        ParseException
        java.io.IOException
      • parseIDValue

        protected java.lang.Object[] parseIDValue​(boolean escaped)
                                           throws ParseException,
                                                  java.io.IOException
        Parses a timing specifier that starts with a word.
        Parameters:
        escaped - whether a backslash appeared before this timing specifier
        Throws:
        ParseException
        java.io.IOException
      • parseClockValue

        protected float parseClockValue()
                                 throws ParseException,
                                        java.io.IOException
        Parses a clock value.
        Throws:
        ParseException
        java.io.IOException
      • parseOffset

        protected float parseOffset()
                             throws ParseException,
                                    java.io.IOException
        Parses an offset value.
        Throws:
        ParseException
        java.io.IOException
      • parseDigits

        protected int parseDigits()
                           throws ParseException,
                                  java.io.IOException
        Parses a sequence of digits and returns the integer.
        Throws:
        ParseException
        java.io.IOException
      • parseFraction

        protected float parseFraction()
                               throws ParseException,
                                      java.io.IOException
        Parses a '.' and a sequence of digits and returns the float.
        Throws:
        ParseException
        java.io.IOException
      • parseUnit

        protected float parseUnit()
                           throws ParseException,
                                  java.io.IOException
        Parses a time unit and returns the float for the multiplier.
        Throws:
        ParseException
        java.io.IOException
      • parseWallclockValue

        protected java.util.Calendar parseWallclockValue()
                                                  throws ParseException,
                                                         java.io.IOException
        Parses a wallclock value and returns it as a Calendar.
        Throws:
        ParseException
        java.io.IOException