Enum Class Cursor

java.lang.Object
java.lang.Enum<Cursor>
com.oorian.css.Cursor
All Implemented Interfaces:
Serializable, Comparable<Cursor>, Constable

public enum Cursor extends Enum<Cursor>
CSS cursor property values for mouse pointer appearance.

The cursor property specifies the type of cursor to display when the mouse pointer is over an element. Different cursor types communicate available actions to users.

Cursor Categories:

  • General: DEFAULT, AUTO, NONE, POINTER
  • Selection: TEXT, VERTICAL_TEXT, CELL, CROSSHAIR
  • Resize: N_RESIZE, E_RESIZE, S_RESIZE, W_RESIZE, and diagonals
  • Drag and Drop: GRAB, GRABBING, MOVE, COPY, ALIAS, NO_DROP
  • Status: WAIT, PROGRESS, HELP, NOT_ALLOWED
  • Zoom: ZOOM_IN, ZOOM_OUT

Usage:


 element.setCursor(Cursor.POINTER);
 element.setCursor(Cursor.GRAB);
 
Since:
2012
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • BasicBoxIntf
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Creates a shortcut/alias cursor.
    Indicates scrolling in any direction.
    Browser determines cursor based on context.
    Indicates a cell or cells can be selected.
    Indicates horizontal column resize.
    Indicates a context menu is available.
    Indicates something can be copied.
    Crosshair cursor for precise selection.
    Default platform cursor (usually arrow).
    Indicates east (right) edge resize.
    Indicates bidirectional east-west resize.
    Open hand indicating grabbable content.
    Closed hand indicating content is being grabbed.
    Indicates help is available.
    Inherits from parent element.
    Sets to default value.
    Indicates something can be moved.
    Indicates north (top) edge resize.
    Indicates northeast corner resize.
    Indicates bidirectional northeast-southwest resize.
    Indicates item cannot be dropped here.
    No cursor is rendered.
    Indicates requested action is not allowed.
    Indicates bidirectional north-south resize.
    Indicates northwest corner resize.
    Indicates bidirectional northwest-southeast resize.
    Pointer/hand indicating a link or clickable element.
    Indicates program is busy but user can interact.
    Indicates vertical row resize.
    Indicates south (bottom) edge resize.
    Indicates southeast corner resize.
    Indicates southwest corner resize.
    Indicates text can be selected.
    Indicates vertical text can be selected.
    Indicates west (left) edge resize.
    Indicates program is busy (hourglass/spinner).
    Indicates zoom in capability.
    Indicates zoom out capability.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the CSS value string.
    Returns the CSS value string.
    static Cursor
    Returns the enum constant of this class with the specified name.
    static Cursor[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ALIAS

      public static final Cursor ALIAS
      Creates a shortcut/alias cursor.
    • ALL_SCROLL

      public static final Cursor ALL_SCROLL
      Indicates scrolling in any direction.
    • AUTO

      public static final Cursor AUTO
      Browser determines cursor based on context.
    • CELL

      public static final Cursor CELL
      Indicates a cell or cells can be selected.
    • CONTEXT_MENU

      public static final Cursor CONTEXT_MENU
      Indicates a context menu is available.
    • COL_RESIZE

      public static final Cursor COL_RESIZE
      Indicates horizontal column resize.
    • COPY

      public static final Cursor COPY
      Indicates something can be copied.
    • CROSSHAIR

      public static final Cursor CROSSHAIR
      Crosshair cursor for precise selection.
    • DEFAULT

      public static final Cursor DEFAULT
      Default platform cursor (usually arrow).
    • E_RESIZE

      public static final Cursor E_RESIZE
      Indicates east (right) edge resize.
    • EW_RESIZE

      public static final Cursor EW_RESIZE
      Indicates bidirectional east-west resize.
    • GRAB

      public static final Cursor GRAB
      Open hand indicating grabbable content.
    • GRABBING

      public static final Cursor GRABBING
      Closed hand indicating content is being grabbed.
    • HELP

      public static final Cursor HELP
      Indicates help is available.
    • MOVE

      public static final Cursor MOVE
      Indicates something can be moved.
    • N_RESIZE

      public static final Cursor N_RESIZE
      Indicates north (top) edge resize.
    • NE_RESIZE

      public static final Cursor NE_RESIZE
      Indicates northeast corner resize.
    • NESW_RESIZE

      public static final Cursor NESW_RESIZE
      Indicates bidirectional northeast-southwest resize.
    • NS_RESIZE

      public static final Cursor NS_RESIZE
      Indicates bidirectional north-south resize.
    • NW_RESIZE

      public static final Cursor NW_RESIZE
      Indicates northwest corner resize.
    • NWSE_RESIZE

      public static final Cursor NWSE_RESIZE
      Indicates bidirectional northwest-southeast resize.
    • NO_DROP

      public static final Cursor NO_DROP
      Indicates item cannot be dropped here.
    • NONE

      public static final Cursor NONE
      No cursor is rendered.
    • NOT_ALLOWED

      public static final Cursor NOT_ALLOWED
      Indicates requested action is not allowed.
    • POINTER

      public static final Cursor POINTER
      Pointer/hand indicating a link or clickable element.
    • PROGRESS

      public static final Cursor PROGRESS
      Indicates program is busy but user can interact.
    • ROW_RESIZE

      public static final Cursor ROW_RESIZE
      Indicates vertical row resize.
    • S_RESIZE

      public static final Cursor S_RESIZE
      Indicates south (bottom) edge resize.
    • SE_RESIZE

      public static final Cursor SE_RESIZE
      Indicates southeast corner resize.
    • SW_RESIZE

      public static final Cursor SW_RESIZE
      Indicates southwest corner resize.
    • TEXT

      public static final Cursor TEXT
      Indicates text can be selected.
    • VERTICAL_TEXT

      public static final Cursor VERTICAL_TEXT
      Indicates vertical text can be selected.
    • W_RESIZE

      public static final Cursor W_RESIZE
      Indicates west (left) edge resize.
    • WAIT

      public static final Cursor WAIT
      Indicates program is busy (hourglass/spinner).
    • ZOOM_IN

      public static final Cursor ZOOM_IN
      Indicates zoom in capability.
    • ZOOM_OUT

      public static final Cursor ZOOM_OUT
      Indicates zoom out capability.
    • INITIAL

      public static final Cursor INITIAL
      Sets to default value.
    • INHERIT

      public static final Cursor INHERIT
      Inherits from parent element.
  • Method Details

    • values

      public static Cursor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Cursor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Returns the CSS value string.
      Returns:
      the CSS value
    • toString

      public String toString()
      Returns the CSS value string.
      Overrides:
      toString in class Enum<Cursor>
      Returns:
      the CSS value