|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NiftyMouse
This gives you access to the mouse from within Nifty. Its main purpose is to change the shape of the current mouse pointer.
Method Summary | |
---|---|
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. |
Method Detail |
---|
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 top
IOException
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |