*** empty log message ***

This commit is contained in:
Elias Naur 2005-04-12 11:56:59 +00:00
parent 61ddd625df
commit 5fe3157227
1 changed files with 5 additions and 0 deletions

View File

@ -185,6 +185,10 @@ public class Mouse {
public static void setCursorPosition(int x, int y) {
if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) == 0)
throw new IllegalStateException("Mouse doesn't support native cursors");
if (isGrabbed())
throw new IllegalStateException("Cursor is grabbed");
if (!isCreated())
throw new IllegalStateException("Mouse is not created");
Display.getImplementation().setCursorPosition(x, y);
}
@ -211,6 +215,7 @@ public class Mouse {
x = width / 2;
y = height / 2;
readBuffer.clear();
if (!isGrabbed() && (Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0)
setCursorPosition(x, y);
}