Class PreserveAspectRatioParser
java.lang.Object
org.apache.batik.parser.AbstractParser
org.apache.batik.parser.PreserveAspectRatioParser
- All Implemented Interfaces:
Localizable, Parser
This class implements an event-based parser for the SVG preserveAspectRatio
attribute values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PreserveAspectRatioHandlerThe PreserveAspectRatio handler used to report parse events.Fields inherited from class AbstractParser
BUNDLE_CLASSNAME, current, errorHandler, localizableSupport, reader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoParse()Parses the current stream.Returns the length handler in use.protected voidParses a PreserveAspectRatio attribute.voidAllows an application to register a PreserveAspectRatioParser handler.protected voidSkips characters in the given reader until a white space is encountered.Methods inherited from class AbstractParser
createErrorMessage, formatMessage, getBundleClassName, getCurrent, getLocale, parse, parse, parse, reportCharacterExpectedError, reportError, reportUnexpectedCharacterError, setErrorHandler, setLocale, skipCommaSpaces, skipSpaces
-
Field Details
-
preserveAspectRatioHandler
The PreserveAspectRatio handler used to report parse events.
-
-
Constructor Details
-
PreserveAspectRatioParser
public PreserveAspectRatioParser()Creates a new PreserveAspectRatioParser.
-
-
Method Details
-
setPreserveAspectRatioHandler
Allows an application to register a PreserveAspectRatioParser handler.If the application does not register a handler, all events reported by the parser will be silently ignored.
Applications may register a new or different handler in the middle of a parse, and the parser must begin using the new handler immediately.
- Parameters:
handler- The transform list handler.
-
getPreserveAspectRatioHandler
Returns the length handler in use. -
doParse
Parses the current stream.- Specified by:
doParsein classAbstractParser- Throws:
ParseExceptionIOException
-
parsePreserveAspectRatio
Parses a PreserveAspectRatio attribute.- Throws:
ParseExceptionIOException
-
skipIdentifier
Skips characters in the given reader until a white space is encountered.- Throws:
IOException
-