Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Sample
Document
Class java.awt.Cursor
Inherited members: ShowHide
Deprecated: ShowHide
View: ClientSubclassPackageImplementation
java.awt

Class Cursor

  • java.lang.Object
    • java.awt.Cursor
  • All Implemented Interfaces:
    java.io.Serializable
    public class Cursor extends java.lang.Object implements java.io.Serializable
    A class to encapsulate the bitmap representation of the mouse cursor.
    See Also:
    Component.setCursor(java.awt.Cursor), Serialized Form
    • Fields 
      Modifier and Type Field and Description
      Ordinary member indicator CROSSHAIR_CURSOR Reveal DetailHide Detail
      static int CROSSHAIR_CURSOR
      The crosshair cursor type.
      public static final int CROSSHAIR_CURSOR
      The crosshair cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator CUSTOM_CURSOR Reveal DetailHide Detail
      static int CUSTOM_CURSOR
      The type associated with all custom cursors.
      public static final int CUSTOM_CURSOR
      The type associated with all custom cursors.
      See Also:
      Constant Field Values
      Ordinary member indicator DEFAULT_CURSOR Reveal DetailHide Detail
      static int DEFAULT_CURSOR
      The default cursor type (gets set if no cursor is defined).
      public static final int DEFAULT_CURSOR
      The default cursor type (gets set if no cursor is defined).
      See Also:
      Constant Field Values
      Ordinary member indicator E_RESIZE_CURSOR Reveal DetailHide Detail
      static int E_RESIZE_CURSOR
      The east-resize cursor type.
      public static final int E_RESIZE_CURSOR
      The east-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator HAND_CURSOR Reveal DetailHide Detail
      static int HAND_CURSOR
      The hand cursor type.
      public static final int HAND_CURSOR
      The hand cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator MOVE_CURSOR Reveal DetailHide Detail
      static int MOVE_CURSOR
      The move cursor type.
      public static final int MOVE_CURSOR
      The move cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator N_RESIZE_CURSOR Reveal DetailHide Detail
      static int N_RESIZE_CURSOR
      The north-resize cursor type.
      public static final int N_RESIZE_CURSOR
      The north-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator name Reveal DetailHide Detail
      protected java.lang.String name
      The user-visible name of the cursor.
      protected java.lang.String name
      The user-visible name of the cursor.
      See Also:
      getName()
      Ordinary member indicator NE_RESIZE_CURSOR Reveal DetailHide Detail
      static int NE_RESIZE_CURSOR
      The north-east-resize cursor type.
      public static final int NE_RESIZE_CURSOR
      The north-east-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator NW_RESIZE_CURSOR Reveal DetailHide Detail
      static int NW_RESIZE_CURSOR
      The north-west-resize cursor type.
      public static final int NW_RESIZE_CURSOR
      The north-west-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator predefined Reveal DetailHide Detail
      protected static Cursor[] predefined
      Deprecated. As of JDK version 1.7, the getPredefinedCursor(int) method should be used instead.
      @Deprecated protected static Cursor[] predefined
      Deprecated. As of JDK version 1.7, the getPredefinedCursor(int) method should be used instead.
      Ordinary member indicator S_RESIZE_CURSOR Reveal DetailHide Detail
      static int S_RESIZE_CURSOR
      The south-resize cursor type.
      public static final int S_RESIZE_CURSOR
      The south-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator SE_RESIZE_CURSOR Reveal DetailHide Detail
      static int SE_RESIZE_CURSOR
      The south-east-resize cursor type.
      public static final int SE_RESIZE_CURSOR
      The south-east-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator SW_RESIZE_CURSOR Reveal DetailHide Detail
      static int SW_RESIZE_CURSOR
      The south-west-resize cursor type.
      public static final int SW_RESIZE_CURSOR
      The south-west-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator TEXT_CURSOR Reveal DetailHide Detail
      static int TEXT_CURSOR
      The text cursor type.
      public static final int TEXT_CURSOR
      The text cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator W_RESIZE_CURSOR Reveal DetailHide Detail
      static int W_RESIZE_CURSOR
      The west-resize cursor type.
      public static final int W_RESIZE_CURSOR
      The west-resize cursor type.
      See Also:
      Constant Field Values
      Ordinary member indicator WAIT_CURSOR Reveal DetailHide Detail
      static int WAIT_CURSOR
      The wait cursor type.
      public static final int WAIT_CURSOR
      The wait cursor type.
      See Also:
      Constant Field Values
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator getDefaultCursor Reveal DetailHide Detail
      static Cursor getDefaultCursor()
      Return the system default cursor.
      public static Cursor getDefaultCursor()
      Return the system default cursor.
      Ordinary member indicator getPredefinedCursor Reveal DetailHide Detail
      static Cursor getPredefinedCursor(int type)
      Returns a cursor object with the specified predefined type.
      public static Cursor getPredefinedCursor(int type)
      Returns a cursor object with the specified predefined type.
      Parameters:
      type - the type of predefined cursor
      Returns:
      the specified predefined cursor
      Throws:
      java.lang.IllegalArgumentException - if the specified cursor type is invalid
      Ordinary member indicator getSystemCustomCursor Reveal DetailHide Detail
      static Cursor getSystemCustomCursor(java.lang.String name)
      Returns a system-specific custom cursor object matching the specified name.
      public static Cursor getSystemCustomCursor(java.lang.String name) throws AWTException, HeadlessException
      Returns a system-specific custom cursor object matching the specified name. Cursor names are, for example: "Invalid.16x16"
      Parameters:
      name - a string describing the desired system-specific custom cursor
      Returns:
      the system specific custom cursor named
      Throws:
      HeadlessException - if GraphicsEnvironment.isHeadless returns true
      AWTException
    • Constructors 
      Modifier Constructor and Description
      Ordinary member indicator Cursor Reveal DetailHide Detail
       Cursor(int type)
      Creates a new cursor object with the specified type.
      @ConstructorProperties(value="type") public Cursor(int type)
      Creates a new cursor object with the specified type.
      Parameters:
      type - the type of cursor
      Throws:
      java.lang.IllegalArgumentException - if the specified cursor type is invalid
      Ordinary member indicator Cursor Reveal DetailHide Detail
      protected Cursor(java.lang.String name)
      Creates a new custom cursor object with the specified name.
      protected Cursor(java.lang.String name)
      Creates a new custom cursor object with the specified name.

      Note: this constructor should only be used by AWT implementations as part of their support for custom cursors. Applications should use Toolkit.createCustomCursor().

      Parameters:
      name - the user-visible name of the cursor.
      See Also:
      Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String)
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator getName Reveal DetailHide Detail
      java.lang.String getName()
      Returns the name of this cursor.
      public java.lang.String getName()
      Returns the name of this cursor.
      Returns:
      a localized description of this cursor.
      Since:
      1.2
      Ordinary member indicator getType Reveal DetailHide Detail
      int getType()
      Returns the type for this cursor.
      public int getType()
      Returns the type for this cursor.
      Overridden member indicator toString Reveal DetailHide Detail
      java.lang.String toString()
      Returns a string representation of this cursor.
      public java.lang.String toString()
      Returns a string representation of this cursor.
      Overrides:
      toString in class java.lang.Object
      Returns:
      a string representation of this cursor.
      Since:
      1.2
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge