public class AWTInputEventDispatcher extends Object implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener
InputEvents as ImageJ
InputEvents, translating
KeyEvents into KyEvents, and MouseEvents into
MsEvents.| Constructor and Description |
|---|
AWTInputEventDispatcher(Display<?> display)
Creates an AWT input event dispatcher for the given display.
|
AWTInputEventDispatcher(Display<?> display,
EventService eventService)
Creates an AWT input event dispatcher for the given display.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLastX()
Gets the last known mouse X coordinate.
|
int |
getLastY()
Gets the last known mouse Y coordinate.
|
void |
keyPressed(KeyEvent e) |
void |
keyReleased(KeyEvent e) |
void |
keyTyped(KeyEvent e) |
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
mouseWheelMoved(MouseWheelEvent e) |
void |
register(Component c,
boolean keyEvents,
boolean mouseEvents)
Attaches the event dispatcher to the given component as a listener.
|
public AWTInputEventDispatcher(Display<?> display)
public AWTInputEventDispatcher(Display<?> display, EventService eventService)
public void register(Component c, boolean keyEvents, boolean mouseEvents)
c - The component from which to rebroadcast events.keyEvents - True if key events should be dispatched.mouseEvents - True if mouse events should be dispatched.public int getLastX()
public int getLastY()
public void keyTyped(KeyEvent e)
keyTyped in interface KeyListenerpublic void keyPressed(KeyEvent e)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent e)
keyReleased in interface KeyListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenerCopyright © 2015–2022 SciJava. All rights reserved.