jdk/src/share/classes/sun/awt/AWTAccessor.java
author ant
Fri, 22 Feb 2013 15:13:13 +0400
changeset 15983 26a673dec5b2
parent 14310 708173457cc0
child 16100 379f48d34516
permissions -rw-r--r--
8006406: lightweight embedding in other Java UI toolkits Reviewed-by: serb, anthony, art
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
     1
/*
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
     2
 * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
     4
 *
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4913
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4913
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    10
 *
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    15
 * accompanied this code).
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    16
 *
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4913
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4913
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4913
diff changeset
    23
 * questions.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    24
 */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    25
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    26
package sun.awt;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    27
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
    28
import sun.misc.Unsafe;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
    29
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    30
import java.awt.*;
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
    31
import java.awt.KeyboardFocusManager;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
    32
import java.awt.DefaultKeyboardFocusManager;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
    33
import java.awt.event.InputEvent;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
    34
import java.awt.event.KeyEvent;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    35
import java.awt.geom.Point2D;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
    36
import java.awt.peer.ComponentPeer;
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    37
import java.security.AccessControlContext;
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    38
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
    39
import java.io.File;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
    40
import java.util.Vector;
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
    41
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    42
/**
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    43
 * The AWTAccessor utility class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    44
 * The main purpose of this class is to enable accessing
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    45
 * private and package-private fields of classes from
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    46
 * different classes/packages. See sun.misc.SharedSecretes
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    47
 * for another example.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    48
 */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    49
public final class AWTAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    50
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    51
    private static final Unsafe unsafe = Unsafe.getUnsafe();
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    52
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    53
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    54
     * We don't need any objects of this class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    55
     * It's rather a collection of static methods
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    56
     * and interfaces.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    57
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    58
    private AWTAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    59
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    60
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    61
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    62
     * An interface of accessor for the java.awt.Component class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    63
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    64
    public interface ComponentAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    65
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    66
         * Sets whether the native background erase for a component
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    67
         * has been disabled via SunToolkit.disableBackgroundErase().
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    68
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    69
        void setBackgroundEraseDisabled(Component comp, boolean disabled);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    70
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    71
         * Indicates whether the native background erase for a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    72
         * component has been disabled via
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    73
         * SunToolkit.disableBackgroundErase().
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    74
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    75
        boolean getBackgroundEraseDisabled(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    76
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    77
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    78
         * Gets the bounds of this component in the form of a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    79
         * <code>Rectangle</code> object. The bounds specify this
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    80
         * component's width, height, and location relative to
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    81
         * its parent.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    82
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    83
        Rectangle getBounds(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    84
        /*
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    85
         * Sets the shape of a lw component to cut out from hw components.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    86
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    87
         * See 6797587, 6776743, 6768307, and 6768332 for details
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    88
         */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    89
        void setMixingCutoutShape(Component comp, Shape shape);
2459
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    90
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    91
        /**
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    92
         * Sets GraphicsConfiguration value for the component.
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    93
         */
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    94
        void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    95
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    96
         * Requests focus to the component.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    97
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    98
        boolean requestFocus(Component comp, CausedFocusEvent.Cause cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    99
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   100
         * Determines if the component can gain focus.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   101
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   102
        boolean canBeFocusOwner(Component comp);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   103
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   104
        /**
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   105
         * Returns whether the component is visible without invoking
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   106
         * any client code.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   107
         */
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   108
        boolean isVisible(Component comp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   109
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   110
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   111
         * Sets the RequestFocusController.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   112
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   113
        void setRequestFocusController(RequestFocusController requestController);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   114
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   115
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   116
         * Returns the appContext of the component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   117
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   118
        AppContext getAppContext(Component comp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   119
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   120
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   121
         * Sets the appContext of the component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   122
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   123
        void setAppContext(Component comp, AppContext appContext);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   124
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   125
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   126
         * Returns the parent of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   127
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   128
        Container getParent(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   129
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   130
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   131
         * Sets the parent of the component to the specified parent.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   132
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   133
        void setParent(Component comp, Container parent);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   134
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   135
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   136
         * Resizes the component to the specified width and height.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   137
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   138
        void setSize(Component comp, int width, int height);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   139
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   140
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   141
         * Returns the location of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   142
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   143
        Point getLocation(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   144
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   145
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   146
         * Moves the component to the new location.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   147
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   148
        void setLocation(Component comp, int x, int y);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   149
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   150
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   151
         * Determines whether this component is enabled.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   152
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   153
        boolean isEnabled(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   154
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   155
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   156
         * Determines whether this component is displayable.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   157
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   158
        boolean isDisplayable(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   159
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   160
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   161
         * Gets the cursor set in the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   162
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   163
        Cursor getCursor(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   164
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   165
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   166
         * Returns the peer of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   167
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   168
        ComponentPeer getPeer(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   169
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   170
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   171
         * Sets the peer of the component to the specified peer.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   172
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   173
        void setPeer(Component comp, ComponentPeer peer);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   174
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   175
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   176
         * Determines whether this component is lightweight.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   177
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   178
        boolean isLightweight(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   179
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   180
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   181
         * Returns whether or not paint messages received from
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   182
         * the operating system should be ignored.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   183
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   184
        boolean getIgnoreRepaint(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   185
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   186
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   187
         * Returns the width of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   188
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   189
        int getWidth(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   190
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   191
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   192
         * Returns the height of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   193
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   194
        int getHeight(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   195
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   196
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   197
         * Returns the x coordinate of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   198
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   199
        int getX(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   200
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   201
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   202
         * Returns the y coordinate of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   203
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   204
        int getY(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   205
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   206
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   207
         * Gets the foreground color of this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   208
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   209
        Color getForeground(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   210
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   211
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   212
         * Gets the background color of this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   213
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   214
        Color getBackground(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   215
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   216
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   217
         * Sets the background of this component to the specified color.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   218
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   219
        void setBackground(Component comp, Color background);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   220
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   221
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   222
         * Gets the font of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   223
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   224
        Font getFont(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   225
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   226
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   227
         * Processes events occurring on this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   228
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   229
        void processEvent(Component comp, AWTEvent e);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   230
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   231
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   232
        /*
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   233
         * Returns the acc this component was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   234
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   235
        AccessControlContext getAccessControlContext(Component comp);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   236
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   237
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   238
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   239
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   240
     * An interface of accessor for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   241
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   242
    public interface ContainerAccessor {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   243
        /**
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   244
         * Validates the container unconditionally.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   245
         */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   246
        void validateUnconditionally(Container cont);
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   247
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   248
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   249
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   250
     * An interface of accessor for java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   251
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   252
    public interface WindowAccessor {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   253
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   254
         * Get opacity level of the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   255
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   256
        float getOpacity(Window window);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   257
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   258
         * Set opacity level to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   259
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   260
        void setOpacity(Window window, float opacity);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   261
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   262
         * Get a shape assigned to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   263
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   264
        Shape getShape(Window window);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   265
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   266
         * Set a shape to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   267
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   268
        void setShape(Window window, Shape shape);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   269
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   270
         * Set the opaque preoperty to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   271
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   272
        void setOpaque(Window window, boolean isOpaque);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   273
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   274
         * Update the image of a non-opaque (translucent) window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   275
         */
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2472
diff changeset
   276
        void updateWindow(Window window);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   277
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   278
        /** Get the size of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   279
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   280
        Dimension getSecurityWarningSize(Window w);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   281
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   282
        /**
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   283
         * Set the size of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   284
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   285
        void setSecurityWarningSize(Window w, int width, int height);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   286
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   287
        /** Set the position of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   288
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   289
        void setSecurityWarningPosition(Window w, Point2D point,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   290
                float alignmentX, float alignmentY);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   291
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   292
        /** Request to recalculate the new position of the security warning for
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   293
         * the given window size/location as reported by the native system.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   294
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   295
        Point2D calculateSecurityWarningPosition(Window window,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   296
                double x, double y, double w, double h);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   297
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   298
        /** Sets the synchronous status of focus requests on lightweight
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   299
         * components in the specified window to the specified value.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   300
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   301
        void setLWRequestStatus(Window changed, boolean status);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   302
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   303
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   304
         * Indicates whether this window should receive focus on subsequently
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   305
         * being shown, or being moved to the front.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   306
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   307
        boolean isAutoRequestFocus(Window w);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   308
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   309
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   310
         * Indicates whether the specified window is an utility window for TrayIcon.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   311
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   312
        boolean isTrayIconWindow(Window w);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   313
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   314
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   315
         * Marks the specified window as an utility window for TrayIcon.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   316
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   317
        void setTrayIconWindow(Window w, boolean isTrayIconWindow);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   318
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   319
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   320
    /**
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   321
     * An accessor for the AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   322
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   323
    public interface AWTEventAccessor {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   324
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   325
         * Marks the event as posted.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   326
         */
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   327
        void setPosted(AWTEvent ev);
6826
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   328
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   329
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   330
         * Sets the flag on this AWTEvent indicating that it was
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   331
         * generated by the system.
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   332
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   333
        void setSystemGenerated(AWTEvent ev);
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   334
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   335
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   336
         * Indicates whether this AWTEvent was generated by the system.
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   337
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   338
        boolean isSystemGenerated(AWTEvent ev);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   339
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   340
        /**
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   341
         * Returns the acc this event was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   342
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   343
        AccessControlContext getAccessControlContext(AWTEvent ev);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   344
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   345
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   346
         * Returns binary data associated with this event;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   347
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   348
        byte[] getBData(AWTEvent ev);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   349
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   350
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   351
         * Associates binary data with this event;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   352
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   353
        void setBData(AWTEvent ev, byte[] bdata);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   354
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   355
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   356
    public interface InputEventAccessor {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   357
        /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   358
         * Accessor for InputEvent.getButtonDownMasks()
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   359
         */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   360
        int[] getButtonDownMasks();
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   361
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   362
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   363
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   364
     * An accessor for the java.awt.Frame class.
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   365
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   366
    public interface FrameAccessor {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   367
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   368
         * Sets the state of this frame.
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   369
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   370
        void setExtendedState(Frame frame, int state);
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   371
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   372
         * Gets the state of this frame.
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   373
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   374
       int getExtendedState(Frame frame);
7239
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   375
        /*
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   376
         * Gets the maximized bounds of this frame.
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   377
         */
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   378
       Rectangle getMaximizedBounds(Frame frame);
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   379
    }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   380
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   381
    /**
2465
1a6452b990cf 6815946: regression: failed to build MToolkit
ant
parents: 2464
diff changeset
   382
     * An interface of accessor for the java.awt.KeyboardFocusManager class.
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   383
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   384
    public interface KeyboardFocusManagerAccessor {
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   385
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   386
         * Indicates whether the native implementation should
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   387
         * proceed with a pending focus request for the heavyweight.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   388
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   389
        int shouldNativelyFocusHeavyweight(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   390
                                           Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   391
                                           boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   392
                                           boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   393
                                           long time,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   394
                                           CausedFocusEvent.Cause cause);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   395
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   396
         * Delivers focus for the lightweight descendant of the heavyweight
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   397
         * synchronously.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   398
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   399
        boolean processSynchronousLightweightTransfer(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   400
                                                      Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   401
                                                      boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   402
                                                      boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   403
                                                      long time);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   404
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   405
         * Removes the last focus request for the heavyweight from the queue.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   406
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   407
        void removeLastFocusRequest(Component heavyweight);
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   408
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   409
        /**
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   410
         * Sets the most recent focus owner in the window.
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   411
         */
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   412
        void setMostRecentFocusOwner(Window window, Component component);
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   413
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   414
        /**
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   415
         * Returns current KFM of the specified AppContext.
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   416
         */
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   417
        KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   418
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   419
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   420
         * Return the current focus cycle root
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   421
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   422
        Container getCurrentFocusCycleRoot();
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   423
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   424
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   425
    /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   426
     * An accessor for the MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   427
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   428
    public interface MenuComponentAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   429
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   430
         * Returns the appContext of the menu component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   431
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   432
        AppContext getAppContext(MenuComponent menuComp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   433
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   434
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   435
         * Sets the appContext of the menu component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   436
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   437
        void setAppContext(MenuComponent menuComp, AppContext appContext);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   438
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   439
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   440
         * Returns the menu container of the menu component
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   441
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   442
        MenuContainer getParent(MenuComponent menuComp);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   443
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   444
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   445
         * Gets the font used for this menu component.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   446
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   447
        Font getFont_NoClientCode(MenuComponent menuComp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   448
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   449
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   450
    /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   451
     * An accessor for the EventQueue class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   452
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   453
    public interface EventQueueAccessor {
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   454
        /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   455
         * Gets the event dispatch thread.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   456
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   457
        Thread getDispatchThread(EventQueue eventQueue);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   458
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   459
        /**
4365
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   460
         * Checks if the current thread is EDT for the given EQ.
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   461
         */
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   462
        public boolean isDispatchThreadImpl(EventQueue eventQueue);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   463
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   464
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   465
         * Removes any pending events for the specified source object.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   466
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   467
        void removeSourceEvents(EventQueue eventQueue, Object source, boolean removeAllEvents);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   468
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   469
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   470
         * Returns whether an event is pending on any of the separate Queues.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   471
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   472
        boolean noEvents(EventQueue eventQueue);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   473
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   474
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   475
         * Called from PostEventQueue.postEvent to notify that a new event
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   476
         * appeared.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   477
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   478
        void wakeup(EventQueue eventQueue, boolean isShutdown);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   479
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   480
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   481
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   482
     * An accessor for the PopupMenu class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   483
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   484
    public interface PopupMenuAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   485
        /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   486
         * Returns whether the popup menu is attached to a tray
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   487
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   488
        boolean isTrayIconPopup(PopupMenu popupMenu);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   489
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   490
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   491
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   492
     * An accessor for the FileDialog class
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   493
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   494
    public interface FileDialogAccessor {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   495
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   496
         * Sets the files the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   497
         */
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
   498
        void setFiles(FileDialog fileDialog, File files[]);
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   499
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   500
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   501
         * Sets the file the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   502
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   503
        void setFile(FileDialog fileDialog, String file);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   504
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   505
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   506
         * Sets the directory the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   507
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   508
        void setDirectory(FileDialog fileDialog, String directory);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   509
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   510
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   511
         * Returns whether the file dialog allows the multiple file selection.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   512
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   513
        boolean isMultipleMode(FileDialog fileDialog);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   514
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   515
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   516
    /*
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   517
     * An accessor for the ScrollPaneAdjustable class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   518
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   519
    public interface ScrollPaneAdjustableAccessor {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   520
        /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   521
         * Sets the value of this scrollbar to the specified value.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   522
         */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   523
        void setTypedValue(final ScrollPaneAdjustable adj, final int v,
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   524
                           final int type);
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   525
    }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   526
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   527
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   528
     * An accessor for the CheckboxMenuItem class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   529
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   530
    public interface CheckboxMenuItemAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   531
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   532
         * Returns whether menu item is checked
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   533
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   534
        boolean getState(CheckboxMenuItem cmi);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   535
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   536
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   537
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   538
     * An accessor for the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   539
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   540
    public interface CursorAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   541
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   542
         * Returns pData of the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   543
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   544
        long getPData(Cursor cursor);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   545
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   546
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   547
         * Sets pData to the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   548
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   549
        void setPData(Cursor cursor, long pData);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   550
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   551
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   552
         * Return type of the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   553
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   554
        int getType(Cursor cursor);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   555
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   556
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   557
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   558
     * An accessor for the MenuBar class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   559
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   560
    public interface MenuBarAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   561
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   562
         * Returns help menu
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   563
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   564
        Menu getHelpMenu(MenuBar menuBar);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   565
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   566
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   567
         * Returns menus
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   568
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   569
        Vector getMenus(MenuBar menuBar);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   570
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   571
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   572
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   573
     * An accessor for the MenuItem class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   574
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   575
    public interface MenuItemAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   576
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   577
         * Returns whether menu item is enabled
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   578
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   579
        boolean isEnabled(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   580
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   581
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   582
         * Gets the command name of the action event that is fired
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   583
         * by this menu item.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   584
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   585
        String getActionCommandImpl(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   586
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   587
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   588
         * Returns true if the item and all its ancestors are
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   589
         * enabled, false otherwise
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   590
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   591
        boolean isItemEnabled(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   592
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   593
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   594
         * Returns label
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   595
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   596
        String getLabel(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   597
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   598
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   599
         * Returns shortcut
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   600
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   601
        MenuShortcut getShortcut(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   602
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   603
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   604
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   605
     * An accessor for the Menu class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   606
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   607
    public interface MenuAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   608
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   609
         * Returns vector of the items that are part of the Menu
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   610
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   611
        Vector getItems(Menu menu);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   612
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   613
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   614
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   615
     * An accessor for the KeyEvent class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   616
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   617
    public interface KeyEventAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   618
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   619
         * Sets rawCode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   620
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   621
        void setRawCode(KeyEvent ev, long rawCode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   622
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   623
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   624
         * Sets primaryLevelUnicode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   625
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   626
        void setPrimaryLevelUnicode(KeyEvent ev, long primaryLevelUnicode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   627
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   628
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   629
         * Sets extendedKeyCode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   630
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   631
        void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode);
14310
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   632
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   633
        /**
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   634
         * Gets original source for KeyEvent
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   635
         */
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   636
        Component getOriginalSource(KeyEvent ev);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   637
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   638
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   639
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   640
     * An accessor for the ClientPropertyKey class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   641
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   642
    public interface ClientPropertyKeyAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   643
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   644
         * Retrieves JComponent_TRANSFER_HANDLER enum object
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   645
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   646
        Object getJComponent_TRANSFER_HANDLER();
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   647
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   648
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   649
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   650
     * An accessor for the SystemTray class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   651
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   652
    public interface SystemTrayAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   653
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   654
         * Support for reporting bound property changes for Object properties.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   655
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   656
        void firePropertyChange(SystemTray tray, String propertyName, Object oldValue, Object newValue);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   657
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   658
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   659
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   660
     * An accessor for the TrayIcon class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   661
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   662
    public interface TrayIconAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   663
        void addNotify(TrayIcon trayIcon) throws AWTException;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   664
        void removeNotify(TrayIcon trayIcon);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   665
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   666
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   667
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   668
     * An accessor for the DefaultKeyboardFocusManager class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   669
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   670
    public interface DefaultKeyboardFocusManagerAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   671
        public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   672
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   673
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   674
    /*
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   675
     * An accessor for the SequencedEventAccessor class
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   676
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   677
    public interface SequencedEventAccessor {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   678
        /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   679
         * Returns the nested event.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   680
         */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   681
        AWTEvent getNested(AWTEvent sequencedEvent);
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   682
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   683
        /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   684
         * Returns true if the event is an instances of SequencedEvent.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   685
         */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   686
        boolean isSequencedEvent(AWTEvent event);
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   687
    }
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   688
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   689
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   690
     * Accessor instances are initialized in the static initializers of
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   691
     * corresponding AWT classes by using setters defined below.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   692
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   693
    private static ComponentAccessor componentAccessor;
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   694
    private static ContainerAccessor containerAccessor;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   695
    private static WindowAccessor windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   696
    private static AWTEventAccessor awtEventAccessor;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   697
    private static InputEventAccessor inputEventAccessor;
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   698
    private static FrameAccessor frameAccessor;
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   699
    private static KeyboardFocusManagerAccessor kfmAccessor;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   700
    private static MenuComponentAccessor menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   701
    private static EventQueueAccessor eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   702
    private static PopupMenuAccessor popupMenuAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   703
    private static FileDialogAccessor fileDialogAccessor;
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   704
    private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   705
    private static CheckboxMenuItemAccessor checkboxMenuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   706
    private static CursorAccessor cursorAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   707
    private static MenuBarAccessor menuBarAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   708
    private static MenuItemAccessor menuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   709
    private static MenuAccessor menuAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   710
    private static KeyEventAccessor keyEventAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   711
    private static ClientPropertyKeyAccessor clientPropertyKeyAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   712
    private static SystemTrayAccessor systemTrayAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   713
    private static TrayIconAccessor trayIconAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   714
    private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   715
    private static SequencedEventAccessor sequencedEventAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   716
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   717
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   718
     * Set an accessor object for the java.awt.Component class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   719
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   720
    public static void setComponentAccessor(ComponentAccessor ca) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   721
        componentAccessor = ca;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   722
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   723
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   724
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   725
     * Retrieve the accessor object for the java.awt.Component class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   726
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   727
    public static ComponentAccessor getComponentAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   728
        if (componentAccessor == null) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   729
            unsafe.ensureClassInitialized(Component.class);
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   730
        }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   731
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   732
        return componentAccessor;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   733
    }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   734
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   735
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   736
     * Set an accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   737
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   738
    public static void setContainerAccessor(ContainerAccessor ca) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   739
        containerAccessor = ca;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   740
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   741
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   742
    /*
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   743
     * Retrieve the accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   744
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   745
    public static ContainerAccessor getContainerAccessor() {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   746
        if (containerAccessor == null) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   747
            unsafe.ensureClassInitialized(Container.class);
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   748
        }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   749
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   750
        return containerAccessor;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   751
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   752
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   753
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   754
     * Set an accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   755
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   756
    public static void setWindowAccessor(WindowAccessor wa) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   757
        windowAccessor = wa;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   758
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   759
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   760
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   761
     * Retrieve the accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   762
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   763
    public static WindowAccessor getWindowAccessor() {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   764
        if (windowAccessor == null) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   765
            unsafe.ensureClassInitialized(Window.class);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   766
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   767
        return windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   768
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   769
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   770
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   771
     * Set an accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   772
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   773
    public static void setAWTEventAccessor(AWTEventAccessor aea) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   774
        awtEventAccessor = aea;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   775
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   776
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   777
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   778
     * Retrieve the accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   779
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   780
    public static AWTEventAccessor getAWTEventAccessor() {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   781
        if (awtEventAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   782
            unsafe.ensureClassInitialized(AWTEvent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   783
        }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   784
        return awtEventAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   785
    }
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   786
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   787
    /*
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   788
     * Set an accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   789
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   790
    public static void setInputEventAccessor(InputEventAccessor iea) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   791
        inputEventAccessor = iea;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   792
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   793
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   794
    /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   795
     * Retrieve the accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   796
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   797
    public static InputEventAccessor getInputEventAccessor() {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   798
        if (inputEventAccessor == null) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   799
            unsafe.ensureClassInitialized(InputEvent.class);
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   800
        }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   801
        return inputEventAccessor;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   802
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   803
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   804
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   805
     * Set an accessor object for the java.awt.Frame class.
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   806
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   807
    public static void setFrameAccessor(FrameAccessor fa) {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   808
        frameAccessor = fa;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   809
    }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   810
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   811
    /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   812
     * Retrieve the accessor object for the java.awt.Frame class.
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   813
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   814
    public static FrameAccessor getFrameAccessor() {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   815
        if (frameAccessor == null) {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   816
            unsafe.ensureClassInitialized(Frame.class);
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   817
        }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   818
        return frameAccessor;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   819
    }
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   820
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   821
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   822
     * Set an accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   823
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   824
    public static void setKeyboardFocusManagerAccessor(KeyboardFocusManagerAccessor kfma) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   825
        kfmAccessor = kfma;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   826
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   827
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   828
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   829
     * Retrieve the accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   830
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   831
    public static KeyboardFocusManagerAccessor getKeyboardFocusManagerAccessor() {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   832
        if (kfmAccessor == null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   833
            unsafe.ensureClassInitialized(KeyboardFocusManager.class);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   834
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   835
        return kfmAccessor;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   836
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   837
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   838
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   839
     * Set an accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   840
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   841
    public static void setMenuComponentAccessor(MenuComponentAccessor mca) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   842
        menuComponentAccessor = mca;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   843
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   844
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   845
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   846
     * Retrieve the accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   847
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   848
    public static MenuComponentAccessor getMenuComponentAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   849
        if (menuComponentAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   850
            unsafe.ensureClassInitialized(MenuComponent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   851
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   852
        return menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   853
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   854
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   855
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   856
     * Set an accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   857
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   858
    public static void setEventQueueAccessor(EventQueueAccessor eqa) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   859
        eventQueueAccessor = eqa;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   860
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   861
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   862
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   863
     * Retrieve the accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   864
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   865
    public static EventQueueAccessor getEventQueueAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   866
        if (eventQueueAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   867
            unsafe.ensureClassInitialized(EventQueue.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   868
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   869
        return eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   870
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   871
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   872
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   873
     * Set an accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   874
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   875
    public static void setPopupMenuAccessor(PopupMenuAccessor pma) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   876
        popupMenuAccessor = pma;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   877
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   878
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   879
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   880
     * Retrieve the accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   881
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   882
    public static PopupMenuAccessor getPopupMenuAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   883
        if (popupMenuAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   884
            unsafe.ensureClassInitialized(PopupMenu.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   885
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   886
        return popupMenuAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   887
    }
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   888
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   889
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   890
     * Set an accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   891
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   892
    public static void setFileDialogAccessor(FileDialogAccessor fda) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   893
        fileDialogAccessor = fda;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   894
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   895
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   896
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   897
     * Retrieve the accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   898
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   899
    public static FileDialogAccessor getFileDialogAccessor() {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   900
        if (fileDialogAccessor == null) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   901
            unsafe.ensureClassInitialized(FileDialog.class);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   902
        }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   903
        return fileDialogAccessor;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   904
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   905
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   906
    /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   907
     * Set an accessor object for the java.awt.ScrollPaneAdjustable class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   908
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   909
    public static void setScrollPaneAdjustableAccessor(ScrollPaneAdjustableAccessor adj) {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   910
        scrollPaneAdjustableAccessor = adj;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   911
    }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   912
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   913
    /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   914
     * Retrieve the accessor object for the java.awt.ScrollPaneAdjustable
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   915
     * class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   916
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   917
    public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   918
        if (scrollPaneAdjustableAccessor == null) {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   919
            unsafe.ensureClassInitialized(ScrollPaneAdjustable.class);
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   920
        }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   921
        return scrollPaneAdjustableAccessor;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   922
    }
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   923
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   924
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   925
     * Set an accessor object for the java.awt.CheckboxMenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   926
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   927
    public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   928
        checkboxMenuItemAccessor = cmia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   929
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   930
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   931
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   932
     * Retrieve the accessor object for the java.awt.CheckboxMenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   933
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   934
    public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   935
        if (checkboxMenuItemAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   936
            unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   937
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   938
        return checkboxMenuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   939
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   940
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   941
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   942
     * Set an accessor object for the java.awt.Cursor class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   943
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   944
    public static void setCursorAccessor(CursorAccessor ca) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   945
        cursorAccessor = ca;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   946
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   947
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   948
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   949
     * Retrieve the accessor object for the java.awt.Cursor class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   950
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   951
    public static CursorAccessor getCursorAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   952
        if (cursorAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   953
            unsafe.ensureClassInitialized(CursorAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   954
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   955
        return cursorAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   956
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   957
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   958
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   959
     * Set an accessor object for the java.awt.MenuBar class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   960
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   961
    public static void setMenuBarAccessor(MenuBarAccessor mba) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   962
        menuBarAccessor = mba;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   963
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   964
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   965
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   966
     * Retrieve the accessor object for the java.awt.MenuBar class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   967
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   968
    public static MenuBarAccessor getMenuBarAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   969
        if (menuBarAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   970
            unsafe.ensureClassInitialized(MenuBarAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   971
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   972
        return menuBarAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   973
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   974
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   975
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   976
     * Set an accessor object for the java.awt.MenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   977
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   978
    public static void setMenuItemAccessor(MenuItemAccessor mia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   979
        menuItemAccessor = mia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   980
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   981
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   982
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   983
     * Retrieve the accessor object for the java.awt.MenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   984
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   985
    public static MenuItemAccessor getMenuItemAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   986
        if (menuItemAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   987
            unsafe.ensureClassInitialized(MenuItemAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   988
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   989
        return menuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   990
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   991
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   992
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   993
     * Set an accessor object for the java.awt.Menu class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   994
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   995
    public static void setMenuAccessor(MenuAccessor ma) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   996
        menuAccessor = ma;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   997
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   998
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   999
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1000
     * Retrieve the accessor object for the java.awt.Menu class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1001
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1002
    public static MenuAccessor getMenuAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1003
        if (menuAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1004
            unsafe.ensureClassInitialized(MenuAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1005
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1006
        return menuAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1007
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1008
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1009
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1010
     * Set an accessor object for the java.awt.event.KeyEvent class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1011
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1012
    public static void setKeyEventAccessor(KeyEventAccessor kea) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1013
        keyEventAccessor = kea;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1014
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1015
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1016
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1017
     * Retrieve the accessor object for the java.awt.event.KeyEvent class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1018
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1019
    public static KeyEventAccessor getKeyEventAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1020
        if (keyEventAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1021
            unsafe.ensureClassInitialized(KeyEventAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1022
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1023
        return keyEventAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1024
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1025
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1026
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1027
     * Set an accessor object for the javax.swing.ClientPropertyKey class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1028
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1029
    public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1030
        clientPropertyKeyAccessor = cpka;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1031
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1032
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1033
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1034
     * Retrieve the accessor object for the javax.swing.ClientPropertyKey class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1035
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1036
    public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1037
        if (clientPropertyKeyAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1038
            unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1039
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1040
        return clientPropertyKeyAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1041
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1042
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1043
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1044
     * Set an accessor object for the java.awt.SystemTray class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1045
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1046
    public static void setSystemTrayAccessor(SystemTrayAccessor sta) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1047
        systemTrayAccessor = sta;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1048
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1049
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1050
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1051
     * Retrieve the accessor object for the java.awt.SystemTray class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1052
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1053
    public static SystemTrayAccessor getSystemTrayAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1054
        if (systemTrayAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1055
            unsafe.ensureClassInitialized(SystemTrayAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1056
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1057
        return systemTrayAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1058
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1059
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1060
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1061
     * Set an accessor object for the java.awt.TrayIcon class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1062
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1063
    public static void setTrayIconAccessor(TrayIconAccessor tia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1064
        trayIconAccessor = tia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1065
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1066
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1067
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1068
     * Retrieve the accessor object for the java.awt.TrayIcon class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1069
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1070
    public static TrayIconAccessor getTrayIconAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1071
        if (trayIconAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1072
            unsafe.ensureClassInitialized(TrayIconAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1073
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1074
        return trayIconAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1075
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1076
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1077
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1078
     * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1079
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1080
    public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1081
        defaultKeyboardFocusManagerAccessor = dkfma;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1082
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1083
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1084
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1085
     * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1086
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1087
    public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1088
        if (defaultKeyboardFocusManagerAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1089
            unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1090
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1091
        return defaultKeyboardFocusManagerAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1092
    }
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1093
    /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1094
     * Set an accessor object for the java.awt.SequencedEvent class.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1095
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1096
    public static void setSequencedEventAccessor(SequencedEventAccessor sea) {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1097
        sequencedEventAccessor = sea;
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1098
    }
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1099
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1100
    /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1101
     * Get the accessor object for the java.awt.SequencedEvent class.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1102
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1103
    public static SequencedEventAccessor getSequencedEventAccessor() {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1104
        // The class is not public. So we can't ensure it's initialized.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1105
        // Null returned value means it's not initialized
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1106
        // (so not a single instance of the event has been created).
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1107
        return sequencedEventAccessor;
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1108
    }
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
  1109
}