Enum Cursor

  • All Implemented Interfaces:
    com.globalmentor.lex.Identifier, com.globalmentor.lex.Token, java.io.Serializable, java.lang.Comparable<Cursor>

    public enum Cursor
    extends java.lang.Enum<Cursor>
    implements com.globalmentor.lex.Identifier
    Standard Guise cursors that are converted to predefined CSS cursors. These cursors allow predefined dummy URIs to be mapped to predefined CSS cursors. These URIs are constructed by using the path GuiseApplication.GUISE_ROOT_THEME_CURSORS_PATH with the serialized form of the enum appended.
    Author:
    Garret Wilson
    See Also:
    CSS 2.1 User Interface: Cursors
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CROSSHAIR
      A simple crosshair (e.g., short line segments resembling a "+" sign).
      DEFAULT
      The platform-dependent default cursor.
      HELP
      Help is available for the object under the cursor.
      MOVE
      Indicates something is to be moved.
      POINTER
      The cursor is a pointer that indicates a link.
      PROGRESS
      A progress indicator.
      RESIZE_LINE_FAR
      Indicate that some edge is to be moved from the east of the box in left-to-right top-to-bottom orientation.
      RESIZE_LINE_FAR_PAGE_FAR
      Indicate that some edge is to be moved from the south-east corner of the box in left-to-right top-to-bottom orientation.
      RESIZE_LINE_FAR_PAGE_NEAR
      Indicate that some edge is to be moved from the north-east corner of the box in left-to-right top-to-bottom orientation.
      RESIZE_LINE_NEAR
      Indicate that some edge is to be moved from the west of the box in left-to-right top-to-bottom orientation.
      RESIZE_LINE_NEAR_PAGE_FAR
      Indicate that some edge is to be moved from the south-west corner of the box in left-to-right top-to-bottom orientation.
      RESIZE_LINE_NEAR_PAGE_NEAR
      Indicate that some edge is to be moved from the north-west corner of the box in left-to-right top-to-bottom orientation.
      RESIZE_PAGE_FAR
      Indicate that some edge is to be moved from the south corner of the box in left-to-right top-to-bottom orientation.
      RESIZE_PAGE_NEAR
      Indicate that some edge is to be moved from the north of the box in left-to-right top-to-bottom orientation.
      TEXT
      Indicates text that may be selected.
      WAIT
      Indicates that the program is busy and the user should wait.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.globalmentor.css.spec.CSS.Cursor getCSSCursor​(Orientation orientation)
      Retrieves the CSS cursor that corresponds to the predefined cursor based in the given component orientation.
      static Cursor getCursor​(java.net.URI uri)
      Determines a predefined cursor from the given URI
      java.net.URI getURI()  
      static Cursor valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Cursor[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • CROSSHAIR

        public static final Cursor CROSSHAIR
        A simple crosshair (e.g., short line segments resembling a "+" sign).
      • DEFAULT

        public static final Cursor DEFAULT
        The platform-dependent default cursor. Often rendered as an arrow.
      • HELP

        public static final Cursor HELP
        Help is available for the object under the cursor. Often rendered as a question mark or a balloon.
      • MOVE

        public static final Cursor MOVE
        Indicates something is to be moved.
      • POINTER

        public static final Cursor POINTER
        The cursor is a pointer that indicates a link.
      • PROGRESS

        public static final Cursor PROGRESS
        A progress indicator. The program is performing some processing, but is different from WAIT in that the user may still interact with the program. Often rendered as a spinning beach ball, or an arrow with a watch or hourglass.
      • RESIZE_LINE_FAR

        public static final Cursor RESIZE_LINE_FAR
        Indicate that some edge is to be moved from the east of the box in left-to-right top-to-bottom orientation.
      • RESIZE_LINE_FAR_PAGE_FAR

        public static final Cursor RESIZE_LINE_FAR_PAGE_FAR
        Indicate that some edge is to be moved from the south-east corner of the box in left-to-right top-to-bottom orientation.
      • RESIZE_LINE_FAR_PAGE_NEAR

        public static final Cursor RESIZE_LINE_FAR_PAGE_NEAR
        Indicate that some edge is to be moved from the north-east corner of the box in left-to-right top-to-bottom orientation.
      • RESIZE_LINE_NEAR

        public static final Cursor RESIZE_LINE_NEAR
        Indicate that some edge is to be moved from the west of the box in left-to-right top-to-bottom orientation.
      • RESIZE_LINE_NEAR_PAGE_FAR

        public static final Cursor RESIZE_LINE_NEAR_PAGE_FAR
        Indicate that some edge is to be moved from the south-west corner of the box in left-to-right top-to-bottom orientation.
      • RESIZE_LINE_NEAR_PAGE_NEAR

        public static final Cursor RESIZE_LINE_NEAR_PAGE_NEAR
        Indicate that some edge is to be moved from the north-west corner of the box in left-to-right top-to-bottom orientation.
      • RESIZE_PAGE_NEAR

        public static final Cursor RESIZE_PAGE_NEAR
        Indicate that some edge is to be moved from the north of the box in left-to-right top-to-bottom orientation.
      • RESIZE_PAGE_FAR

        public static final Cursor RESIZE_PAGE_FAR
        Indicate that some edge is to be moved from the south corner of the box in left-to-right top-to-bottom orientation.
      • TEXT

        public static final Cursor TEXT
        Indicates text that may be selected. Often rendered as an I-beam.
      • WAIT

        public static final Cursor WAIT
        Indicates that the program is busy and the user should wait. Often rendered as a watch or hourglass.
    • Method Detail

      • values

        public static Cursor[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Cursor c : Cursor.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Cursor valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getURI

        public java.net.URI getURI()
        Returns:
        The URI of the predefined cursor relative to the application.
      • getCSSCursor

        public com.globalmentor.css.spec.CSS.Cursor getCSSCursor​(Orientation orientation)
        Retrieves the CSS cursor that corresponds to the predefined cursor based in the given component orientation.
        Parameters:
        orientation - The component orientation for which the cursor should be returned.
        Returns:
        The CSS cursor corresponding to this cursor in the given orientation.
        Throws:
        java.lang.NullPointerException - if the given orientation is null.
      • getCursor

        public static Cursor getCursor​(java.net.URI uri)
        Determines a predefined cursor from the given URI
        Parameters:
        uri - The URI of the predefined cursor relative to the application.
        Returns:
        The predefined cursor indicated by the given URI, or null if the given URI does not identify a predefined cursor.