public InputState(Toolkit toolkit) { long mask = MOUSE_MOTION_EVENT_MASK | MOUSE_EVENT_MASK | KEY_EVENT_MASK; AWTEventListener listener = new EventDispatchThreadedEventListener() { protected void processEvent(AWTEvent event) { update(event); } }; normalizer = new EventNormalizer(); normalizer.startListening(toolkit, listener, mask); }
public void dispose() { normalizer.stopListening(); normalizer = null; }