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 Changing Mouse Cursor
Date Wed, 07 Jun 2006 07:55:14 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 click the middle, and w-resize and e-resize 
when clicking the edge. I already have my event listeners on the rectangle and 
i want it to go with the mousemove 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