public interface NiftyMouse
Modifier and Type | Method and Description |
---|---|
void |
enableMouseCursor(String id)
Enable the given MouseCursor.
|
String |
getCurrentId()
Get the current mouse cursor id or null if no mouse cursor is set.
|
long |
getNoMouseMovementTime()
This returns the time in ms that no mouse movement has occurred.
|
int |
getX()
Get the current mouse position x coordinate.
|
int |
getY()
Get the current mouse position y coordinate.
|
void |
registerMouseCursor(String id,
String filename,
int hotspotX,
int hotspotY)
Register, load and prepare the given file for use as a mouse cursor later.
|
void |
resetMouseCursor()
Reset the mouse cursor back to the native one.
|
void |
setMousePosition(int x,
int y)
Set the mouse position to the given x, y coordinate with (0,0) being the upper
left corner of the screen.
|
void |
unregisterAll()
This unregisters all mouse cursors and disposes all resources that might have been allocated.
|
void registerMouseCursor(String id, String filename, int hotspotX, int hotspotY) throws IOException
id
- id of mouse cursor for later referencefilename
- the image to load.hotspotX
- the hotspot x coordinate of the cursor image with 0 being lefthotspotY
- the hotspot y coordinate of the cursor image with 0 being topIOException
String getCurrentId()
void unregisterAll()
void resetMouseCursor()
void enableMouseCursor(String id)
id
- the cursor id to enablevoid setMousePosition(int x, int y)
x
- x coordinatey
- y coordinageint getX()
int getY()
long getNoMouseMovementTime()
Copyright © 2013. All Rights Reserved.