org.apache.batik.swing.svg
Interface SVGUserAgent

All Known Implementing Classes:
JSVGViewerFrame.UserAgent

public interface SVGUserAgent

This interface must be implemented to provide client services to a JSVGComponent.


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 in a new component.
 boolean supportExtension(java.lang.String s)
          Tells whether the given extension is supported by this user agent.
 

Method Detail

displayError

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

displayError

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

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.

getPixelToMM

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

getLanguages

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

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.

isXMLParserValidating

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

getMedia

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

openLink

public void openLink(java.lang.String uri,
                     boolean newc)
Opens a link in a new component.
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.

handleElement

public void handleElement(Element elt,
                          java.lang.Object data)
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.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.