< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java

Print this page




  80 
  81         if (eventType == CocoaConstants.NPCocoaEventMouseEntered) {
  82             CCursorManager.nativeSetAllowsCursorSetInBackground(true);
  83         } else if (eventType == CocoaConstants.NPCocoaEventMouseExited) {
  84             CCursorManager.nativeSetAllowsCursorSetInBackground(false);
  85         }
  86 
  87         responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
  88                                    clickCount, x, y, absX, absY);
  89     }
  90 
  91     public void handleScrollEvent(double pluginX, double pluginY, int modifierFlags,
  92                                   double deltaX, double deltaY, double deltaZ) {
  93         int x = (int)pluginX;
  94         int y = (int)pluginY;
  95         Point locationOnScreen = getLocationOnScreen();
  96         int absX = locationOnScreen.x + x;
  97         int absY = locationOnScreen.y + y;
  98 
  99         responder.handleScrollEvent(x, y, absX, absY, modifierFlags, deltaX,
 100                                     deltaY);
 101     }
 102 
 103     public void handleKeyEvent(int eventType, int modifierFlags, String characters,
 104                                String charsIgnoringMods, boolean isRepeat, short keyCode,
 105                                boolean needsKeyTyped) {
 106         responder.handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods,
 107                 keyCode, needsKeyTyped, isRepeat);
 108     }
 109 
 110     public void handleInputEvent(String text) {
 111         responder.handleInputEvent(text);
 112     }
 113 
 114     // handleFocusEvent is called when the applet becames focused/unfocused.
 115     // This method can be called from different threads.
 116     public void handleFocusEvent(boolean focused) {
 117         synchronized (classLock) {
 118             // In some cases an applet may not receive the focus lost event
 119             // from the parent window (see 8012330)
 120             globalFocusedWindow = (focused) ? this




  80 
  81         if (eventType == CocoaConstants.NPCocoaEventMouseEntered) {
  82             CCursorManager.nativeSetAllowsCursorSetInBackground(true);
  83         } else if (eventType == CocoaConstants.NPCocoaEventMouseExited) {
  84             CCursorManager.nativeSetAllowsCursorSetInBackground(false);
  85         }
  86 
  87         responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
  88                                    clickCount, x, y, absX, absY);
  89     }
  90 
  91     public void handleScrollEvent(double pluginX, double pluginY, int modifierFlags,
  92                                   double deltaX, double deltaY, double deltaZ) {
  93         int x = (int)pluginX;
  94         int y = (int)pluginY;
  95         Point locationOnScreen = getLocationOnScreen();
  96         int absX = locationOnScreen.x + x;
  97         int absY = locationOnScreen.y + y;
  98 
  99         responder.handleScrollEvent(x, y, absX, absY, modifierFlags, deltaX,
 100                                     deltaY, NSEvent.SCROLL_PHASE_UNSUPPORTED);
 101     }
 102 
 103     public void handleKeyEvent(int eventType, int modifierFlags, String characters,
 104                                String charsIgnoringMods, boolean isRepeat, short keyCode,
 105                                boolean needsKeyTyped) {
 106         responder.handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods,
 107                 keyCode, needsKeyTyped, isRepeat);
 108     }
 109 
 110     public void handleInputEvent(String text) {
 111         responder.handleInputEvent(text);
 112     }
 113 
 114     // handleFocusEvent is called when the applet becames focused/unfocused.
 115     // This method can be called from different threads.
 116     public void handleFocusEvent(boolean focused) {
 117         synchronized (classLock) {
 118             // In some cases an applet may not receive the focus lost event
 119             // from the parent window (see 8012330)
 120             globalFocusedWindow = (focused) ? this


< prev index next >