APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javafx.scene

public abstract Class Cursor

extends Object
Class Inheritance
Known Direct Subclasses
javafx.scene.Cursor.StandardCursor, javafx.scene.ImageCursor
Imports
java.net.MalformedURLException, .URL, java.util.Locale, javafx.scene.image.Image, com.sun.javafx.cursor.CursorFrame, .CursorType, .StandardCursorFrame

A class to encapsulate the bitmap representation of the mouse cursor.
Since
JavaFX 2.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public static final Cursor
CLOSED_HAND

A cursor with a hand that is closed, often used when "grabbing", for example, when panning.

public static final Cursor
CROSSHAIR

The crosshair cursor type.

public static final Cursor
DEFAULT

The default cursor type (gets set if no cursor is defined).

public static final Cursor
DISAPPEAR

The disappear cursor type.

public static final Cursor
E_RESIZE

The east-resize cursor type.

public static final Cursor
H_RESIZE

The horizontal cursor type.

public static final Cursor
HAND

The hand cursor type, resembling a pointing hand, often used to indicate that something can be clicked, such as a hyperlink.

public static final Cursor
MOVE

The move cursor type.

public static final Cursor
N_RESIZE

The north-resize cursor type.

private String
public static final Cursor
NE_RESIZE

The north-east-resize cursor type.

public static final Cursor
NONE

The none cursor type.

public static final Cursor
NW_RESIZE

The north-west-resize cursor type.

public static final Cursor
OPEN_HAND

A cursor with a hand which is open

public static final Cursor
S_RESIZE

The south-resize cursor type.

public static final Cursor
SE_RESIZE

The south-east-resize cursor type.

public static final Cursor
SW_RESIZE

The south-west-resize cursor type.

public static final Cursor
TEXT

The text cursor type.

public static final Cursor
V_RESIZE

The vertical cursor type.

public static final Cursor
W_RESIZE

The west-resize cursor type.

public static final Cursor
WAIT

The wait cursor type.

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
Cursor(String name)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
activate()

Activates the cursor.

public static Cursor

Returns:

the cursor for the identifier
cursor
(final String
the cursor identifier
identifier
)

Returns a cursor for the specified identifier.

pack-priv void
deactivate()

Deactivates the cursor.

pack-priv abstract CursorFrame
private static boolean
isUrl(final String identifier)

public String

Returns:

a string representation for the cursor.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation for the cursor.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

CLOSED_HANDback to summary
public static final Cursor CLOSED_HAND

A cursor with a hand that is closed, often used when "grabbing", for example, when panning.

CROSSHAIRback to summary
public static final Cursor CROSSHAIR

The crosshair cursor type.

DEFAULTback to summary
public static final Cursor DEFAULT

The default cursor type (gets set if no cursor is defined).

DISAPPEARback to summary
public static final Cursor DISAPPEAR

The disappear cursor type. This is often used when dragging something, such that when the user releases the mouse, the item will disappear. On Mac, this is used when dragging items off a toolbar or in other such situations.

E_RESIZEback to summary
public static final Cursor E_RESIZE

The east-resize cursor type.

H_RESIZEback to summary
public static final Cursor H_RESIZE

The horizontal cursor type.

HANDback to summary
public static final Cursor HAND

The hand cursor type, resembling a pointing hand, often used to indicate that something can be clicked, such as a hyperlink.

MOVEback to summary
public static final Cursor MOVE

The move cursor type.

N_RESIZEback to summary
public static final Cursor N_RESIZE

The north-resize cursor type.

nameback to summary
private String name
NE_RESIZEback to summary
public static final Cursor NE_RESIZE

The north-east-resize cursor type.

NONEback to summary
public static final Cursor NONE

The none cursor type. On platforms that don't support custom cursors, this will be the same as DEFAULT.

NW_RESIZEback to summary
public static final Cursor NW_RESIZE

The north-west-resize cursor type.

OPEN_HANDback to summary
public static final Cursor OPEN_HAND

A cursor with a hand which is open

S_RESIZEback to summary
public static final Cursor S_RESIZE

The south-resize cursor type.

SE_RESIZEback to summary
public static final Cursor SE_RESIZE

The south-east-resize cursor type.

SW_RESIZEback to summary
public static final Cursor SW_RESIZE

The south-west-resize cursor type.

TEXTback to summary
public static final Cursor TEXT

The text cursor type.

V_RESIZEback to summary
public static final Cursor V_RESIZE

The vertical cursor type.

W_RESIZEback to summary
public static final Cursor W_RESIZE

The west-resize cursor type.

WAITback to summary
public static final Cursor WAIT

The wait cursor type.

Constructor Detail

Cursorback to summary
pack-priv Cursor()
Cursorback to summary
pack-priv Cursor(String name)

Method Detail

activateback to summary
pack-priv void activate()

Activates the cursor. Cursor should be activated to make sure that the getCurrentFrame returns up-to date values.

cursorback to summary
public static Cursor cursor(final String identifier)

Returns a cursor for the specified identifier. The identifier can be either a name of some standard cursor or a valid URL string. If the identifier names a standard cursor the corresponding cursor is returned. In the case of a URL string, the method returns a new ImageCursor created for that URL.

Parameters
identifier:String

the cursor identifier

Returns:Cursor

the cursor for the identifier

Exceptions
IllegalArgumentException:
if the cursor identifier is not a valid URL string nor any standard cursor name
deactivateback to summary
pack-priv void deactivate()

Deactivates the cursor. Cursor should be deactivated, when no longer in use to make it collectible by GC.

getCurrentFrameback to summary
pack-priv abstract CursorFrame getCurrentFrame()
isUrlback to summary
private static boolean isUrl(final String identifier)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation for the cursor.

Returns:String

a string representation for the cursor.

Annotations
@Override
javafx.scene back to summary

private final Class Cursor.StandardCursor

extends Cursor
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final CursorFrame
Inherited from javafx.scene.Cursor:
CLOSED_HANDCROSSHAIRDEFAULTDISAPPEARE_RESIZEH_RESIZEHANDMOVEN_RESIZENE_RESIZENONENW_RESIZEOPEN_HANDS_RESIZESE_RESIZESW_RESIZETEXTV_RESIZEW_RESIZEWAIT

Constructor Summary

AccessConstructor and Description
public
StandardCursor(final String name, final CursorType type)

Method Summary

Modifier and TypeMethod and Description
pack-priv CursorFrame
Inherited from javafx.scene.Cursor:
activatecursordeactivatetoString

Field Detail

singleFrameback to summary
private final CursorFrame singleFrame

Constructor Detail

StandardCursorback to summary
public StandardCursor(final String name, final CursorType type)

Method Detail

getCurrentFrameback to summary
pack-priv CursorFrame getCurrentFrame()

Implements abstract javafx.scene.Cursor.getCurrentFrame.

Annotations
@Override