src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java

Print this page

        

*** 2242,2252 **** } return lightweightRequests.getFirst(); } public String toString() { boolean first = true; ! String str = "HeavyweightFocusRequest[heavweight=" + heavyweight + ",lightweightRequests="; if (lightweightRequests == null) { str += null; } else { str += "["; --- 2242,2252 ---- } return lightweightRequests.getFirst(); } public String toString() { boolean first = true; ! String str = "HeavyweightFocusRequest[heavyweight=" + heavyweight + ",lightweightRequests="; if (lightweightRequests == null) { str += null; } else { str += "[";
*** 2664,2674 **** * WARNING: This is based on DKFM's logic solely! * * We allow to trigger restoreFocus() in the dispatching process * only if we have the last request to dispatch. If the last request * fails, focus will be restored to either the component of the last ! * previously succedded request, or to to the focus owner that was * before this clearing process. */ if (!iter.hasNext()) { disableRestoreFocus = false; } --- 2664,2674 ---- * WARNING: This is based on DKFM's logic solely! * * We allow to trigger restoreFocus() in the dispatching process * only if we have the last request to dispatch. If the last request * fails, focus will be restored to either the component of the last ! * previously succeeded request, or to to the focus owner that was * before this clearing process. */ if (!iter.hasNext()) { disableRestoreFocus = false; }
*** 2763,2773 **** // if source is equal to first lightweight // then we should correct source and nativeSource if (source == hwFocusRequest.getFirstLightweightRequest().component) { source = hwFocusRequest.heavyweight; ! nativeSource = source; // source is heavuweight itself } } if (hwFocusRequest != null && nativeSource == hwFocusRequest.heavyweight) { --- 2763,2773 ---- // if source is equal to first lightweight // then we should correct source and nativeSource if (source == hwFocusRequest.getFirstLightweightRequest().component) { source = hwFocusRequest.heavyweight; ! nativeSource = source; // source is heavyweight itself } } if (hwFocusRequest != null && nativeSource == hwFocusRequest.heavyweight) {
*** 2781,2791 **** Component newSource = lwFocusRequest.component; if (currentFocusOwner != null) { /* * Since we receive FOCUS_GAINED when current focus ! * owner is not null, correcponding FOCUS_LOST is supposed * to be lost. And so, we keep new focus owner * to determine synthetic FOCUS_LOST event which will be * generated by KeyboardFocusManager for this FOCUS_GAINED. * * This code based on knowledge of --- 2781,2791 ---- Component newSource = lwFocusRequest.component; if (currentFocusOwner != null) { /* * Since we receive FOCUS_GAINED when current focus ! * owner is not null, corresponding FOCUS_LOST is supposed * to be lost. And so, we keep new focus owner * to determine synthetic FOCUS_LOST event which will be * generated by KeyboardFocusManager for this FOCUS_GAINED. * * This code based on knowledge of