jdk/src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java
author mchung
Tue, 29 Sep 2009 16:03:03 -0700
changeset 3938 ef327bd847c0
parent 2464 3c6755bdc55f
child 5506 202f599c92aa
permissions -rw-r--r--
6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes Summary: Replace calls to Logger with sun.util.logging.PlatformLogger Reviewed-by: prr, art, alexp, dcherepanov, igor, dav, anthony
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
     2
 * Copyright 2003-2009 Sun Microsystems, Inc.  All Rights Reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
package sun.awt;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
import java.awt.Component;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.awt.KeyboardFocusManager;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.awt.Window;
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    30
import java.awt.Canvas;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    31
import java.awt.Scrollbar;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    32
import java.awt.Panel;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    33
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    34
import java.awt.event.FocusEvent;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
import java.awt.peer.KeyboardFocusManagerPeer;
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    37
import java.awt.peer.ComponentPeer;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
import java.lang.reflect.InvocationTargetException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
import java.lang.reflect.Method;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
3938
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
    42
import sun.util.logging.PlatformLogger;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    44
public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    45
3938
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
    46
    private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    47
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    48
    private static AWTAccessor.KeyboardFocusManagerAccessor kfmAccessor =
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    49
        AWTAccessor.getKeyboardFocusManagerAccessor();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    51
    // The constants are copied from java.awt.KeyboardFocusManager
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    52
    public static final int SNFH_FAILURE         = 0;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    53
    public static final int SNFH_SUCCESS_HANDLED = 1;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    54
    public static final int SNFH_SUCCESS_PROCEED = 2;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    55
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    56
    protected KeyboardFocusManager manager;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    57
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    58
    public KeyboardFocusManagerPeerImpl(KeyboardFocusManager manager) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    59
        this.manager = manager;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    62
    @Override
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    63
    public void clearGlobalFocusOwner(Window activeWindow) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    64
        if (activeWindow != null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    65
            Component focusOwner = activeWindow.getFocusOwner();
3938
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
    66
            if (focusLog.isLoggable(PlatformLogger.FINE))
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
    67
                focusLog.fine("Clearing global focus owner " + focusOwner);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    68
            if (focusOwner != null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    69
                FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    70
                                                     CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    71
                SunToolkit.postPriorityEvent(fl);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    72
            }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    73
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    76
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    77
     * WARNING: Don't call it on the Toolkit thread.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    78
     *
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    79
     * Checks if the component:
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    80
     * 1) accepts focus on click (in general)
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    81
     * 2) may be a focus owner (in particular)
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    82
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    83
    public static boolean shouldFocusOnClick(Component component) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    84
        boolean acceptFocusOnClick = false;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    85
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    86
        // A component is generally allowed to accept focus on click
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    87
        // if its peer is focusable. There're some exceptions though.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    88
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    89
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    90
        // CANVAS & SCROLLBAR accept focus on click
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    91
        if (component instanceof Canvas ||
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    92
            component instanceof Scrollbar)
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    93
        {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    94
            acceptFocusOnClick = true;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    95
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    96
        // PANEL, empty only, accepts focus on click
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    97
        } else if (component instanceof Panel) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    98
            acceptFocusOnClick = (((Panel)component).getComponentCount() == 0);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
    99
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   100
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   101
        // Other components
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   102
        } else {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   103
            ComponentPeer peer = (component != null ? component.getPeer() : null);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   104
            acceptFocusOnClick = (peer != null ? peer.isFocusable() : false);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   105
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   106
        return acceptFocusOnClick &&
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   107
               AWTAccessor.getComponentAccessor().canBeFocusOwner(component);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   110
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   111
     * Posts proper lost/gain focus events to the event queue.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   112
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   113
    public static boolean deliverFocus(Component lightweightChild,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   114
                                       Component target,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   115
                                       boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   116
                                       boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   117
                                       long time,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   118
                                       CausedFocusEvent.Cause cause,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   119
                                       Component currentFocusOwner) // provided by the descendant peers
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   120
    {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   121
        if (lightweightChild == null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   122
            lightweightChild = (Component)target;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   123
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   124
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   125
        Component currentOwner = currentFocusOwner;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   126
        if (currentOwner != null && currentOwner.getPeer() == null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   127
            currentOwner = null;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   128
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   129
        if (currentOwner != null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   130
            FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   131
                                                 false, lightweightChild, cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   132
3938
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
   133
            if (focusLog.isLoggable(PlatformLogger.FINER))
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
   134
                focusLog.finer("Posting focus event: " + fl);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   135
            SunToolkit.postPriorityEvent(fl);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   136
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   137
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   138
        FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   139
                                             false, currentOwner, cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   140
3938
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
   141
        if (focusLog.isLoggable(PlatformLogger.FINER))
ef327bd847c0 6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes
mchung
parents: 2464
diff changeset
   142
            focusLog.finer("Posting focus event: " + fg);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   143
        SunToolkit.postPriorityEvent(fg);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   144
        return true;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   147
    // WARNING: Don't call it on the Toolkit thread.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   148
    public static boolean requestFocusFor(Component target, CausedFocusEvent.Cause cause) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   149
        return AWTAccessor.getComponentAccessor().requestFocus(target, cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   150
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   151
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   152
    // WARNING: Don't call it on the Toolkit thread.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   153
    public static int shouldNativelyFocusHeavyweight(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   154
                                                     Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   155
                                                     boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   156
                                                     boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   157
                                                     long time,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   158
                                                     CausedFocusEvent.Cause cause)
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   159
    {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   160
        return kfmAccessor.shouldNativelyFocusHeavyweight(
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   161
            heavyweight, descendant, temporary, focusedWindowChangeAllowed, time, cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   162
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   163
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    public static void removeLastFocusRequest(Component heavyweight) {
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   165
        kfmAccessor.removeLastFocusRequest(heavyweight);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   166
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   167
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   168
    // WARNING: Don't call it on the Toolkit thread.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   169
    public static boolean processSynchronousLightweightTransfer(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   170
                                                                Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   171
                                                                boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   172
                                                                boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   173
                                                                long time)
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   174
    {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   175
        return kfmAccessor.processSynchronousLightweightTransfer(
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2
diff changeset
   176
            heavyweight, descendant, temporary, focusedWindowChangeAllowed, time);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
}