< prev index next >

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

Print this page

        

*** 40,51 **** public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer { private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl"); ! private static AWTAccessor.KeyboardFocusManagerAccessor kfmAccessor = AWTAccessor.getKeyboardFocusManagerAccessor(); // The constants are copied from java.awt.KeyboardFocusManager public static final int SNFH_FAILURE = 0; public static final int SNFH_SUCCESS_HANDLED = 1; public static final int SNFH_SUCCESS_PROCEED = 2; --- 40,53 ---- public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer { private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl"); ! private static class KfmAccessor { ! private static AWTAccessor.KeyboardFocusManagerAccessor instance = AWTAccessor.getKeyboardFocusManagerAccessor(); + } // The constants are copied from java.awt.KeyboardFocusManager public static final int SNFH_FAILURE = 0; public static final int SNFH_SUCCESS_HANDLED = 1; public static final int SNFH_SUCCESS_PROCEED = 2;
*** 150,173 **** boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause) { ! return kfmAccessor.shouldNativelyFocusHeavyweight( ! heavyweight, descendant, temporary, focusedWindowChangeAllowed, time, cause); } public static void removeLastFocusRequest(Component heavyweight) { ! kfmAccessor.removeLastFocusRequest(heavyweight); } // WARNING: Don't call it on the Toolkit thread. public static boolean processSynchronousLightweightTransfer(Component heavyweight, Component descendant, boolean temporary, boolean focusedWindowChangeAllowed, long time) { ! return kfmAccessor.processSynchronousLightweightTransfer( ! heavyweight, descendant, temporary, focusedWindowChangeAllowed, time); } } --- 152,177 ---- boolean temporary, boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause) { ! return KfmAccessor.instance.shouldNativelyFocusHeavyweight( ! heavyweight, descendant, temporary, focusedWindowChangeAllowed, ! time, cause); } public static void removeLastFocusRequest(Component heavyweight) { ! KfmAccessor.instance.removeLastFocusRequest(heavyweight); } // WARNING: Don't call it on the Toolkit thread. public static boolean processSynchronousLightweightTransfer(Component heavyweight, Component descendant, boolean temporary, boolean focusedWindowChangeAllowed, long time) { ! return KfmAccessor.instance.processSynchronousLightweightTransfer( ! heavyweight, descendant, temporary, focusedWindowChangeAllowed, ! time); } }
< prev index next >