public class Cursor extends java.lang.Object implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
CROSSHAIR_CURSOR
Constant for a cross-hair cursor.
|
static int |
CUSTOM_CURSOR |
static int |
DEFAULT_CURSOR
Constant for the system default cursor type
|
static int |
E_RESIZE_CURSOR
Cursor used over E edge of window decorations.
|
static int |
HAND_CURSOR
Constant for a hand cursor.
|
static int |
MOVE_CURSOR
Constant for a cursor used during window move operations.
|
static int |
N_RESIZE_CURSOR
Cursor used over N edge of window decorations.
|
protected java.lang.String |
name |
static int |
NE_RESIZE_CURSOR
Cursor used over NE corner of window decorations.
|
static int |
NW_RESIZE_CURSOR
Cursor used over NW corner of window decorations.
|
protected static Cursor[] |
predefined |
static int |
S_RESIZE_CURSOR
Cursor used over S edge of window decorations.
|
static int |
SE_RESIZE_CURSOR
Cursor used over SE corner of window decorations.
|
static int |
SW_RESIZE_CURSOR
Cursor used over SW corner of window decorations.
|
static int |
TEXT_CURSOR
Constant for a cursor over a text field.
|
static int |
W_RESIZE_CURSOR
Cursor used over W edge of window decorations.
|
static int |
WAIT_CURSOR
Constant for a cursor to display while waiting for an action to complete.
|
| Modifier | Constructor and Description |
|---|---|
|
Cursor(int type)
Initializes a new instance of
Cursor with the specified
type. |
protected |
Cursor(java.lang.String name)
This constructor is used internally only.
|
| Modifier and Type | Method and Description |
|---|---|
static Cursor |
getDefaultCursor()
Returns an instance of the system default cursor type.
|
java.lang.String |
getName() |
static Cursor |
getPredefinedCursor(int type)
Returns an instance of
Cursor for one of the specified
predetermined types. |
static Cursor |
getSystemCustomCursor(java.lang.String name)
Retrieves the system specific custom Cursor named Cursor names are,
for example: "Invalid.16x16".
|
int |
getType()
Returns the numeric type identifier for this cursor.
|
java.lang.String |
toString()
Convert this Object to a human-readable String.
|
public static final int DEFAULT_CURSOR
public static final int CROSSHAIR_CURSOR
public static final int TEXT_CURSOR
public static final int WAIT_CURSOR
public static final int SW_RESIZE_CURSOR
public static final int SE_RESIZE_CURSOR
public static final int NW_RESIZE_CURSOR
public static final int NE_RESIZE_CURSOR
public static final int N_RESIZE_CURSOR
public static final int S_RESIZE_CURSOR
public static final int W_RESIZE_CURSOR
public static final int E_RESIZE_CURSOR
public static final int HAND_CURSOR
public static final int MOVE_CURSOR
public static final int CUSTOM_CURSOR
protected static Cursor[] predefined
protected java.lang.String name
public Cursor(int type)
Cursor with the specified
type.type - The cursor type.java.lang.IllegalArgumentException - If the specified cursor type is invalidprotected Cursor(java.lang.String name)
public static Cursor getPredefinedCursor(int type)
Cursor for one of the specified
predetermined types.type - The type contant from this class.java.lang.IllegalArgumentException - If the constant is not one of the
predefined cursor type constants from this class.public static Cursor getSystemCustomCursor(java.lang.String name) throws AWTException
AWTExceptionHeadlessException - If GraphicsEnvironment.isHeadless()
returns true.public static Cursor getDefaultCursor()
public int getType()
public java.lang.String getName()
public java.lang.String toString()
java.lang.ObjectSystem.out.println()
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
toString in class java.lang.ObjectObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)