fop 0.95

org.apache.fop.svg
Class SVGUserAgent

java.lang.Object
  extended byorg.apache.batik.bridge.UserAgentAdapter
      extended byorg.apache.fop.svg.SVGUserAgent
All Implemented Interfaces:
org.apache.batik.bridge.UserAgent

public class SVGUserAgent
extends org.apache.batik.bridge.UserAgentAdapter

The SVG user agent. This is an implementation of the batik svg user agent for handling errors and getting user agent values.


Field Summary
 
Fields inherited from class org.apache.batik.bridge.UserAgentAdapter
ctx, extensions, FEATURES
 
Constructor Summary
SVGUserAgent(float pixelUnitToMM, java.awt.geom.AffineTransform at)
          Creates a new SVGUserAgent.
 
Method Summary
 void displayError(java.lang.Exception ex)
          Displays an error resulting from the specified Exception.
 void displayError(java.lang.String message)
          Displays an error message.
 void displayMessage(java.lang.String message)
          Displays a message in the User Agent interface.
 java.lang.String getLanguages()
          Returns the language settings.
protected  org.apache.commons.logging.Log getLogger()
          Returns the logger associated with this user agent.
 java.lang.String getMedia()
          Returns the media type for this rendering.
 float getPixelUnitToMillimeter()
          Returns a customized the pixel to mm factor.
 java.awt.geom.AffineTransform getTransform()
          Get the transform of the svg document.
 java.lang.String getUserStyleSheetURI()
          Returns the user stylesheet uri.
 java.awt.geom.Dimension2D getViewportSize()
          Get the default viewport size for an svg document.
 java.lang.String getXMLParserClassName()
          Returns the class name of the XML parser.
 boolean isXMLParserValidating()
          Is the XML parser validating.
 void showAlert(java.lang.String message)
          Shows an alert dialog box.
 
Methods inherited from class org.apache.batik.bridge.UserAgentAdapter
addStdFeatures, checkLoadExternalResource, checkLoadScript, deselectAll, getAlternateStyleSheet, getBolderFontWeight, getBrokenLinkDocument, getClientAreaLocationOnScreen, getDefaultFontFamily, getEventDispatcher, getExternalResourceSecurity, getLighterFontWeight, getMediumFontSize, getPixelToMM, getScriptSecurity, getStandardBolderFontWeight, getStandardLighterFontWeight, handleElement, hasFeature, openLink, registerExtension, runThread, setBridgeContext, setSVGCursor, setTextSelection, setTransform, showConfirm, showPrompt, showPrompt, supportExtension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGUserAgent

public SVGUserAgent(float pixelUnitToMM,
                    java.awt.geom.AffineTransform at)
Creates a new SVGUserAgent.

Parameters:
pixelUnitToMM - the pixel to millimeter conversion factor currently in effect
at - the current transform
Method Detail

getLogger

protected final org.apache.commons.logging.Log getLogger()
Returns the logger associated with this user agent.

Returns:
Logger the logger

displayError

public void displayError(java.lang.String message)
Displays an error message.

Parameters:
message - the message to display

displayError

public void displayError(java.lang.Exception ex)
Displays an error resulting from the specified Exception.

Parameters:
ex - the exception to display

displayMessage

public void displayMessage(java.lang.String message)
Displays a message in the User Agent interface. The given message is typically displayed in a status bar.

Parameters:
message - the message to display

showAlert

public void showAlert(java.lang.String message)
Shows an alert dialog box.

Parameters:
message - the message to display

getPixelUnitToMillimeter

public float getPixelUnitToMillimeter()
Returns a customized the pixel to mm factor.

Returns:
the pixel unit to millimeter conversion factor

getLanguages

public java.lang.String getLanguages()
Returns the language settings.

Returns:
the languages supported

getMedia

public java.lang.String getMedia()
Returns the media type for this rendering.

Returns:
the media for fo documents is "print"

getUserStyleSheetURI

public java.lang.String getUserStyleSheetURI()
Returns the user stylesheet uri.

Returns:
null if no user style sheet was specified.

getXMLParserClassName

public java.lang.String getXMLParserClassName()
Returns the class name of the XML parser.

Returns:
the XML parser class name

isXMLParserValidating

public boolean isXMLParserValidating()
Is the XML parser validating.

Returns:
true if the xml parser is validating

getTransform

public java.awt.geom.AffineTransform getTransform()
Get the transform of the svg document.

Returns:
the transform

getViewportSize

public java.awt.geom.Dimension2D getViewportSize()
Get the default viewport size for an svg document. This returns a default value of 100x100.

Returns:
the default viewport size

fop 0.95

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.