public class Cursor extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
CROSSHAIR_CURSOR
十字光标的类型。
|
static int |
CUSTOM_CURSOR
所有的自定义游标关联的类型。
|
static int |
DEFAULT_CURSOR
默认的游标类型(如果没有定义光标,则设置一组)。
|
static int |
E_RESIZE_CURSOR
东部调整光标类型。
|
static int |
HAND_CURSOR
指针类型。
|
static int |
MOVE_CURSOR
移动光标类型。
|
static int |
N_RESIZE_CURSOR
北部调整光标类型。
|
protected String |
name
光标的用户可见名称。
|
static int |
NE_RESIZE_CURSOR
东北调整光标类型。
|
static int |
NW_RESIZE_CURSOR
西北调整光标类型。
|
protected static Cursor[] |
predefined
过时的。
作为JDK 1.7版本,该
getPredefinedCursor(int) 方法应该用来代替。
|
static int |
S_RESIZE_CURSOR
南调整光标类型。
|
static int |
SE_RESIZE_CURSOR
东南调整光标类型。
|
static int |
SW_RESIZE_CURSOR
西南调整光标类型。
|
static int |
TEXT_CURSOR
文本光标类型。
|
static int |
W_RESIZE_CURSOR
西方调整光标类型。
|
static int |
WAIT_CURSOR
等待游标类型。
|
Modifier | Constructor and Description |
---|---|
|
Cursor(int type)
用指定的类型创建一个新的光标对象。
|
protected |
Cursor(String name)
使用指定名称创建一个新的自定义光标对象。
|
Modifier and Type | Method and Description |
---|---|
static Cursor |
getDefaultCursor()
返回系统默认光标。
|
String |
getName()
返回此光标的名称。
|
static Cursor |
getPredefinedCursor(int type)
返回指定的预定义类型的光标对象。
|
static Cursor |
getSystemCustomCursor(String name)
返回指定名称的系统特定的自定义光标对象。
|
int |
getType()
返回此光标的类型。
|
String |
toString()
返回此光标的字符串表示形式。
|
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
@Deprecated protected static Cursor[] predefined
getPredefinedCursor(int)
方法应该用来代替。
public static final int CUSTOM_CURSOR
@ConstructorProperties(value="type") public Cursor(int type)
type
-指针类型
IllegalArgumentException
-如果指定游标类型无效
protected Cursor(String name)
注:此构造函数应该只用于AWT的实现作为其自定义游标支持部分。应用程序应该使用的工具。createcustomcursor()。
自定义光标对象name
-光标用户可见的名字。
Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String)
public static Cursor getPredefinedCursor(int type)
type
-预定义的指针类型
IllegalArgumentException
-如果指定游标类型无效
public static Cursor getSystemCustomCursor(String name) throws AWTException, HeadlessException
name
-描述系统需要的特定的自定义光标的字符串
HeadlessException
-如果
GraphicsEnvironment.isHeadless
返回true
AWTException
public static Cursor getDefaultCursor()
public int getType()
public String getName()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.