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

Method Summary
 Display<?> getDisplay()
          Gets the display associated with the last observed mouse cursor.
 EventService getEventService()
           
 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()
           
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Method Detail

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.