com.jniwrapper.win32.gdi
Class Cursor
java.lang.Object
com.jniwrapper.Parameter
com.jniwrapper.Pointer.Void
com.jniwrapper.win32.Handle
com.jniwrapper.win32.gdi.GdiObject
com.jniwrapper.win32.gdi.Cursor
- All Implemented Interfaces:
- IntegerParameter
- public class Cursor
- extends GdiObject
This class provides various methods for working with the cursor.
|
Nested Class Summary |
static class |
Cursor.CursorKind
This enumeration (IDC_*) specifies various types of the cursor. |
static class |
Cursor.CursorPositionCode
CursorPositionCode class represents the enumeration of the mouse position codes. |
|
Constructor Summary |
Cursor()
|
Cursor(java.awt.Cursor cursor)
Creates an instance of the native cursor from an AWT cursor. |
Cursor(long value)
|
|
Method Summary |
static Point |
getCursorPosition()
Returns the cursor position, in screen coordinates. |
protected void |
loadCursor(Cursor.CursorKind cursor)
Loads the cursor of a specified type. |
void |
setCursor(java.awt.Cursor cursor)
Sets the cursor by the specified AWT cursor. |
static boolean |
setCursorPosition(int x,
int y)
Determines the cursor position, in screen coordinates. |
| Methods inherited from class com.jniwrapper.Pointer.Void |
asFunction, asFunction, asTypedPointer, castTo, equals, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
| Methods inherited from class com.jniwrapper.Parameter |
acceptIOPerformer, asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Cursor
public Cursor()
Cursor
public Cursor(long value)
Cursor
public Cursor(java.awt.Cursor cursor)
- Creates an instance of the native cursor from an AWT cursor.
- Parameters:
cursor - an AWT cursor
getCursorPosition
public static Point getCursorPosition()
- Returns the cursor position, in screen coordinates.
- Returns:
- the cursor position, in screen coordinates
setCursorPosition
public static boolean setCursorPosition(int x,
int y)
- Determines the cursor position, in screen coordinates.
- Parameters:
x - horizontal coordinate of the cursory - vertical coordinate of the cursor
- Returns:
- true if the function succeeds
loadCursor
protected void loadCursor(Cursor.CursorKind cursor)
- Loads the cursor of a specified type.
- Parameters:
cursor - type of the cursor
setCursor
public void setCursor(java.awt.Cursor cursor)
- Sets the cursor by the specified AWT cursor.
- Parameters:
cursor - AWT cursor to set