Hi Thomas,
I think I have a solution for the tool tip bug I indicated
earlier (which fails with both 1.4.0 & 1.4.1).
Tool tips are managed in JSVGCanvas within the ToolTipModifier
class. It tries to fool the Canvas component that the mouse has
just entered and so should consider displaying a tool tip.
ToolTipModifier doesn't tell the Canvas component it is leaving
to remove the tool tip, but it does set the tool tip to null. I
have changed the JSVGCanvas.ToolTipModifier.handleEvent() code as
attached. Essentially creating a fake exit event. This fixes the
problem with my test example.
Why the problem only occurs when ALWAYS_DYNAMIC is set I do not
know. It is possible that there is a race condition between the
event that exits one SVG object and the event that enters the next
SVG object. Setting ALWAYS_DYNAMIC could alter the race condition
enough to fail. If that is the case then my code change is just
a work around and doesn't really fix the problem.
I did try synchronising the method but that had no effect.
Now if we can just fix the applet problem. :)
Gavin Walker
[EMAIL PROTECTED] Computer Scientist
CSIRO Mathematical and Information Sciences Internet Marketplaces
GPO Box 664 tel: +61 2 6216 7030
CANBERRA ACT 2601 AUSTRALIA fax: +61 2 6216 7111
/* from JSVGCanvas.ToolTipModifier */
public void handleEvent(Event evt){
if (toolTip != null) {
setToolTipText(toolTip);
MouseEvent e = new MouseEvent(JSVGCanvas.this,
MouseEvent.MOUSE_ENTERED,
System.currentTimeMillis(),
0,
locationListener.getLastX(),
locationListener.getLastY(),
0,
false);
ToolTipManager.sharedInstance().mouseEntered(e);
} else {
MouseEvent e = new MouseEvent(JSVGCanvas.this,
MouseEvent.MOUSE_EXITED,
System.currentTimeMillis(),
0,
locationListener.getLastX(),
locationListener.getLastY(),
0,
false);
ToolTipManager.sharedInstance().mouseExited(e);
setToolTipText(null);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]