You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by REH Wolfgang <wo...@alcatel.at> on 2005/02/18 10:33:02 UTC
Displaying a SVG graphic in a table cell
Hi,
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. What do I have to do to make the canvas paint the content to the table cell?
Thanks,
_____
Alcatel
Wolfgang Reh
Scheydgasse 41
1210 Wien
Tel: +43 (1) 27722 - 5281
mailto:Wolfgang.Reh@alcatel.at <ma...@alcatel.at>
Re: Displaying a SVG graphic in a table cell
Posted by Thomas DeWeese <Th...@Kodak.com>.
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: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org