I wrote this code but it doesn't works:

SVGElement svgRoot = doc.getRootElement();
EventTarget target = (EventTarget)svgRoot;
target.addEventListener("onclick", new OnMouseClick(), false); 

         private class OnMouseClick implements EventListener {
                public void handleEvent(Event evt) {
                        DOMMouseEvent eleEvt = (DOMMouseEvent)evt;
                        final Element shape = ((Element)eleEvt.getTarget());
                       
svgCanvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new
Runnable() {
                                public void run() {
                                    shape.setAttributeNS(null,"stroke","red");
                                    shape.setAttributeNS(null,"cursor","move"); 
                                }
                    });
                }
         }




-- 
View this message in context: 
http://www.nabble.com/select-a-shape-tf2642201.html#a7376796
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to