I have a TextButton subclass that I would like the user to be able to drag. Using the sample code from the DragAndDrop example, it’s easy to get the button to drag to the desktop, as I want it to, but I just realized that in overriding mouseDown(), I killed the button…it no longer responds to clicks, but instead assumes that every click is the beginning of a drag.
Is there a good way to distinguish a click on a component that is simply a click, and a click that is the beginning of a drag? I’m looking for something that might tell me that the button has been down for longer than x milliseconds, and that the mouse moved while it was down.