com.jniwrapper.win32.gdi
Class Cursor

java.lang.Object
  extended bycom.jniwrapper.Parameter
      extended bycom.jniwrapper.Pointer.Void
          extended bycom.jniwrapper.win32.Handle
              extended bycom.jniwrapper.win32.gdi.GdiObject
                  extended bycom.jniwrapper.win32.gdi.Cursor
All Implemented Interfaces:
com.jniwrapper.IntegerParameter, com.jniwrapper.PointerParameter

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.
 
Nested classes inherited from class com.jniwrapper.win32.gdi.GdiObject
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type
 
Field Summary
 
Fields inherited from class com.jniwrapper.win32.gdi.GdiObject
GDI_ERROR, HGDI_ERROR
 
Fields inherited from class com.jniwrapper.win32.Handle
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
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.win32.gdi.GdiObject
deleteObject, getObject, getObjectType
 
Methods inherited from class com.jniwrapper.win32.Handle
clone, closeHandle, equals, waitFor, waitFor
 
Methods inherited from class com.jniwrapper.Pointer.Void
asFunction, asFunction, asTypedPointer, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write
 
Methods inherited from class com.jniwrapper.Parameter
, a, a, acceptIOPerformer, asReturnValue, b, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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
Method Detail

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 cursor
y - 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