< prev index next >

src/java.desktop/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java

Print this page




 125             FocusEvent fl = new FocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
 126                                                  false, lightweightChild, cause);
 127 
 128             if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
 129                 focusLog.finer("Posting focus event: " + fl);
 130             }
 131             SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl);
 132         }
 133 
 134         FocusEvent fg = new FocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
 135                                              false, currentOwner, cause);
 136 
 137         if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
 138             focusLog.finer("Posting focus event: " + fg);
 139         }
 140         SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg);
 141         return true;
 142     }
 143 
 144     // WARNING: Don't call it on the Toolkit thread.
 145     public static boolean requestFocusFor(Component target, FocusEvent.Cause cause) {
 146         return AWTAccessor.getComponentAccessor().requestFocus(target, cause);
 147     }
 148 
 149     // WARNING: Don't call it on the Toolkit thread.
 150     public static int shouldNativelyFocusHeavyweight(Component heavyweight,
 151                                                      Component descendant,
 152                                                      boolean temporary,
 153                                                      boolean focusedWindowChangeAllowed,
 154                                                      long time,
 155                                                      FocusEvent.Cause cause)
 156     {
 157         return KfmAccessor.instance.shouldNativelyFocusHeavyweight(
 158             heavyweight, descendant, temporary, focusedWindowChangeAllowed,
 159                 time, cause);
 160     }
 161 
 162     public static void removeLastFocusRequest(Component heavyweight) {
 163         KfmAccessor.instance.removeLastFocusRequest(heavyweight);
 164     }
 165 
 166     // WARNING: Don't call it on the Toolkit thread.


 125             FocusEvent fl = new FocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
 126                                                  false, lightweightChild, cause);
 127 
 128             if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
 129                 focusLog.finer("Posting focus event: " + fl);
 130             }
 131             SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl);
 132         }
 133 
 134         FocusEvent fg = new FocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
 135                                              false, currentOwner, cause);
 136 
 137         if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
 138             focusLog.finer("Posting focus event: " + fg);
 139         }
 140         SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg);
 141         return true;
 142     }
 143 
 144     // WARNING: Don't call it on the Toolkit thread.
 145     public static void requestFocusFor(Component target, FocusEvent.Cause cause) {
 146         AWTAccessor.getComponentAccessor().requestFocus(target, cause);
 147     }
 148 
 149     // WARNING: Don't call it on the Toolkit thread.
 150     public static int shouldNativelyFocusHeavyweight(Component heavyweight,
 151                                                      Component descendant,
 152                                                      boolean temporary,
 153                                                      boolean focusedWindowChangeAllowed,
 154                                                      long time,
 155                                                      FocusEvent.Cause cause)
 156     {
 157         return KfmAccessor.instance.shouldNativelyFocusHeavyweight(
 158             heavyweight, descendant, temporary, focusedWindowChangeAllowed,
 159                 time, cause);
 160     }
 161 
 162     public static void removeLastFocusRequest(Component heavyweight) {
 163         KfmAccessor.instance.removeLastFocusRequest(heavyweight);
 164     }
 165 
 166     // WARNING: Don't call it on the Toolkit thread.
< prev index next >