Modifier and Type | Field and Description |
---|---|
static int |
CROSSHAIR_CURSOR
The crosshair cursor type.
|
static int |
CUSTOM_CURSOR
The type associated with all custom cursors.
|
static int |
DEFAULT_CURSOR
The default cursor type (gets set if no cursor is defined).
|
static int |
E_RESIZE_CURSOR
The east-resize cursor type.
|
static int |
HAND_CURSOR
The hand cursor type.
|
static int |
MOVE_CURSOR
The move cursor type.
|
static int |
N_RESIZE_CURSOR
The north-resize cursor type.
|
protected java.lang.String |
name
The user-visible name of the cursor.
|
static int |
NE_RESIZE_CURSOR
The north-east-resize cursor type.
|
static int |
NW_RESIZE_CURSOR
The north-west-resize cursor type.
|
protected static Cursor[] |
predefined
Deprecated. As of JDK version 1.7, the
getPredefinedCursor(int)
method should be used instead. |
static int |
S_RESIZE_CURSOR
The south-resize cursor type.
|
static int |
SE_RESIZE_CURSOR
The south-east-resize cursor type.
|
static int |
SW_RESIZE_CURSOR
The south-west-resize cursor type.
|
static int |
TEXT_CURSOR
The text cursor type.
|
static int |
W_RESIZE_CURSOR
The west-resize cursor type.
|
static int |
WAIT_CURSOR
The wait cursor type.
|
Modifier and Type | Static Method and Description |
---|---|
static Cursor |
getDefaultCursor()
Return the system default cursor.
|
static Cursor |
getPredefinedCursor(int type)
Returns a cursor object with the specified predefined type.
|
static Cursor |
getSystemCustomCursor(java.lang.String name)
Returns a system-specific custom cursor object matching the
specified name.
|
Modifier | Constructor and Description |
---|---|
|
Cursor(int type)
Creates a new cursor object with the specified type.
|
protected |
Cursor(java.lang.String name)
Creates a new custom cursor object with the specified name.
|
getPredefinedCursor(int)
method should be used instead.getName()
type
- the type of cursorjava.lang.IllegalArgumentException
- if the specified cursor type
is invalidNote: this constructor should only be used by AWT implementations as part of their support for custom cursors. Applications should use Toolkit.createCustomCursor().
name
- the user-visible name of the cursor.Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String)
toString
in class java.lang.Object
type
- the type of predefined cursorjava.lang.IllegalArgumentException
- if the specified cursor type is
invalidname
- a string describing the desired system-specific custom cursorHeadlessException
- if
GraphicsEnvironment.isHeadless
returns trueAWTException