Hi Alvarez,

"Alvarez" <[EMAIL PROTECTED]> wrote on 07/15/2008 11:59:17 AM:

> Hello, I want to add mouseEvents to batik objects but it doesn't work !
> 
> Here is a little part of my code : 
[...]
> This way of adding an event is ignored and I don't know why, is there
> something I do wrong ?

   The code looks fairly good.  My guess is that the
canvas doesn't know that it needs to by dynamic.
Do you call 'setDocumentState(ALWAYS_DYNAMIC)' on
the canvas?

> In fact I have a graph and a lot of points, and when the mouse is on a 
point
> I what to show his name, I can do that with this :
> 
> canvas.addMouseListener(new java.awt.event.MouseAdapter(){ ... } 
> 
> because it works but I don't want to check every point one by one each 
time
> the mouse move.

  Well just for the record the canvas must of course check every point one 
by one
just as you would.  It might save some time since it will skip groups 
where
the bounding box of the group doesn't contain the point but assuming all 
of your
points are the children of one group this won't help any over what you 
might
be doing.   Also what are you using for your points?  circles?  Markers?
Because Markers for example aren't individually 'addressable'.

Reply via email to