xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry Kormann <tkorm...@ilog.fr>
Subject Re: JSVGComponent vs JSVGCanvas
Date Wed, 11 Jul 2001 13:17:08 GMT
On Thursday 05 July 2001 22:48, rick bolkey wrote:
> Newbie question, well, just a clarification:
>
> I looked through the archive, but I couldn't find a satisfiable definition
> of the two classes, JSVGComponent and JSVGCanvas.  From what I can gather
> from the javadoc, JSVGComponent is the swing component for displaying svg
> images, and the JSVGCanvas simply adds interaction (zoom, pan, etc) to the
> JSVGComponent.
>
> So, if I just wanted to display an svg images without user interaction, I
> could just use JSVGComponent ... I'm asking this because all the examples
> use the canvas.  Is the canvas the prefered component?  Just want to know
> when what is appropriate.

The SVGCanvas is a subclass of the SVGComponent. Basically, the SVGCanvas has 
been created to ease the use of the SVGComponent. Here are the key points:

1. The SVGCanvas provide some utility method (with predefined bindings) to 
add intereactors such as zoom, pan and rotate.

2. The SVGCanvas has a BeanInfo that indicates to the beanbox or IDE what the 
icon is...

3. The SVGCanvas is conformed to the JavaBean spec. It means that the methods 
fire property events...

In your own application, you can use both the same way - it's just up to you. 
SVGCanvas does not provide additional functionality - just a bean API.

Thierry.


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


Mime
View raw message