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