src/windows/classes/sun/awt/windows/WGlobalCursorManager.java

Print this page




  31 public final class WGlobalCursorManager extends GlobalCursorManager {
  32     private static WGlobalCursorManager manager;
  33 
  34     public static GlobalCursorManager getCursorManager() {
  35         if (manager == null) {
  36             manager = new WGlobalCursorManager();
  37         }
  38         return manager;
  39     }
  40 
  41     /**
  42      * Should be called in response to a native mouse enter or native mouse
  43      * button released message. Should not be called during a mouse drag.
  44      */
  45     public static void nativeUpdateCursor(Component heavy) {
  46         WGlobalCursorManager.getCursorManager().updateCursorLater(heavy);
  47     }
  48 
  49     protected native void setCursor(Component comp, Cursor cursor, boolean u);
  50     protected native void getCursorPos(Point p);
  51     protected native Component findComponentAt(Container con, int x, int y);
  52     /*
  53      * two native methods to call corresponding methods in Container and
  54      * Component
  55      */
  56     protected native Component findHeavyweightUnderCursor(boolean useCache);
  57     protected native Point getLocationOnScreen(Component com);
  58 }


  31 public final class WGlobalCursorManager extends GlobalCursorManager {
  32     private static WGlobalCursorManager manager;
  33 
  34     public static GlobalCursorManager getCursorManager() {
  35         if (manager == null) {
  36             manager = new WGlobalCursorManager();
  37         }
  38         return manager;
  39     }
  40 
  41     /**
  42      * Should be called in response to a native mouse enter or native mouse
  43      * button released message. Should not be called during a mouse drag.
  44      */
  45     public static void nativeUpdateCursor(Component heavy) {
  46         WGlobalCursorManager.getCursorManager().updateCursorLater(heavy);
  47     }
  48 
  49     protected native void setCursor(Component comp, Cursor cursor, boolean u);
  50     protected native void getCursorPos(Point p);

  51     /*
  52      * two native methods to call corresponding methods in Container and
  53      * Component
  54      */
  55     protected native Component findHeavyweightUnderCursor(boolean useCache);
  56     protected native Point getLocationOnScreen(Component com);
  57 }