Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.awt
Class Cursor  view Cursor download Cursor.java

java.lang.Object
  extended byjava.awt.Cursor
All Implemented Interfaces:
java.io.Serializable

public class Cursor
extends java.lang.Object
implements java.io.Serializable

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  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
           
private static int PREDEFINED_COUNT
           
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.
(package private) static long serialVersionUID
           
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.
(package private)  int type
           
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(java.lang.String name)
          This constructor is used internally only.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

DEFAULT_CURSOR

public static final int DEFAULT_CURSOR
Constant for the system default cursor type

See Also:
Constant Field Values

CROSSHAIR_CURSOR

public static final int CROSSHAIR_CURSOR
Constant for a cross-hair cursor.

See Also:
Constant Field Values

TEXT_CURSOR

public static final int TEXT_CURSOR
Constant for a cursor over a text field.

See Also:
Constant Field Values

WAIT_CURSOR

public static final int WAIT_CURSOR
Constant for a cursor to display while waiting for an action to complete.

See Also:
Constant Field Values

SW_RESIZE_CURSOR

public static final int SW_RESIZE_CURSOR
Cursor used over SW corner of window decorations.

See Also:
Constant Field Values

SE_RESIZE_CURSOR

public static final int SE_RESIZE_CURSOR
Cursor used over SE corner of window decorations.

See Also:
Constant Field Values

NW_RESIZE_CURSOR

public static final int NW_RESIZE_CURSOR
Cursor used over NW corner of window decorations.

See Also:
Constant Field Values

NE_RESIZE_CURSOR

public static final int NE_RESIZE_CURSOR
Cursor used over NE corner of window decorations.

See Also:
Constant Field Values

N_RESIZE_CURSOR

public static final int N_RESIZE_CURSOR
Cursor used over N edge of window decorations.

See Also:
Constant Field Values

S_RESIZE_CURSOR

public static final int S_RESIZE_CURSOR
Cursor used over S edge of window decorations.

See Also:
Constant Field Values

W_RESIZE_CURSOR

public static final int W_RESIZE_CURSOR
Cursor used over W edge of window decorations.

See Also:
Constant Field Values

E_RESIZE_CURSOR

public static final int E_RESIZE_CURSOR
Cursor used over E edge of window decorations.

See Also:
Constant Field Values

HAND_CURSOR

public static final int HAND_CURSOR
Constant for a hand cursor.

See Also:
Constant Field Values

MOVE_CURSOR

public static final int MOVE_CURSOR
Constant for a cursor used during window move operations.

See Also:
Constant Field Values

CUSTOM_CURSOR

public static final int CUSTOM_CURSOR
See Also:
Constant Field Values

PREDEFINED_COUNT

private static final int PREDEFINED_COUNT
See Also:
Constant Field Values

predefined

protected static Cursor[] predefined

name

protected java.lang.String name

type

int type
Constructor Detail

Cursor

public Cursor(int type)
Initializes a new instance of Cursor with the specified type.


Cursor

protected Cursor(java.lang.String name)
This constructor is used internally only. Application code should call Toolkit.createCustomCursor().

Method Detail

getPredefinedCursor

public static Cursor getPredefinedCursor(int type)
Returns an instance of Cursor for one of the specified predetermined types.


getSystemCustomCursor

public static Cursor getSystemCustomCursor(java.lang.String name)
                                    throws AWTException
Retrieves the system specific custom Cursor named Cursor names are, for example: "Invalid.16x16".


getDefaultCursor

public static Cursor getDefaultCursor()
Returns an instance of the system default cursor type.


getType

public int getType()
Returns the numeric type identifier for this cursor.


getName

public java.lang.String getName()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.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()).