< prev index next >
src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java
Print this page
@@ -254,18 +254,18 @@
KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
if (visible) {
if (!getTarget().isAutoRequestFocus()) {
return;
} else {
- requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
+ requestWindowFocus(FocusEvent.Cause.ACTIVATION);
}
// Focus the owner in case this window is focused.
} else if (kfmPeer.getCurrentFocusedWindow() == getTarget()) {
// Transfer focus to the owner.
LWWindowPeer owner = getOwnerFrameDialog(LWWindowPeer.this);
if (owner != null) {
- owner.requestWindowFocus(CausedFocusEvent.Cause.ACTIVATION);
+ owner.requestWindowFocus(FocusEvent.Cause.ACTIVATION);
}
}
}
}
@@ -846,11 +846,11 @@
// this request will be no op. It will take effect when:
// 1. A simple not focused window is clicked.
// 2. An active but not focused owner frame/dialog is clicked.
// The mouse event then will trigger a focus request "in window" to the component, so the window
// should gain focus before.
- requestWindowFocus(CausedFocusEvent.Cause.MOUSE_EVENT);
+ requestWindowFocus(FocusEvent.Cause.MOUSE_EVENT);
mouseDownTarget[targetIdx] = targetPeer;
} else if (id == MouseEvent.MOUSE_DRAGGED) {
// Cocoa dragged event has the information about which mouse
// button is being dragged. Use it to determine the peer that
@@ -1195,11 +1195,11 @@
/*
* Requests platform to set native focus on a frame/dialog.
* In case of a simple window, triggers appropriate java focus change.
*/
- public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
+ public boolean requestWindowFocus(FocusEvent.Cause cause) {
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("requesting native focus to " + this);
}
if (!focusAllowedFor()) {
< prev index next >