org.apache.batik.apps.svgbrowser
Class JSVGViewerFrame.UserAgent

java.lang.Object
  |
  +--org.apache.batik.apps.svgbrowser.JSVGViewerFrame.UserAgent
All Implemented Interfaces:
SVGUserAgent
Enclosing class:
JSVGViewerFrame

protected class JSVGViewerFrame.UserAgent
extends java.lang.Object
implements SVGUserAgent

This class implements a SVG user agent.


Constructor Summary
protected JSVGViewerFrame.UserAgent()
          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.
 java.lang.String getMedia()
          Returns this user agent's CSS media.
 float getPixelToMM()
          Returns a customized the pixel to mm factor.
 java.lang.String getUserStyleSheetURI()
          Returns the user stylesheet uri.
 java.lang.String getXMLParserClassName()
          Returns the class name of the XML parser.
 void handleElement(Element elt, java.lang.Object data)
          Notifies the UserAgent that the input element has been found in the document.
 boolean isXMLParserValidating()
          Returns true if the XML parser must be in validation mode, false otherwise.
 void openLink(java.lang.String uri, boolean newc)
          Opens a link.
 boolean supportExtension(java.lang.String s)
          Tells whether the given extension is supported by this user agent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSVGViewerFrame.UserAgent

protected JSVGViewerFrame.UserAgent()
Creates a new SVGUserAgent.
Method Detail

displayError

public void displayError(java.lang.String message)
Displays an error message.
Specified by:
displayError in interface SVGUserAgent

displayError

public void displayError(java.lang.Exception ex)
Displays an error resulting from the specified Exception.
Specified by:
displayError in interface SVGUserAgent

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.
Specified by:
displayMessage in interface SVGUserAgent

getPixelToMM

public float getPixelToMM()
Returns a customized the pixel to mm factor.
Specified by:
getPixelToMM in interface SVGUserAgent

getLanguages

public java.lang.String getLanguages()
Returns the language settings.
Specified by:
getLanguages in interface SVGUserAgent

getUserStyleSheetURI

public java.lang.String getUserStyleSheetURI()
Returns the user stylesheet uri.
Specified by:
getUserStyleSheetURI in interface SVGUserAgent
Returns:
null if no user style sheet was specified.

getXMLParserClassName

public java.lang.String getXMLParserClassName()
Returns the class name of the XML parser.
Specified by:
getXMLParserClassName in interface SVGUserAgent

isXMLParserValidating

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

getMedia

public java.lang.String getMedia()
Returns this user agent's CSS media.
Specified by:
getMedia in interface SVGUserAgent

openLink

public void openLink(java.lang.String uri,
                     boolean newc)
Opens a link.
Specified by:
openLink in interface SVGUserAgent
Parameters:
uri - The document URI.
newc - Whether the link should be activated in a new component.

supportExtension

public boolean supportExtension(java.lang.String s)
Tells whether the given extension is supported by this user agent.
Specified by:
supportExtension in interface SVGUserAgent

handleElement

public void handleElement(Element elt,
                          java.lang.Object data)
Description copied from interface: SVGUserAgent
Notifies the UserAgent that the input element has been found in the document. This is sometimes called, for example, to handle <a> or <title> elements in a UserAgent-dependant way.
Specified by:
handleElement in interface SVGUserAgent


Copyright © 2001 Apache Software Foundation. All Rights Reserved.