Venkataramana_Jaladurgam wrote:
Is there any way I can scale the swing components along the lines of SVG elements if I choose to add Swing components to JSVGCanvas directly.
Only if you can insert yourself in the components repaint chain. So for example if you were to override the paintChildren method from JComponent you might be able to adjust the graphics object prior to drawing the children to scale/translate them as desired.
-----Original Message-----
From: Tonny Kohar [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 19, 2005 9:16 PM
To: '[email protected]'
Subject: Re: Mix SVG and Swing components
Hi,
I am required to add Swing components to the SVG canvas. I want to use
the
batik extensions. The trouble I am facing is in the actual rendering class:
The output I am getting in the JSVGCanvas is a static version of
JTextField.
I cannot enter characters or do anything with it. Any ideas? I believe if I can access JSVGCanvas or the related class where
the components are being rendered, then I can directly add my swing
component to it. But couldn't get how to get it. Batik developers pls.
help.
I do not know how to solve your problem, but as far as I know the batik GVT part is render the SVG stuff into Image that will be painted into the JSVGCanvas. The package org.apache.batik.gvt.renderer is where the rendering stuff.
How about extending JSVGCanvas or its parent paintComponent method and adding your textField there. Or maybe wrap JSVGCanvas and your textfield into custom component and using Java JComponent layer or z-order capability.
Regards Tonny Kohar
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
