public class AWTInputEventDispatcher extends Object implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener
InputEvent
s as ImageJ
InputEvent
s, translating
KeyEvent
s into KyEvent
s, and MouseEvent
s into
MsEvent
s.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 KeyListener
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved
in interface MouseWheelListener
Copyright © 2015–2022 SciJava. All rights reserved.