|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Cursor
public class Cursor
This class represents various predefined cursor types.
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. |
static int |
N_RESIZE_CURSOR
Cursor used over N edge of window decorations. |
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. |
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. |
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()
Convert this Object to a human-readable String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 String name
Constructor Detail |
---|
public Cursor(int type)
Cursor
with the specified
type.
type
- The cursor type.
IllegalArgumentException
- If the specified cursor type is invalidprotected Cursor(String name)
Method Detail |
---|
public static Cursor getPredefinedCursor(int type)
Cursor
for one of the specified
predetermined types.
type
- The type contant from this class.
IllegalArgumentException
- If the constant is not one of the
predefined cursor type constants from this class.public static Cursor getSystemCustomCursor(String name) throws AWTException
AWTException
HeadlessException
- If GraphicsEnvironment.isHeadless()
returns true.public static Cursor getDefaultCursor()
public int getType()
public String getName()
public String toString()
Object
System.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 Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |