Hi.
I have a component, a Jwhich implements DragGestureRecognizer and has a
number of MousInputListeners added to it. As soon as those listeners are
added, it loses the ability to recognize a drag gesture (ie.
dragGestureRecognized never gets called). This can be traced exactly to when
the listener, a MouseInputAdapter with only a mousePressed method defined,
is added. If you don't add that listener, drag and drop are recognised.
Any ideas why this should be? Surely adding a MouseInputListener shouldn't
affect the base ability to recognise drag and drop?
Cheers,
Ian
> I have a component, a Jwhich implements DragGestureRecognizer and has a
> number of MousInputListeners added to it. As soon as those listeners are
[quoted text clipped - 5 lines]
> Any ideas why this should be? Surely adding a MouseInputListener shouldn't
> affect the base ability to recognise drag and drop?
probably you call in your MouseInputListener#mouseXxxxx(MouseEvent e)
e.consume();

Signature
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
Ian McCall - 15 Jun 2004 19:21 GMT
> probably you call in your MouseInputListener#mouseXxxxx(MouseEvent e)
> e.consume();
No - I looked for that. No consume() call in there at all. The
mousePressed() passes control to an outer classes's handlePress method,
which copies a few values from the event (component, isControDown,
isShiftDown) then creates a Runnable invoked using
SwingUtilities.invokeLater. No consume().
Cheers,
Ian
ak - 15 Jun 2004 19:33 GMT
please post short self contained compilable example.

Signature
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader