xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucan1d <luca...@hotmail.com>
Subject RE: Double Click Problem with JSVGCanvas
Date Wed, 02 Feb 2011 09:58:05 GMT
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


Mime
View raw message