Hello Alberto, You can accomplish this pretty easily without the event listener.
The spec covers it here : http://www.w3.org/TR/SVG/interact.html#Cursors w3c tests give a decent example: http://www.w3.org/Graphics/SVG/Test/20030813/svggen/interact-cursor-01-f.svg On Fri, Jan 18, 2013 at 4:57 AM, Alberto Carrascal <[email protected]>wrote: > Hi all, > > I'm simply trying to change the cursor when passing over a known Element > by using this code: > > ((EventTarget) elem).addEventListener("mouseover", new EventListener() { > > @Override > public void handleEvent(Event arg0) { > > > canvas.getTopLevelAncestor().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); > > arg0.stopPropagation() ; > > > } > }, false); // I've also tried with true > > > The problem is that the cursor changes only first time, but when I quit > the Element the cursor never change again. > Does anyone know a more elegante solution? > > Thanks in advance! >
