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, charsIgnoringMods, keyCode, needsKeyTyped); 101 } 102 103 // REMIND: delete this method once 'deploy' changes for 7156194 is pushed 104 public void handleKeyEvent(int eventType, int modifierFlags, String characters, 105 String charsIgnoringMods, boolean isRepeat, short keyCode) { 106 handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods, isRepeat, keyCode, true); 107 } 108 109 public void handleInputEvent(String text) { 110 responder.handleInputEvent(text); 111 } 112 113 public void handleFocusEvent(boolean focused) { 114 this.focused = focused; 115 if (parentWindowActive) { 116 responder.handleWindowFocusEvent(focused, null); 117 } 118 } 119 120 public void handleWindowFocusEvent(boolean parentWindowActive) { 121 this.parentWindowActive = parentWindowActive; 122 // ignore focus "lost" native request as it may mistakenly 123 // deactivate active window (see 8001161) 124 if (focused && parentWindowActive) { 125 responder.handleWindowFocusEvent(parentWindowActive, null); 126 } 127 } 128 129 public boolean isParentWindowActive() { 130 return parentWindowActive; 131 } 132 } | 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, charsIgnoringMods, keyCode, needsKeyTyped); 101 } 102 103 // REMIND: delete this method once 'deploy' changes for 7156194 is pushed 104 public void handleKeyEvent(int eventType, int modifierFlags, String characters, 105 String charsIgnoringMods, boolean isRepeat, short keyCode) { 106 handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods, isRepeat, keyCode, true); 107 } 108 109 public void handleInputEvent(String text) { 110 responder.handleInputEvent(text); 111 } 112 113 public void handleFocusEvent(boolean focused) { 114 this.focused = focused; 115 if ( focused ) { 116 // see bug 8010925 117 // we can't put this to handleWindowFocusEvent because 118 // it won't be invoced if focuse is moved to a html element 119 // on the same page. 120 CClipboard clipboard = (CClipboard) Toolkit.getDefaultToolkit().getSystemClipboard(); 121 clipboard.checkPasteboard(); 122 } 123 if (parentWindowActive) { 124 responder.handleWindowFocusEvent(focused, null); 125 } 126 } 127 128 public void handleWindowFocusEvent(boolean parentWindowActive) { 129 this.parentWindowActive = parentWindowActive; 130 // ignore focus "lost" native request as it may mistakenly 131 // deactivate active window (see 8001161) 132 if (focused && parentWindowActive) { 133 responder.handleWindowFocusEvent(parentWindowActive, null); 134 } 135 } 136 137 public boolean isParentWindowActive() { 138 return parentWindowActive; 139 } 140 } |