i saw i code here that can handle double click:
if(evt instanceof org.w3c.dom.events.MouseEvent) {
MouseEvent me = (MouseEvent)evt;
int clickCount = me.getClickCount();
}
but after trying the code i get this errors
java.lang.ClassCastException: org.apache.batik.dom.events.DOMMouseEvent
cannot be cast to java.awt.event.MouseEvent
at
edu.citynavigator.map.editor.MapCanvas$OnDownAction.handleEvent(MapCanvas.java:399)
at
org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown Source)
at
org.apache.batik.dom.events.EventSupport.fireEventListeners(Unknown Source)
at org.apache.batik.dom.events.EventSupport.dispatchEvent(Unknown
Source)
at org.apache.batik.dom.AbstractNode.dispatchEvent(Unknown Source)
at
org.apache.batik.bridge.BridgeEventSupport$Listener.dispatchMouseEvent(Unknown
Source)
at
org.apache.batik.bridge.BridgeEventSupport$Listener.dispatchMouseEvent(Unknown
Source)
at
org.apache.batik.bridge.BridgeEventSupport$Listener.mousePressed(Unknown
Source)
at
org.apache.batik.gvt.event.AbstractAWTEventDispatcher.processMouseEvent(Unknown
Source)
at
org.apache.batik.gvt.event.AbstractAWTEventDispatcher.dispatchMouseEvent(Unknown
Source)
at
org.apache.batik.gvt.event.AbstractAWTEventDispatcher.dispatchEvent(Unknown
Source)
at
org.apache.batik.gvt.event.AWTEventDispatcher.dispatchEvent(Unknown Source)
at
org.apache.batik.gvt.event.AbstractAWTEventDispatcher.mousePressed(Unknown
Source)
at org.apache.batik.swing.svg.AbstractJSVGComponent$18.run(Unknown
Source)
at org.apache.batik.util.RunnableQueue.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
it seems that the event that i get from the handleEvent is a DOMMouseEvent..
what am i doing wrong here?
--
View this message in context:
http://www.nabble.com/Double-click-not-working-tf4402141.html#a12558309
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]