adding native event to java

T

toton

Hi,
Is it possible to hook a native event to java, so that it can be
treated uniformly with other events.
Like I want a tablet event (which is fired by a wacom tablet) to come
to a component , and overriding event method for component, I will
catch it, and process according to my requirement. (Though tablet is
mapped to os input device like mouse, that is NOT what I want. Wacom
sends more like the high resolution coordinate value, a proximity
value, pressure value, eraser / airbrush mode etc).

Similarly I want to hook a few other non-gui events in appropriate
place , like my laptop sends a low battery event in the os event
queue, which I need to capture in my Application class.
At present only thing I can do is run a separate thread (preferably
Timer ) and catch the native events there.
But I really interested to hook them in the java EventQueue , so that
they can be handled in uniform way just like the others (say mouse,
mouse wheel, keyboard etc) , and I can re-implement the event and make
a method like processTabletEvent etc.
Apache Harmony project gives some info at
http://harmony.apache.org/subcomponents/classlibrary/awt.html#Event_Handling
but unsure how to do it in Sun's implementation (with the help of JNI
& some public api).
Also it is not clear to me from this topic
http://www.ibm.com/developerworks/java/library/j-jniobs/

Any help is appreciated
Thanks
abir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top