protected class SVGAbstractTranscoder.SVGAbstractTranscoderUserAgent extends UserAgentAdapter
PrintTranscoder
.Modifier and Type | Field and Description |
---|---|
protected java.util.List |
scripts
Vector containing the allowed script types
|
ctx, extensions, FEATURES
Constructor and Description |
---|
SVGAbstractTranscoderUserAgent() |
Modifier and Type | Method and Description |
---|---|
protected void |
computeAllowedScripts()
Helper method.
|
void |
displayError(java.lang.Exception e)
Displays the specified error using the
ErrorHandler . |
void |
displayError(java.lang.String message)
Displays the specified error message using the
ErrorHandler . |
void |
displayMessage(java.lang.String message)
Displays the specified message using the
ErrorHandler . |
java.lang.String |
getAlternateStyleSheet()
Returns this user agent's alternate style-sheet title.
|
java.lang.String |
getDefaultFontFamily()
Returns the default font family.
|
ExternalResourceSecurity |
getExternalResourceSecurity(ParsedURL resourceURL,
ParsedURL docURL)
Returns the security settings for the given resource
url and document url
|
java.lang.String |
getLanguages()
Returns the user language specified in the
TranscodingHints or "en" (english) if any. |
java.lang.String |
getMedia()
Returns this user agent's CSS media.
|
float |
getPixelUnitToMillimeter()
Returns the pixel to millimeter conversion factor specified in the
TranscodingHints or 0.26458333 if not specified. |
ScriptSecurity |
getScriptSecurity(java.lang.String scriptType,
ParsedURL scriptPURL,
ParsedURL docPURL)
Returns the security settings for the given script
type, script url and document url
|
java.awt.geom.AffineTransform |
getTransform()
Return the rendering transform.
|
java.lang.String |
getUserStyleSheetURI()
Returns the user stylesheet specified in the
TranscodingHints or null if any. |
java.awt.geom.Dimension2D |
getViewportSize()
Returns the default size of this user agent (400x400).
|
java.lang.String |
getXMLParserClassName()
Returns the XML parser to use from the TranscodingHints.
|
boolean |
isAllowExternalResources() |
boolean |
isXMLParserValidating()
Returns true if the XML parser must be in validation mode, false
otherwise.
|
void |
setTransform(java.awt.geom.AffineTransform at)
Return the rendering transform.
|
addStdFeatures, checkLoadExternalResource, checkLoadScript, deselectAll, getBolderFontWeight, getBrokenLinkDocument, getClientAreaLocationOnScreen, getEventDispatcher, getFontFamilyResolver, getLighterFontWeight, getMediumFontSize, getPixelToMM, getStandardBolderFontWeight, getStandardLighterFontWeight, handleElement, hasFeature, loadDocument, openLink, registerExtension, runThread, setBridgeContext, setSVGCursor, setTextSelection, showAlert, showConfirm, showPrompt, showPrompt, supportExtension
public java.awt.geom.AffineTransform getTransform()
getTransform
in interface UserAgent
getTransform
in class UserAgentAdapter
public void setTransform(java.awt.geom.AffineTransform at)
setTransform
in interface UserAgent
setTransform
in class UserAgentAdapter
public java.awt.geom.Dimension2D getViewportSize()
getViewportSize
in interface UserAgent
getViewportSize
in class UserAgentAdapter
public void displayError(java.lang.String message)
ErrorHandler
.displayError
in class UserAgentAdapter
public void displayError(java.lang.Exception e)
ErrorHandler
.displayError
in interface UserAgent
displayError
in class UserAgentAdapter
public void displayMessage(java.lang.String message)
ErrorHandler
.displayMessage
in interface UserAgent
displayMessage
in class UserAgentAdapter
public float getPixelUnitToMillimeter()
TranscodingHints
or 0.26458333 if not specified.getPixelUnitToMillimeter
in interface UserAgent
getPixelUnitToMillimeter
in class UserAgentAdapter
public java.lang.String getLanguages()
TranscodingHints
or "en" (english) if any.getLanguages
in interface UserAgent
getLanguages
in class UserAgentAdapter
public java.lang.String getMedia()
getMedia
in interface UserAgent
getMedia
in class UserAgentAdapter
public java.lang.String getDefaultFontFamily()
getDefaultFontFamily
in interface UserAgent
getDefaultFontFamily
in class UserAgentAdapter
public java.lang.String getAlternateStyleSheet()
getAlternateStyleSheet
in interface UserAgent
getAlternateStyleSheet
in class UserAgentAdapter
public java.lang.String getUserStyleSheetURI()
TranscodingHints
or null if any.getUserStyleSheetURI
in interface UserAgent
getUserStyleSheetURI
in class UserAgentAdapter
public java.lang.String getXMLParserClassName()
getXMLParserClassName
in interface UserAgent
getXMLParserClassName
in class UserAgentAdapter
public boolean isXMLParserValidating()
isXMLParserValidating
in interface UserAgent
isXMLParserValidating
in class UserAgentAdapter
public ScriptSecurity getScriptSecurity(java.lang.String scriptType, ParsedURL scriptPURL, ParsedURL docPURL)
getScriptSecurity
in interface UserAgent
getScriptSecurity
in class UserAgentAdapter
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.protected void computeAllowedScripts()
public ExternalResourceSecurity getExternalResourceSecurity(ParsedURL resourceURL, ParsedURL docURL)
UserAgentAdapter
getExternalResourceSecurity
in interface UserAgent
getExternalResourceSecurity
in class UserAgentAdapter
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.public boolean isAllowExternalResources()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.