Class SVGAbstractTranscoder.SVGAbstractTranscoderUserAgent
java.lang.Object
org.apache.batik.bridge.UserAgentAdapter
org.apache.batik.transcoder.SVGAbstractTranscoder.SVGAbstractTranscoderUserAgent
- All Implemented Interfaces:
UserAgent
- Enclosing class:
SVGAbstractTranscoder
A user agent implementation for
PrintTranscoder.- Version:
- $Id$
-
Field Summary
FieldsFields inherited from class UserAgentAdapter
ctx, extensions, FEATURES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidHelper method.voidDisplays the specified error using theErrorHandler.voiddisplayError(String message) Displays the specified error message using theErrorHandler.voiddisplayMessage(String message) Displays the specified message using theErrorHandler.Returns this user agent's alternate style-sheet title.Returns the default font family.getExternalResourceSecurity(ParsedURL resourceURL, ParsedURL docURL) Returns the security settings for the given resource url and document urlReturns the user language specified in theTranscodingHintsor "en" (english) if any.getMedia()Returns this user agent's CSS media.floatReturns the pixel to millimeter conversion factor specified in theTranscodingHintsor 0.26458333 if not specified.getScriptSecurity(String scriptType, ParsedURL scriptPURL, ParsedURL docPURL) Returns the security settings for the given script type, script url and document urlReturn the rendering transform.Returns the user stylesheet specified in theTranscodingHintsor null if any.Returns the default size of this user agent (400x400).Returns the XML parser to use from the TranscodingHints.booleanbooleanReturns true if the XML parser must be in validation mode, false otherwise.voidReturn the rendering transform.Methods inherited from class UserAgentAdapter
addStdFeatures, checkLoadExternalResource, checkLoadScript, deselectAll, getBolderFontWeight, getBrokenLinkDocument, getClientAreaLocationOnScreen, getEventDispatcher, getFontFamilyResolver, getLighterFontWeight, getMediumFontSize, getPixelToMM, getSourceResolution, getStandardBolderFontWeight, getStandardLighterFontWeight, handleElement, hasFeature, loadDocument, openLink, registerExtension, runThread, setBridgeContext, setSourceResolution, setSVGCursor, setTextSelection, showAlert, showConfirm, showPrompt, showPrompt, supportExtension
-
Field Details
-
scripts
Vector containing the allowed script types
-
-
Constructor Details
-
SVGAbstractTranscoderUserAgent
public SVGAbstractTranscoderUserAgent()
-
-
Method Details
-
getTransform
Return the rendering transform.- Specified by:
getTransformin interfaceUserAgent- Overrides:
getTransformin classUserAgentAdapter
-
setTransform
Return the rendering transform.- Specified by:
setTransformin interfaceUserAgent- Overrides:
setTransformin classUserAgentAdapter
-
getViewportSize
Returns the default size of this user agent (400x400).- Specified by:
getViewportSizein interfaceUserAgent- Overrides:
getViewportSizein classUserAgentAdapter
-
displayError
Displays the specified error message using theErrorHandler.- Overrides:
displayErrorin classUserAgentAdapter
-
displayError
Displays the specified error using theErrorHandler.- Specified by:
displayErrorin interfaceUserAgent- Overrides:
displayErrorin classUserAgentAdapter
-
displayMessage
Displays the specified message using theErrorHandler.- Specified by:
displayMessagein interfaceUserAgent- Overrides:
displayMessagein classUserAgentAdapter
-
getPixelUnitToMillimeter
public float getPixelUnitToMillimeter()Returns the pixel to millimeter conversion factor specified in theTranscodingHintsor 0.26458333 if not specified.- Specified by:
getPixelUnitToMillimeterin interfaceUserAgent- Overrides:
getPixelUnitToMillimeterin classUserAgentAdapter
-
getLanguages
Returns the user language specified in theTranscodingHintsor "en" (english) if any.- Specified by:
getLanguagesin interfaceUserAgent- Overrides:
getLanguagesin classUserAgentAdapter
-
getMedia
Returns this user agent's CSS media.- Specified by:
getMediain interfaceUserAgent- Overrides:
getMediain classUserAgentAdapter
-
getDefaultFontFamily
Returns the default font family.- Specified by:
getDefaultFontFamilyin interfaceUserAgent- Overrides:
getDefaultFontFamilyin classUserAgentAdapter
-
getAlternateStyleSheet
Returns this user agent's alternate style-sheet title.- Specified by:
getAlternateStyleSheetin interfaceUserAgent- Overrides:
getAlternateStyleSheetin classUserAgentAdapter
-
getUserStyleSheetURI
Returns the user stylesheet specified in theTranscodingHintsor null if any.- Specified by:
getUserStyleSheetURIin interfaceUserAgent- Overrides:
getUserStyleSheetURIin classUserAgentAdapter- Returns:
- null if no user style sheet was specified.
-
getXMLParserClassName
Returns the XML parser to use from the TranscodingHints.- Specified by:
getXMLParserClassNamein interfaceUserAgent- Overrides:
getXMLParserClassNamein classUserAgentAdapter
-
isXMLParserValidating
public boolean isXMLParserValidating()Returns true if the XML parser must be in validation mode, false otherwise.- Specified by:
isXMLParserValidatingin interfaceUserAgent- Overrides:
isXMLParserValidatingin classUserAgentAdapter
-
getScriptSecurity
Returns the security settings for the given script type, script url and document url- Specified by:
getScriptSecurityin interfaceUserAgent- Overrides:
getScriptSecurityin classUserAgentAdapter- Parameters:
scriptType- type of script, as found in the type attribute of the <script> element.scriptPURL- url for the script, as defined in the script's xlink:href attribute. If that attribute was empty, then this parameter should be nulldocPURL- url for the document into which the script was found.
-
computeAllowedScripts
protected void computeAllowedScripts()Helper method. Builds a Vector containing the allowed values for the <script> element's type attribute. -
getExternalResourceSecurity
public ExternalResourceSecurity getExternalResourceSecurity(ParsedURL resourceURL, ParsedURL docURL) Description copied from class:UserAgentAdapterReturns the security settings for the given resource url and document url- Specified by:
getExternalResourceSecurityin interfaceUserAgent- Overrides:
getExternalResourceSecurityin classUserAgentAdapter- Parameters:
resourceURL- url for the resource, as defined in the resource's xlink:href attribute. If that attribute was empty, then this parameter should be nulldocURL- url for the document into which the resource was found.
-
isAllowExternalResources
public boolean isAllowExternalResources()
-