You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Lucan1d <lu...@hotmail.com> on 2011/02/02 10:58:05 UTC
RE: Double Click Problem with JSVGCanvas
This is standard AWT behaviour. A double click always generates 2 mouse
events, one with a click count of 1 and another with a click count of 2.
Normally the application would respond to the first event by selecting an
element/object and then respond to the second event by opening or processing
that element/object.
-Lucan1d
-----Original Message-----
From: robert.weissmann@web.de [mailto:robert.weissmann@web.de]
Sent: Saturday, 29 January 2011 06:57
To: batik-users@xmlgraphics.apache.org
Subject: Double Click Problem with JSVGCanvas
Hi,
I am having a hard time to get only a douple-mouse click event from
JSVGCanvas. How to solve this.
I have something like
...
public JSVGCanvas svgCanvas = new JSVGCanvas();
...
svgCanvas.addMouseListener(new MouseAdapter {
override def mouseClicked(e : MouseEvent){
if(e.getClickCount == 1){
...
} else if(e.getClickCount == 2){
...
}
}
...
but if I do a double-mouse click within the canvas I always get a
MouseEvent with click-count = 1 first and then the adapter-method
"mouseClicked" is called a second time with click-count = 2. But it should
only be called ones with click-count = 2.
Any help or ideas ? Is there a bug ?
Cheers, Rob.
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org