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]



Reply via email to