Do you know if anyone has implemented this? It seems like this idea would be
useful for two reasons:
1. It would provide a rich set of widgets, and a well-known GUI
framework, for building user interfaces in SVG. It should be noted that
people have tried to build such a toolkit from scratch, with fairly
unimpressive results: http://networkimprov.net/airwrx/awscene.html ,
http://spark.sourceforge.net/
2. It could be used in combination with the XMLHttpRequest object and
JavaScript event handling to provide a super-minimal, web-based user
interface that looks like Swing.
Please let me know if any work has been done on this.
Thanks.
-Jake
On 4/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Jake,
"Jake B" <[EMAIL PROTECTED]> wrote on 04/23/2007 11:55:04 AM:
> I'm just getting started with Batik, and I'm trying to get a
> sense of what it can do. Specifically, I have a question regarding
> the SVGGraphics2D SVG generator. It says on the Batik webpage, that
> SVGGraphics2D is a generator "that creates an SVG document from
> Java2D calls".
> My understanding of Java Swing is that it "paints" graphical user
> interfaces through calls to the Java2D API.
Correct.
> The core Java libraries, including Swing, have been released under
> the JLP (I think), which allows reuse in academic research. I also
> believe that Sun is supposed to release the remainder of the Java
> source under the GPL later this year. In any case, the source code
> to Swing is exposed and modifiable.
> My question is, would it be feasible to modify Swing so that,
> instead of calling the Java2D API, it calls the SVGGraphics2D API?
Yes, this is actually quite simple. You can call the paint
method on any Swing component. There are a few things you need
to be careful of (like swing double buffering). Also Batik
provides a helper class, batik.svggen.SwingSVGPrettyPrint.
> Does SVGGraphics2D API implement the Java2D API? Does it do so fully?
It is nearly complete however there are a few corner cases
that can't really be mapped to SVG. But the coverage is very good.
> If anyone has any insight into this, I would greatly appreciate it
> if you would let me know.
> Thanks.
>
> -Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]