xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Ganir <philliprs_y...@yahoo.com>
Subject On Changing the Mouse Cursor Appearance
Date Sat, 10 Jun 2006 12:54:43 GMT

     I'm having problems on changing the appearance of the mouse cursor when 
an event happens. I have an svg element on a JSVG Canvas, rect to be exact, 
and I want to change the cursor whenever I click on the parts of the
rectange. I want crosshair if I hover the mouse in the middle, and w-resize 
and e-resize when the mouse is hovered in the edges. I already have my event 
listeners on the rectangle and i want it to go with the mouseover event.

     I tried including a cursor attribute in the rect element, such as:

     <rect id="BaseRectangle" x="0" y="0" height="300" width="515" fill="red" 

    and I change the attribute's value to a type I want in the event handler:

     ( (Element) evt.getTarget() ).setAttribut("cursor", "w-resize" );

     Is there anything I'm doing wrong or anything I'm lacking to do?

     I also tried including cursor and pointer-events (with value "fill")
attribute at the svg (root) element and also the latter to the rect element, 
but nothing changes.

     I would really appreciate answers from you. Thank you very much in 


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

View raw message