java.lang.Object | |
↳ | java.awt.Cursor |
Known Direct Subclasses |
A class to encapsulate the bitmap representation of the mouse cursor.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | CROSSHAIR_CURSOR | The crosshair cursor type. | |||||||||
int | CUSTOM_CURSOR | The type associated with all custom cursors. | |||||||||
int | DEFAULT_CURSOR | The default cursor type (gets set if no cursor is defined). | |||||||||
int | E_RESIZE_CURSOR | The east-resize cursor type. | |||||||||
int | HAND_CURSOR | The hand cursor type. | |||||||||
int | MOVE_CURSOR | The move cursor type. | |||||||||
int | NE_RESIZE_CURSOR | The north-east-resize cursor type. | |||||||||
int | NW_RESIZE_CURSOR | The north-west-resize cursor type. | |||||||||
int | N_RESIZE_CURSOR | The north-resize cursor type. | |||||||||
int | SE_RESIZE_CURSOR | The south-east-resize cursor type. | |||||||||
int | SW_RESIZE_CURSOR | The south-west-resize cursor type. | |||||||||
int | S_RESIZE_CURSOR | The south-resize cursor type. | |||||||||
int | TEXT_CURSOR | The text cursor type. | |||||||||
int | WAIT_CURSOR | The wait cursor type. | |||||||||
int | W_RESIZE_CURSOR | The west-resize cursor type. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
name | The user-visible name of the cursor.@serial | ||||||||||
predefined |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new cursor object with the specified type.
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new custom cursor object with the specified name.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the system default cursor.
| |||||||||||
Returns the name of this cursor.
| |||||||||||
Returns a cursor object with the specified predefined type.
| |||||||||||
Returns a system-specific custom cursor object matching the
specified name.
| |||||||||||
Returns the type for this cursor.
| |||||||||||
Returns a string representation of this cursor.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The crosshair cursor type.
The type associated with all custom cursors.
The default cursor type (gets set if no cursor is defined).
The east-resize cursor type.
The hand cursor type.
The move cursor type.
The north-east-resize cursor type.
The north-west-resize cursor type.
The north-resize cursor type.
The south-east-resize cursor type.
The south-west-resize cursor type.
The south-resize cursor type.
The text cursor type.
The wait cursor type.
The west-resize cursor type.
Creates a new cursor object with the specified type.
type | the type of cursor |
---|
IllegalArgumentException | if the specified cursor type is invalid |
---|
Creates a new custom cursor object with the specified name.
Note: 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. |
---|
Returns the name of this cursor.
Returns a cursor object with the specified predefined type.
type | the type of predefined cursor |
---|
IllegalArgumentException | if the specified cursor type is invalid |
---|
Returns a system-specific custom cursor object matching the specified name. Cursor names are, for example: "Invalid.16x16"
name | a string describing the desired system-specific custom cursor |
---|
HeadlessException | if
GraphicsEnvironment.isHeadless returns true
|
---|---|
AWTException |
Returns the type for this cursor.
Returns a string representation of this cursor.