Hi Thomas,

Thanks for your advice. I took your second suggestion and create a 
BufferedImage and use this in the TableCellRenderer. That works fine! I don't 
need interactivity form the cells, they should just display a small SVG graphic.

        Thank you
                Wolfgang Reh

> -----Ursprüngliche Nachricht-----
> Von: Thomas DeWeese [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 18. Februar 2005 13:52
> An: Batik Users
> Betreff: Re: Displaying a SVG graphic in a table cell
> 
> 
> Hi Wolfgang,
> 
> REH Wolfgang wrote:
> 
> >     I want to display a SVG graphic in a table cell (JTable). I have
> > tried to build my own table cell renderer, but I can't get 
> it to display 
> > the graphic. I have the feeling that the reason for that is the 
> > asynchronous nature of the JSVGCanvas. 
> 
>     Correct, this is the problem.
> 
> > What do I have to do to make the
> > canvas paint the content to the table cell?
> 
>     I don't think you can use the JSVGCanvas directly.  I see 
> two major routes to go.  1) Use the GVT tree to render the 
> document in your CellRenderer, 2) Use a BufferedImage of the 
> SVG for the CellRenderer.
> 
>     For either of these you could use the Canvas as a 
> 'factory' or you can construct them yourself.  In either case 
> you will probably want to move the construction from the cell 
> renderer to the SVGData class.
> 
>     I hope you don't need interactivity from the table cells.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to