views:

108

answers:

1

When on a Tablet PC, touching the screen with your pen is interpreted as a click. The sensitivity is adjusted so that even if your pen slips a little bit, it is still interpreted as a click; you have to move a certain distance before it becomes a drag-n-drop event.

In a notebook style application, however, you never want to "click" inside of the area; the only events that one cares about are mousedown and mouseup.

What I'm finding is that my tablet driver on Windows is batching the mousedown and mouseup together for strokes that are shorter than a certain time; thus, my application only sees a single click and draws a dot, where a short dash should have been.

Now, I know it's possible to turn this off, because that's exactly what Windows Journal has done. I don't know what system level call/flag I would have to use, however, in order to get this working. It would be even better if someone could tell me how to do this in Java, but since it's platform specific I imagine I'll probably need to dynamically call it.

Edit: I'm no longer interested in the answer to this question, as I am now using Xournal on linux.

+1  A: 

In Java you should be able process the mouse pressed, mouse moved and mouse released events, and ignore mouse click events altogether to be able to program the behavior you want. This is independent of the higher level dragged event, which can often have a tolerance built in for how far the mouse has to move before it becomes a dragged.

Certainly, this has been my experience with Java on touch-screen handheld devices.

Software Monkey