* @param keyboardHandler keyboard handler
*/
public MouseHandler(Device fbDevice, Dimension screenSize,
EventQueue eventQueue, KeyboardHandler keyboardHandler) {
this.eventQueue = eventQueue;
HardwareCursorAPI hwCursor = null;
try {
hwCursor = fbDevice.getAPI(HardwareCursorAPI.class);
} catch (ApiNotFoundException ex) {
log.info("No hardware-cursor found on device " + fbDevice.getId());
}
this.keyboardHandler = keyboardHandler;
this.hwCursor = hwCursor;
this.screenSize = screenSize;
if (hwCursor != null) {
hwCursor.setCursorImage(JNodeCursors.ARROW);
hwCursor.setCursorVisible(true);
hwCursor.setCursorPosition(0, 0);
}
this.pointerAPI = new PointerAPIHandler();
pointerAPI.addPointerListener(this);
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {