org.apache.batik.transcoder

Class SVGAbstractTranscoder.SVGAbstractTranscoderUserAgent

protected class SVGAbstractTranscoder.SVGAbstractTranscoderUserAgent extends UserAgentAdapter

A user agent implementation for PrintTranscoder.
Field Summary
protected Listscripts
Vector containing the allowed script types
Constructor Summary
SVGAbstractTranscoderUserAgent()
Method Summary
protected voidcomputeAllowedScripts()
Helper method.
voiddisplayError(String message)
Displays the specified error message using the ErrorHandler.
voiddisplayError(Exception e)
Displays the specified error using the ErrorHandler.
voiddisplayMessage(String message)
Displays the specified message using the ErrorHandler.
StringgetAlternateStyleSheet()
Returns this user agent's alternate style-sheet title.
StringgetDefaultFontFamily()
Returns the default font family.
StringgetLanguages()
Returns the user language specified in the TranscodingHints or "en" (english) if any.
StringgetMedia()
Returns this user agent's CSS media.
floatgetPixelUnitToMillimeter()
Returns the pixel to millimeter conversion factor specified in the TranscodingHints or 0.26458333 if not specified.
ScriptSecuritygetScriptSecurity(String scriptType, ParsedURL scriptPURL, ParsedURL docPURL)
Returns the security settings for the given script type, script url and document url
AffineTransformgetTransform()
Return the rendering transform.
StringgetUserStyleSheetURI()
Returns the user stylesheet specified in the TranscodingHints or null if any.
Dimension2DgetViewportSize()
Returns the default size of this user agent (400x400).
StringgetXMLParserClassName()
Returns the XML parser to use from the TranscodingHints.
booleanisXMLParserValidating()
Returns true if the XML parser must be in validation mode, false otherwise.
voidsetTransform(AffineTransform at)
Return the rendering transform.

Field Detail

scripts

protected List scripts
Vector containing the allowed script types

Constructor Detail

SVGAbstractTranscoderUserAgent

public SVGAbstractTranscoderUserAgent()

Method Detail

computeAllowedScripts

protected void computeAllowedScripts()
Helper method. Builds a Vector containing the allowed values for the <script> element's type attribute.

displayError

public void displayError(String message)
Displays the specified error message using the ErrorHandler.

displayError

public void displayError(Exception e)
Displays the specified error using the ErrorHandler.

displayMessage

public void displayMessage(String message)
Displays the specified message using the ErrorHandler.

getAlternateStyleSheet

public String getAlternateStyleSheet()
Returns this user agent's alternate style-sheet title.

getDefaultFontFamily

public String getDefaultFontFamily()
Returns the default font family.

getLanguages

public String getLanguages()
Returns the user language specified in the TranscodingHints or "en" (english) if any.

getMedia

public String getMedia()
Returns this user agent's CSS media.

getPixelUnitToMillimeter

public float getPixelUnitToMillimeter()
Returns the pixel to millimeter conversion factor specified in the TranscodingHints or 0.26458333 if not specified.

getScriptSecurity

public ScriptSecurity getScriptSecurity(String scriptType, ParsedURL scriptPURL, ParsedURL docPURL)
Returns the security settings for the given script type, script url and document url

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 null docPURL url for the document into which the script was found.

getTransform

public AffineTransform getTransform()
Return the rendering transform.

getUserStyleSheetURI

public String getUserStyleSheetURI()
Returns the user stylesheet specified in the TranscodingHints or null if any.

getViewportSize

public Dimension2D getViewportSize()
Returns the default size of this user agent (400x400).

getXMLParserClassName

public String getXMLParserClassName()
Returns the XML parser to use from the TranscodingHints.

isXMLParserValidating

public boolean isXMLParserValidating()
Returns true if the XML parser must be in validation mode, false otherwise.

setTransform

public void setTransform(AffineTransform at)
Return the rendering transform.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.