< prev index next >
src/java.desktop/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java
Print this page
@@ -56,12 +56,12 @@
Component focusOwner = activeWindow.getFocusOwner();
if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Clearing global focus owner " + focusOwner);
}
if (focusOwner != null) {
- FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
- CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
+ FocusEvent fl = new FocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
+ FocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
SunToolkit.postPriorityEvent(fl);
}
}
}
@@ -106,11 +106,11 @@
public static boolean deliverFocus(Component lightweightChild,
Component target,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time,
- CausedFocusEvent.Cause cause,
+ FocusEvent.Cause cause,
Component currentFocusOwner) // provided by the descendant peers
{
if (lightweightChild == null) {
lightweightChild = target;
}
@@ -118,41 +118,41 @@
Component currentOwner = currentFocusOwner;
if (currentOwner != null && !currentOwner.isDisplayable()) {
currentOwner = null;
}
if (currentOwner != null) {
- FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
+ FocusEvent fl = new FocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
false, lightweightChild, cause);
if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Posting focus event: " + fl);
}
SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl);
}
- FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
+ FocusEvent fg = new FocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
false, currentOwner, cause);
if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Posting focus event: " + fg);
}
SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg);
return true;
}
// WARNING: Don't call it on the Toolkit thread.
- public static boolean requestFocusFor(Component target, CausedFocusEvent.Cause cause) {
+ public static boolean requestFocusFor(Component target, FocusEvent.Cause cause) {
return AWTAccessor.getComponentAccessor().requestFocus(target, cause);
}
// WARNING: Don't call it on the Toolkit thread.
public static int shouldNativelyFocusHeavyweight(Component heavyweight,
Component descendant,
boolean temporary,
boolean focusedWindowChangeAllowed,
long time,
- CausedFocusEvent.Cause cause)
+ FocusEvent.Cause cause)
{
return kfmAccessor.shouldNativelyFocusHeavyweight(
heavyweight, descendant, temporary, focusedWindowChangeAllowed, time, cause);
}
< prev index next >