I don't use Batik to construct SVGs; merely to render and transform them.  I
tend to use InkScape to rough out the drawing, and then insert JSP code
and/or JavaScript to add additional functionality or dynamism.

Converting Swing components to SVG seems like a stretch.  The
SwingSVGPrettyPrinter may suit your needs, but I've never used it so I can't
really advise you.  If you're trying to convert a Swing app to a web app,
then something like WebOnSwing (http://webonswing.sourceforge.net/xoops/) or
SwingWeb (http://swingweb.sourceforge.net/swingweb/) might suit your needs
better.

Hope this helps,

Mark

On Fri, Mar 14, 2008 at 12:52 AM, freeway139 <[EMAIL PROTECTED]>
wrote:

> Hi Mark,
>
> thanks for your reply.
> Ok, I see how to add a tooltip, but how can I do this in Java code with
> batik?
>
> and is it possible to paint a swing component with SwingSVGPrettyPrinter
> to svg?
>
> thanks
>
>
> 2008/3/13, Mark Fortner <[EMAIL PROTECTED]>:
>
> > To add a tooltip simply surround the object with an anchor tag like
> > this:
> > <a href="" title="My tooltip"><rect ..../></a>
> >
> > As for creating a table, you might want to consider creating a hybrid
> > solution that is partly SVG and partly HTML.  You could then render the
> > table using HTML, and create your graph in SVG.  You'd be able to add any
> > interactivity you wanted to the SVG using JavaScript.  So if you wanted to
> > click on a bar in a barchart, you could update the table with relevant
> > information.
> >
> > Hope this helps,
> >
> > Mark
> >
> > On Thu, Mar 13, 2008 at 6:08 AM, freeway139 <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Hi everyone,
> > >
> > > I'm developing an application which gets data from a database. The
> > > content is shown as an image like a bar chart and so on. Therefore I want 
> > > to
> > > use Batik. My questions are the following:
> > >
> > > How is it possible to add tooltips to specific positions (like when
> > > you put the mouse on the bar chart, I know it's possible within svg but 
> > > how
> > > can I create this with Batik?)?
> > >
> > > How can I convert Swing components to svg with batik? From what I read
> > > it seems possible but I have no clue how to do that. For example how can I
> > > convert a JTable into svg?
> > >
> > > I hope someone can help me with that. Or just give me some hints.
> > > Thanks for that
> > >
> >
> >
> >
> > --
> > Mark Fortner
> >
> > blog: http://www.jroller.com/phidias
>
>
>


-- 
Mark Fortner

blog: http://www.jroller.com/phidias

Reply via email to