xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Web Query <webqu...@shermantech.com>
Subject How do I mouse-click on an SVG element and change it's color
Date Wed, 06 Oct 2004 00:02:40 GMT
Hi,

I just started programming with batik today and have come to a point 
that is stumpping me after hours of looking at the API and tracing code 
through the debugger.  I have managed to take the sample SVGBrowser 
application and implement mouse listening in such a way that I can get 
the GraphicsNode object that I click on (whew - that took some work).  
But, now I need to change the color of the SVG object I selected.  It 
would seem there should be a simple way to do this, but it appears that 
changing the color involves digging up a BridgeContext and a document 
(SVG)Element in addition to the GraphicsNode in order to modify the 
GraphicNode's ShapePainter. 

Is dynamically changing the color of the GraphicsNode possible?
Is there a simple way to change the color of the GraphicsNode object? 
If not, where do I get the BridgeContext and Element necessary to make 
the color changes?
Is there a better way to highlight SVG objects? (such as overlays, etc.)

If any of the above is possible, is there some sample code available to 
demonstrate how this is done?

Thanks,
Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message