java.awt
public class Cursor extends Object implements Serializable
Field Summary | |
---|---|
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. |
protected 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. |
static int | N_RESIZE_CURSOR
Cursor used over N edge of window decorations. |
protected static Cursor[] | predefined |
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 | S_RESIZE_CURSOR
Cursor used over S edge of window decorations. |
static int | TEXT_CURSOR
Constant for a cursor over a text field. |
static int | WAIT_CURSOR
Constant for a cursor to display while waiting for an action to complete. |
static int | W_RESIZE_CURSOR
Cursor used over W edge of window decorations. |
Constructor Summary | |
---|---|
Cursor(int type)
Initializes a new instance of Cursor with the specified
type.
| |
protected | Cursor(String name) This constructor is used internally only.
|
Method Summary | |
---|---|
static Cursor | getDefaultCursor()
Returns an instance of the system default cursor type.
|
String | getName() |
static Cursor | getPredefinedCursor(int type)
Returns an instance of Cursor for one of the specified
predetermined types.
|
static Cursor | getSystemCustomCursor(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.
|
String | toString() |
Cursor
with the specified
type.
Parameters: type The cursor type.
Throws: IllegalArgumentException If the specified cursor type is invalid
Returns: The system default cursor.
Cursor
for one of the specified
predetermined types.
Parameters: type The type contant from this class.
Returns: The requested predefined cursor.
Throws: IllegalArgumentException If the constant is not one of the predefined cursor type constants from this class.
Throws: AWTException HeadlessException If GraphicsEnvironment.isHeadless() returns true.
Returns: The cursor id.