xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tonny Kohar" <tonny.ko...@gmail.com>
Subject Re: How to stop JSVGCanvas error dialogs?
Date Wed, 14 Nov 2007 06:18:40 GMT

On Nov 14, 2007 3:15 AM, ACE91 <adamlego20@hotmail.com> wrote:
> And how do I do this? Overriding the methods in a new class is easy enough,
> but how do I set an object of this new class as the JSVGCanvas's UserAgent?
> I've never dealt with the UserAgent class before.

If you are using JSVGCanvas, the constructor allow you to supply your
own user agent
public JSVGCanvas(SVGUserAgent ua, boolean eventsEnabled, boolean

Then just override the either to supply your own dialog, logging, or
just surpress (do nothing)
- public void displayError(String message)
- public void displayError(Exception ex)
- public void displayMessage(String message)
- etc

See the package org.apache.batik.swing.svg especially SVGUserAgent,
SVGUserAgentAdapter, SVGUserAgentGUIAdapter

Tonny Kohar
Sketsa SVG Editor
imagine, design, create ...

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message