public class DefaultInputService extends AbstractService implements InputService
InputService.| Constructor and Description |
|---|
DefaultInputService() |
| Modifier and Type | Method and Description |
|---|---|
EventService |
eventService() |
Display<?> |
getDisplay()
Gets the display associated with the last observed mouse cursor.
|
InputModifiers |
getModifiers() |
int |
getX()
Gets the last observed X coordinate of the mouse cursor, relative to a
specific display.
|
int |
getY()
Gets the last observed Y coordinate of the mouse cursor, relative to a
specific display.
|
boolean |
isAltDown() |
boolean |
isAltGrDown() |
boolean |
isButtonDown(int button)
Gets whether the given mouse button is currently pressed.
|
boolean |
isCtrlDown() |
boolean |
isKeyDown(KeyCode code) |
boolean |
isMetaDown() |
boolean |
isShiftDown() |
protected void |
onEvent(DisplayDeletedEvent evt) |
void |
onEvent(KyPressedEvent evt) |
void |
onEvent(KyReleasedEvent evt) |
protected void |
onEvent(MsExitedEvent evt) |
protected void |
onEvent(MsMovedEvent evt) |
protected void |
onEvent(MsPressedEvent evt) |
protected void |
onEvent(MsReleasedEvent evt) |
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEventServiceinitialize, registerEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic EventService eventService()
eventService in interface InputServicepublic InputModifiers getModifiers()
getModifiers in interface InputServicepublic boolean isAltDown()
isAltDown in interface InputServicepublic boolean isAltGrDown()
isAltGrDown in interface InputServicepublic boolean isCtrlDown()
isCtrlDown in interface InputServicepublic boolean isMetaDown()
isMetaDown in interface InputServicepublic boolean isShiftDown()
isShiftDown in interface InputServicepublic boolean isKeyDown(KeyCode code)
isKeyDown in interface InputServicepublic Display<?> getDisplay()
InputServicegetDisplay in interface InputServicepublic int getX()
InputServicegetX in interface InputServiceInputService.getDisplay()public int getY()
InputServicegetY in interface InputServiceInputService.getDisplay()public boolean isButtonDown(int button)
InputServiceisButtonDown in interface InputServicebutton - One of:
public void onEvent(KyPressedEvent evt)
public void onEvent(KyReleasedEvent evt)
protected void onEvent(MsMovedEvent evt)
protected void onEvent(MsExitedEvent evt)
protected void onEvent(MsPressedEvent evt)
protected void onEvent(MsReleasedEvent evt)
protected void onEvent(DisplayDeletedEvent evt)
Copyright © 2015–2022 SciJava. All rights reserved.