org.scijava.input
Interface InputService
- All Superinterfaces:
- Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, RichPlugin, SciJavaPlugin, SciJavaService, Service
- All Known Implementing Classes:
- DefaultInputService
public interface InputService
- extends SciJavaService
Interface for service that tracks the current status of input devices
(keyboard and mouse in particular).
- Author:
- Barry DeZonia, Curtis Rueden
getEventService
EventService getEventService()
getModifiers
InputModifiers getModifiers()
isAltDown
boolean isAltDown()
isAltGrDown
boolean isAltGrDown()
isCtrlDown
boolean isCtrlDown()
isMetaDown
boolean isMetaDown()
isShiftDown
boolean isShiftDown()
isKeyDown
boolean isKeyDown(KeyCode code)
getDisplay
Display<?> getDisplay()
- Gets the display associated with the last observed mouse cursor.
- Returns:
- The display in question, or null if the display has been deleted,
or the mouse cursor is outside all known displays, or no mouse
events have ever been observed.
getX
int getX()
- Gets the last observed X coordinate of the mouse cursor, relative to a
specific display.
- See Also:
getDisplay()
getY
int getY()
- Gets the last observed Y coordinate of the mouse cursor, relative to a
specific display.
- See Also:
getDisplay()
isButtonDown
boolean isButtonDown(int button)
- Gets whether the given mouse button is currently pressed.
- Parameters:
button
- One of:
Copyright © 2009–2015 SciJava. All rights reserved.