java.awt
Class Cursor
java.lang.Object
|
+--java.awt.Cursor
All Implemented Interfaces:
Serializable
This class represents various predefined cursor types.
Author:- Aaron M. Renn (arenn@urbanophile.com)
CROSSHAIR_CURSOR
public static final int CROSSHAIR_CURSOR
Constant for a cross-hair cursor.
CUSTOM_CURSOR
public static final int CUSTOM_CURSOR
DEFAULT_CURSOR
public static final int DEFAULT_CURSOR
Constant for the system default cursor type
E_RESIZE_CURSOR
public static final int E_RESIZE_CURSOR
Cursor used over E edge of window decorations.
HAND_CURSOR
public static final int HAND_CURSOR
Constant for a hand cursor.
MOVE_CURSOR
public static final int MOVE_CURSOR
Constant for a cursor used during window move operations.
NE_RESIZE_CURSOR
public static final int NE_RESIZE_CURSOR
Cursor used over NE corner of window decorations.
NW_RESIZE_CURSOR
public static final int NW_RESIZE_CURSOR
Cursor used over NW corner of window decorations.
N_RESIZE_CURSOR
public static final int N_RESIZE_CURSOR
Cursor used over N edge of window decorations.
SE_RESIZE_CURSOR
public static final int SE_RESIZE_CURSOR
Cursor used over SE corner of window decorations.
SW_RESIZE_CURSOR
public static final int SW_RESIZE_CURSOR
Cursor used over SW corner of window decorations.
S_RESIZE_CURSOR
public static final int S_RESIZE_CURSOR
Cursor used over S edge of window decorations.
TEXT_CURSOR
public static final int TEXT_CURSOR
Constant for a cursor over a text field.
WAIT_CURSOR
public static final int WAIT_CURSOR
Constant for a cursor to display while waiting for an action to complete.
W_RESIZE_CURSOR
public static final int W_RESIZE_CURSOR
Cursor used over W edge of window decorations.
name
protected String name
predefined
protected static Cursor[] predefined
Cursor
public Cursor(int type)
Initializes a new instance of Cursor
with the specified
type.
Parameters:
Throws:
Cursor
protected Cursor(java.lang.String name)
This constructor is used internally only.
Application code should call Toolkit.createCustomCursor().
Parameters:
getDefaultCursor
public static Cursor getDefaultCursor()
Returns an instance of the system default cursor type.
Returns:
- The system default cursor.
getName
public String getName()
getPredefinedCursor
public static Cursor getPredefinedCursor(int type)
Returns an instance of Cursor
for one of the specified
predetermined types.
Parameters:
Returns:
- The requested predefined cursor.
Throws:
getSystemCustomCursor
public static Cursor getSystemCustomCursor(java.lang.String name)
Retrieves the system specific custom Cursor named Cursor names are,
for example: "Invalid.16x16".
Parameters:
Throws:
getType
public int getType()
Returns the numeric type identifier for this cursor.
Returns:
toString
public String toString()