Class TimingParser
java.lang.Object
org.apache.batik.parser.AbstractParser
org.apache.batik.parser.TimingParser
- All Implemented Interfaces:
Localizable, Parser
- Direct Known Subclasses:
ClockParser, TimingSpecifierParser
An abstract base class for SMIL timing value parsers.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected booleanAllows the use of accessKey() timing specifiers with a single character, as specified in SVG 1.1.protected booleanAllows the use of accessKey() timing specifiers with a DOM 3 key name, as specified in SVG 1.2.Fields inherited from class AbstractParser
BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader -
Constructor Summary
ConstructorsConstructorDescriptionTimingParser(boolean useSVG11AccessKeys, boolean useSVG12AccessKeys) Creates a new TimingParser. -
Method Summary
Modifier and TypeMethodDescriptionprotected floatParses a clock value.protected intParses a sequence of digits and returns the integer.protected floatParses a '.' and a sequence of digits and returns the float.protected Object[]parseIDValue(boolean escaped) Parses a timing specifier that starts with a word.protected StringParses an XML name with optional escaping in the middle.protected floatParses an offset value.protected Object[]Parses a timing specifier.protected floatParses a time unit and returns the float for the multiplier.protected CalendarParses a wallclock value and returns it as aCalendar.Methods inherited from class AbstractParser
createErrorMessage, doParse, formatMessage, getBundleClassName, getCurrent, getLocale, parse, parse, parse, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
Field Details
-
TIME_OFFSET
protected static final int TIME_OFFSET- See Also:
-
TIME_SYNCBASE
protected static final int TIME_SYNCBASE- See Also:
-
TIME_EVENTBASE
protected static final int TIME_EVENTBASE- See Also:
-
TIME_REPEAT
protected static final int TIME_REPEAT- See Also:
-
TIME_ACCESSKEY
protected static final int TIME_ACCESSKEY- See Also:
-
TIME_ACCESSKEY_SVG12
protected static final int TIME_ACCESSKEY_SVG12- See Also:
-
TIME_MEDIA_MARKER
protected static final int TIME_MEDIA_MARKER- See Also:
-
TIME_WALLCLOCK
protected static final int TIME_WALLCLOCK- See Also:
-
TIME_INDEFINITE
protected static final int TIME_INDEFINITE- See Also:
-
useSVG11AccessKeys
protected boolean useSVG11AccessKeysAllows the use of accessKey() timing specifiers with a single character, as specified in SVG 1.1. -
useSVG12AccessKeys
protected boolean useSVG12AccessKeysAllows the use of accessKey() timing specifiers with a DOM 3 key name, as specified in SVG 1.2.
-
-
Constructor Details
-
TimingParser
public TimingParser(boolean useSVG11AccessKeys, boolean useSVG12AccessKeys) Creates a new TimingParser.- Parameters:
useSVG11AccessKeys- allows the use of accessKey() timing specifiers with a single characteruseSVG12AccessKeys- allows the use of accessKey() with a DOM 3 key name
-
-
Method Details
-
parseTimingSpecifier
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:
ParseExceptionIOException
-
parseName
Parses an XML name with optional escaping in the middle.- Throws:
ParseExceptionIOException
-
parseIDValue
Parses a timing specifier that starts with a word.- Parameters:
escaped- whether a backslash appeared before this timing specifier- Throws:
ParseExceptionIOException
-
parseClockValue
Parses a clock value.- Throws:
ParseExceptionIOException
-
parseOffset
Parses an offset value.- Throws:
ParseExceptionIOException
-
parseDigits
Parses a sequence of digits and returns the integer.- Throws:
ParseExceptionIOException
-
parseFraction
Parses a '.' and a sequence of digits and returns the float.- Throws:
ParseExceptionIOException
-
parseUnit
Parses a time unit and returns the float for the multiplier.- Throws:
ParseExceptionIOException
-
parseWallclockValue
Parses a wallclock value and returns it as aCalendar.- Throws:
ParseExceptionIOException
-