On Thursday 20 December 2001 16:03, Warren W. Thompson wrote: > Is it possible to embed Swing components, like a JTextField, inside of > an SVG file being shown in a JSVGCanvas? The closest thing that I found > on the Batik Web site was the section that deals with 'Extensions' to the > SVG XML. Has anyone successfully done something like this?
I manage to include swing component inside SVG using extensions. What have done is: - a custom SwingGraphicsNode that extends AbstractGaphicsNode and delegates to an enclosed swing component the primitive paint (basically, the GVT's primitivePaint calls the paintComponent methods). - a custom bridge that builds this SwingGraphicsNode (through elements such as: <batikSwing:jbutton ...> Then, you have swing inside JSVGCanvas through SVG syntax. The problem now (much more difficult) is to handle events properly and repaint the widget if necessary. repaint could be done when batik will be dynamique, events are trickier. Good luck. Thierry. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
