jdk/src/share/classes/sun/awt/AWTAccessor.java
author bagiras
Thu, 15 Nov 2012 23:03:31 +0400
changeset 16092 129d7d8a7399
parent 13656 776ac504ea9b
child 16100 379f48d34516
permissions -rw-r--r--
7192977: Issue in toolkit thread Reviewed-by: skoivu, rupashka, 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;
16092
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
    37
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
    38
import java.lang.reflect.InvocationTargetException;
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    39
import java.security.AccessControlContext;
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    40
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
    41
import java.io.File;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
    42
import java.util.Vector;
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
    43
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    44
/**
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    45
 * The AWTAccessor utility class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    46
 * 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
    47
 * 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
    48
 * different classes/packages. See sun.misc.SharedSecretes
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    49
 * for another example.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    50
 */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    51
public final class AWTAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    52
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    53
    private static final Unsafe unsafe = Unsafe.getUnsafe();
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    54
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    55
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    56
     * 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
    57
     * 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
    58
     * and interfaces.
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
    private AWTAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    61
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    62
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    63
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    64
     * 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
    65
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    66
    public interface ComponentAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    67
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    68
         * Sets whether the native background erase for a component
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    69
         * has been disabled via SunToolkit.disableBackgroundErase().
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
        void setBackgroundEraseDisabled(Component comp, boolean disabled);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    72
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    73
         * Indicates whether the native background erase for a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    74
         * component has been disabled via
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    75
         * SunToolkit.disableBackgroundErase().
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
        boolean getBackgroundEraseDisabled(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    78
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    79
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    80
         * Gets the bounds of this component in the form of a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    81
         * <code>Rectangle</code> object. The bounds specify this
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    82
         * component's width, height, and location relative to
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    83
         * its parent.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    84
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    85
        Rectangle getBounds(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    86
        /*
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    87
         * 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
    88
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    89
         * 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
    90
         */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    91
        void setMixingCutoutShape(Component comp, Shape shape);
2459
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    92
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
         * Sets GraphicsConfiguration value for the component.
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    95
         */
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    96
        void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc);
2464
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
         * Requests focus to the component.
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
        boolean requestFocus(Component comp, CausedFocusEvent.Cause cause);
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
         * Determines if the component can gain focus.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   103
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   104
        boolean canBeFocusOwner(Component comp);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   105
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   106
        /**
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   107
         * Returns whether the component is visible without invoking
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   108
         * any client code.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   109
         */
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   110
        boolean isVisible(Component comp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   111
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
         * Sets the RequestFocusController.
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
        void setRequestFocusController(RequestFocusController requestController);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   116
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
         * Returns the appContext of the component.
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
        AppContext getAppContext(Component comp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   121
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
         * Sets the appContext of the component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   124
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   125
        void setAppContext(Component comp, AppContext appContext);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   126
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
         * Returns the parent of the component.
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
        Container getParent(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   131
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
         * Sets the parent of the component to the specified 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
        void setParent(Component comp, Container parent);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   136
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
         * Resizes the component to the specified width and 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
        void setSize(Component comp, int width, int height);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   141
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
         * Returns the location of the component.
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
        Point getLocation(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   146
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
         * Moves the component to the new location.
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
        void setLocation(Component comp, int x, int y);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   151
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
         * Determines whether this component is enabled.
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
        boolean isEnabled(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   156
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
         * Determines whether this component is displayable.
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
        boolean isDisplayable(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   161
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
         * Gets the cursor set in the component.
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
        Cursor getCursor(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   166
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
         * Returns the peer of the component.
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
        ComponentPeer getPeer(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   171
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
         * Sets the peer of the component to the specified 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
        void setPeer(Component comp, ComponentPeer peer);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   176
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
         * Determines whether this component is lightweight.
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
        boolean isLightweight(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   181
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   182
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   183
         * Returns whether or not paint messages received from
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   184
         * the operating system should be ignored.
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
        boolean getIgnoreRepaint(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   187
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
         * Returns the width of the component.
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
        int getWidth(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   192
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
         * Returns the height of the component.
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
        int getHeight(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   197
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
         * Returns the x coordinate of the component.
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
        int getX(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   202
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
         * Returns the y coordinate of the component.
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
        int getY(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   207
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
         * Gets the foreground color of this component.
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
        Color getForeground(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   212
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
         * Gets the background color of this component.
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
        Color getBackground(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   217
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
         * Sets the background of this component to the specified color.
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
        void setBackground(Component comp, Color background);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   222
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
         * Gets the font of the component.
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
        Font getFont(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   227
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
         * Processes events occurring on this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   230
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   231
        void processEvent(Component comp, AWTEvent e);
8816
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
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
         * Returns the acc this component was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   236
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   237
        AccessControlContext getAccessControlContext(Component comp);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   238
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   239
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   240
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   241
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   242
     * An interface of accessor for the java.awt.Container class.
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
    public interface ContainerAccessor {
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
         * Validates the container unconditionally.
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
        void validateUnconditionally(Container cont);
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   249
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   250
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   251
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   252
     * An interface of accessor for java.awt.Window class.
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
    public interface WindowAccessor {
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
         * Get opacity level of the given 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
        float getOpacity(Window 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
         * Set opacity level to the given window.
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
        void setOpacity(Window window, float opacity);
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
         * Get a shape assigned to the given 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
        Shape getShape(Window 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
         * Set a shape to the given window.
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
        void setShape(Window window, Shape shape);
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
         * Set the opaque preoperty to the given window.
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
        void setOpaque(Window window, boolean isOpaque);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   275
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   276
         * Update the image of a non-opaque (translucent) window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   277
         */
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2472
diff changeset
   278
        void updateWindow(Window window);
2472
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
        /** Get the size of the security warning.
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
        Dimension getSecurityWarningSize(Window w);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   283
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
         * Set the size of the security warning.
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
        void setSecurityWarningSize(Window w, int width, int height);
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
        /** Set the position of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   290
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   291
        void setSecurityWarningPosition(Window w, Point2D point,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   292
                float alignmentX, float alignmentY);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   293
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   294
        /** Request to recalculate the new position of the security warning for
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   295
         * the given window size/location as reported by the native system.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   296
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   297
        Point2D calculateSecurityWarningPosition(Window window,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   298
                double x, double y, double w, double h);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   299
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   300
        /** Sets the synchronous status of focus requests on lightweight
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   301
         * components in the specified window to the specified value.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   302
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   303
        void setLWRequestStatus(Window changed, boolean status);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   304
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   305
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   306
         * Indicates whether this window should receive focus on subsequently
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   307
         * being shown, or being moved to the front.
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
        boolean isAutoRequestFocus(Window w);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   310
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
         * Indicates whether the specified window is an utility window for TrayIcon.
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
        boolean isTrayIconWindow(Window w);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   315
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
         * Marks the specified window as an utility window for TrayIcon.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   318
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   319
        void setTrayIconWindow(Window w, boolean isTrayIconWindow);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   320
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   321
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   322
    /**
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   323
     * An accessor for the AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   324
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   325
    public interface AWTEventAccessor {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   326
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   327
         * Marks the event as posted.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   328
         */
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   329
        void setPosted(AWTEvent ev);
6826
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   330
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   331
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   332
         * 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
   333
         * generated by the system.
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
        void setSystemGenerated(AWTEvent ev);
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   336
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
         * 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
   339
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   340
        boolean isSystemGenerated(AWTEvent ev);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   341
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   342
        /**
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   343
         * Returns the acc this event was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   344
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   345
        AccessControlContext getAccessControlContext(AWTEvent ev);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   346
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   347
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   348
         * Returns binary data associated with this event;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   349
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   350
        byte[] getBData(AWTEvent ev);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   351
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   352
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   353
         * Associates binary data with this event;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   354
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   355
        void setBData(AWTEvent ev, byte[] bdata);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   356
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   357
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   358
    public interface InputEventAccessor {
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
         * Accessor for InputEvent.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
        int[] getButtonDownMasks();
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   363
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   364
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   365
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   366
     * 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
   367
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   368
    public interface FrameAccessor {
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
         * 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
   371
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   372
        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
   373
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   374
         * 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
   375
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   376
       int getExtendedState(Frame frame);
7239
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
         * Gets the maximized bounds of this frame.
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   379
         */
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   380
       Rectangle getMaximizedBounds(Frame frame);
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   381
    }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   382
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   383
    /**
2465
1a6452b990cf 6815946: regression: failed to build MToolkit
ant
parents: 2464
diff changeset
   384
     * 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
   385
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   386
    public interface KeyboardFocusManagerAccessor {
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   387
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   388
         * Indicates whether the native implementation should
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   389
         * proceed with a pending focus request for the heavyweight.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   390
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   391
        int shouldNativelyFocusHeavyweight(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   392
                                           Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   393
                                           boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   394
                                           boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   395
                                           long time,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   396
                                           CausedFocusEvent.Cause cause);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   397
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   398
         * Delivers focus for the lightweight descendant of the heavyweight
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   399
         * synchronously.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   400
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   401
        boolean processSynchronousLightweightTransfer(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   402
                                                      Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   403
                                                      boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   404
                                                      boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   405
                                                      long time);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   406
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   407
         * 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
   408
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   409
        void removeLastFocusRequest(Component heavyweight);
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   410
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   411
        /**
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   412
         * Sets the most recent focus owner in the window.
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   413
         */
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   414
        void setMostRecentFocusOwner(Window window, Component component);
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   415
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   416
        /**
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   417
         * Returns current KFM of the specified AppContext.
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   418
         */
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   419
        KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   420
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   421
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   422
         * Return the current focus cycle root
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   423
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   424
        Container getCurrentFocusCycleRoot();
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   425
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   426
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   427
    /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   428
     * An accessor for the MenuComponent class.
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
    public interface MenuComponentAccessor {
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
         * Returns the appContext of the menu component.
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
        AppContext getAppContext(MenuComponent menuComp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   435
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
         * Sets the appContext of the menu component.
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
        void setAppContext(MenuComponent menuComp, AppContext appContext);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   440
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
         * Returns the menu container of the menu component
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   443
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   444
        MenuContainer getParent(MenuComponent menuComp);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   445
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   446
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   447
         * Gets the font used for this menu component.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   448
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   449
        Font getFont_NoClientCode(MenuComponent menuComp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   450
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   451
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   452
    /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   453
     * An accessor for the EventQueue class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   454
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   455
    public interface EventQueueAccessor {
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   456
        /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   457
         * Gets the event dispatch thread.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   458
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   459
        Thread getDispatchThread(EventQueue eventQueue);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   460
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   461
        /**
4365
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   462
         * Checks if the current thread is EDT for the given EQ.
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   463
         */
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   464
        public boolean isDispatchThreadImpl(EventQueue eventQueue);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   465
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   466
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   467
         * Removes any pending events for the specified source object.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   468
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   469
        void removeSourceEvents(EventQueue eventQueue, Object source, boolean removeAllEvents);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   470
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   471
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   472
         * Returns whether an event is pending on any of the separate Queues.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   473
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   474
        boolean noEvents(EventQueue eventQueue);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   475
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   476
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   477
         * Called from PostEventQueue.postEvent to notify that a new event
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   478
         * appeared.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   479
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   480
        void wakeup(EventQueue eventQueue, boolean isShutdown);
16092
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   481
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   482
        /**
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   483
         * Static in EventQueue
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   484
         */
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   485
        void invokeAndWait(Object source, Runnable r)
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   486
            throws InterruptedException, InvocationTargetException;
3084
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
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
     * An accessor for the PopupMenu class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   491
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   492
    public interface PopupMenuAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   493
        /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   494
         * Returns whether the popup menu is attached to a tray
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   495
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   496
        boolean isTrayIconPopup(PopupMenu popupMenu);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   497
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   498
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
     * An accessor for the FileDialog class
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   501
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   502
    public interface FileDialogAccessor {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   503
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   504
         * Sets the files the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   505
         */
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
   506
        void setFiles(FileDialog fileDialog, File files[]);
4913
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
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   509
         * Sets the file the user selects
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
        void setFile(FileDialog fileDialog, String file);
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
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   514
         * Sets the directory the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   515
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   516
        void setDirectory(FileDialog fileDialog, String directory);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   517
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   518
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   519
         * Returns whether the file dialog allows the multiple file selection.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   520
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   521
        boolean isMultipleMode(FileDialog fileDialog);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   522
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   523
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   524
    /*
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   525
     * 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
   526
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   527
    public interface ScrollPaneAdjustableAccessor {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   528
        /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   529
         * 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
   530
         */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   531
        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
   532
                           final int type);
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   533
    }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   534
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   535
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   536
     * An accessor for the CheckboxMenuItem class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   537
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   538
    public interface CheckboxMenuItemAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   539
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   540
         * Returns whether menu item is checked
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   541
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   542
        boolean getState(CheckboxMenuItem cmi);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   543
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   544
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   545
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   546
     * An accessor for the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   547
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   548
    public interface CursorAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   549
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   550
         * Returns pData of the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   551
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   552
        long getPData(Cursor cursor);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   553
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   554
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   555
         * Sets pData to the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   556
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   557
        void setPData(Cursor cursor, long pData);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   558
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   559
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   560
         * Return type of the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   561
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   562
        int getType(Cursor cursor);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   563
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   564
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   565
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   566
     * An accessor for the MenuBar class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   567
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   568
    public interface MenuBarAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   569
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   570
         * Returns help menu
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   571
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   572
        Menu getHelpMenu(MenuBar menuBar);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   573
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   574
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   575
         * Returns menus
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   576
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   577
        Vector getMenus(MenuBar menuBar);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   578
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   579
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   580
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   581
     * An accessor for the MenuItem class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   582
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   583
    public interface MenuItemAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   584
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   585
         * Returns whether menu item is enabled
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   586
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   587
        boolean isEnabled(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   588
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   589
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   590
         * Gets the command name of the action event that is fired
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   591
         * by this menu 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
        String getActionCommandImpl(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   594
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   595
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   596
         * Returns true if the item and all its ancestors are
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   597
         * enabled, false otherwise
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   598
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   599
        boolean isItemEnabled(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   600
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   601
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   602
         * Returns label
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   603
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   604
        String getLabel(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   605
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   606
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   607
         * Returns shortcut
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   608
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   609
        MenuShortcut getShortcut(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   610
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   611
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   612
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   613
     * An accessor for the Menu class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   614
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   615
    public interface MenuAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   616
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   617
         * Returns vector of the items that are part of the Menu
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   618
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   619
        Vector getItems(Menu menu);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   620
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   621
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   622
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   623
     * An accessor for the KeyEvent class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   624
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   625
    public interface KeyEventAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   626
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   627
         * Sets rawCode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   628
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   629
        void setRawCode(KeyEvent ev, long rawCode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   630
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   631
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   632
         * Sets primaryLevelUnicode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   633
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   634
        void setPrimaryLevelUnicode(KeyEvent ev, long primaryLevelUnicode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   635
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   636
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   637
         * Sets extendedKeyCode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   638
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   639
        void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   640
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   641
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   642
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   643
     * An accessor for the ClientPropertyKey class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   644
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   645
    public interface ClientPropertyKeyAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   646
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   647
         * Retrieves JComponent_TRANSFER_HANDLER enum object
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   648
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   649
        Object getJComponent_TRANSFER_HANDLER();
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   650
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   651
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   652
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   653
     * An accessor for the SystemTray class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   654
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   655
    public interface SystemTrayAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   656
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   657
         * Support for reporting bound property changes for Object properties.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   658
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   659
        void firePropertyChange(SystemTray tray, String propertyName, Object oldValue, Object newValue);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   660
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   661
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   662
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   663
     * An accessor for the TrayIcon class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   664
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   665
    public interface TrayIconAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   666
        void addNotify(TrayIcon trayIcon) throws AWTException;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   667
        void removeNotify(TrayIcon trayIcon);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   668
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   669
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   670
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   671
     * An accessor for the DefaultKeyboardFocusManager class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   672
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   673
    public interface DefaultKeyboardFocusManagerAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   674
        public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   675
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   676
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   677
    /*
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   678
     * An accessor for the SequencedEventAccessor class
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   679
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   680
    public interface SequencedEventAccessor {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   681
        /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   682
         * Returns the nested event.
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
        AWTEvent getNested(AWTEvent 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
        /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   687
         * 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
   688
         */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   689
        boolean isSequencedEvent(AWTEvent event);
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   690
    }
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   691
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   692
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   693
     * Accessor instances are initialized in the static initializers of
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   694
     * 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
   695
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   696
    private static ComponentAccessor componentAccessor;
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   697
    private static ContainerAccessor containerAccessor;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   698
    private static WindowAccessor windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   699
    private static AWTEventAccessor awtEventAccessor;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   700
    private static InputEventAccessor inputEventAccessor;
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   701
    private static FrameAccessor frameAccessor;
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   702
    private static KeyboardFocusManagerAccessor kfmAccessor;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   703
    private static MenuComponentAccessor menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   704
    private static EventQueueAccessor eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   705
    private static PopupMenuAccessor popupMenuAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   706
    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
   707
    private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   708
    private static CheckboxMenuItemAccessor checkboxMenuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   709
    private static CursorAccessor cursorAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   710
    private static MenuBarAccessor menuBarAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   711
    private static MenuItemAccessor menuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   712
    private static MenuAccessor menuAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   713
    private static KeyEventAccessor keyEventAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   714
    private static ClientPropertyKeyAccessor clientPropertyKeyAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   715
    private static SystemTrayAccessor systemTrayAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   716
    private static TrayIconAccessor trayIconAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   717
    private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   718
    private static SequencedEventAccessor sequencedEventAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   719
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   720
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   721
     * 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
   722
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   723
    public static void setComponentAccessor(ComponentAccessor ca) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   724
        componentAccessor = ca;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   725
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   726
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   727
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   728
     * 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
   729
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   730
    public static ComponentAccessor getComponentAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   731
        if (componentAccessor == null) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   732
            unsafe.ensureClassInitialized(Component.class);
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   733
        }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   734
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   735
        return componentAccessor;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   736
    }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   737
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   738
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   739
     * Set an accessor object for the java.awt.Container class.
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
    public static void setContainerAccessor(ContainerAccessor ca) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   742
        containerAccessor = ca;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   743
    }
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
    /*
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   746
     * Retrieve the accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   747
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   748
    public static ContainerAccessor getContainerAccessor() {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   749
        if (containerAccessor == null) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   750
            unsafe.ensureClassInitialized(Container.class);
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
        return containerAccessor;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   754
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   755
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   756
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   757
     * Set an accessor object for the java.awt.Window class.
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
    public static void setWindowAccessor(WindowAccessor wa) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   760
        windowAccessor = wa;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   761
    }
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
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   764
     * Retrieve the accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   765
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   766
    public static WindowAccessor getWindowAccessor() {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   767
        if (windowAccessor == null) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   768
            unsafe.ensureClassInitialized(Window.class);
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
        return windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   771
    }
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
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   774
     * Set an accessor object for the java.awt.AWTEvent class.
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
    public static void setAWTEventAccessor(AWTEventAccessor aea) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   777
        awtEventAccessor = aea;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   778
    }
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
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   781
     * Retrieve the accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   782
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   783
    public static AWTEventAccessor getAWTEventAccessor() {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   784
        if (awtEventAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   785
            unsafe.ensureClassInitialized(AWTEvent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   786
        }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   787
        return awtEventAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   788
    }
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   789
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   790
    /*
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   791
     * Set an accessor object for the java.awt.event.InputEvent class.
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
    public static void setInputEventAccessor(InputEventAccessor iea) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   794
        inputEventAccessor = iea;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   795
    }
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
    /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   798
     * Retrieve the accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   799
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   800
    public static InputEventAccessor getInputEventAccessor() {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   801
        if (inputEventAccessor == null) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   802
            unsafe.ensureClassInitialized(InputEvent.class);
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
        return inputEventAccessor;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   805
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   806
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   807
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   808
     * 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
   809
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   810
    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
   811
        frameAccessor = fa;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   812
    }
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
    /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   815
     * 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
   816
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   817
    public static FrameAccessor getFrameAccessor() {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   818
        if (frameAccessor == null) {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   819
            unsafe.ensureClassInitialized(Frame.class);
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   820
        }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   821
        return frameAccessor;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   822
    }
2464
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
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   825
     * Set an accessor object for the java.awt.KeyboardFocusManager class.
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
    public static void setKeyboardFocusManagerAccessor(KeyboardFocusManagerAccessor kfma) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   828
        kfmAccessor = kfma;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   829
    }
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
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   832
     * Retrieve the accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   833
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   834
    public static KeyboardFocusManagerAccessor getKeyboardFocusManagerAccessor() {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   835
        if (kfmAccessor == null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   836
            unsafe.ensureClassInitialized(KeyboardFocusManager.class);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   837
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   838
        return kfmAccessor;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   839
    }
3084
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
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   842
     * Set an accessor object for the java.awt.MenuComponent class.
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
    public static void setMenuComponentAccessor(MenuComponentAccessor mca) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   845
        menuComponentAccessor = mca;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   846
    }
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
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   849
     * Retrieve the accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   850
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   851
    public static MenuComponentAccessor getMenuComponentAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   852
        if (menuComponentAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   853
            unsafe.ensureClassInitialized(MenuComponent.class);
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
        return menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   856
    }
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
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   859
     * Set an accessor object for the java.awt.EventQueue class.
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
    public static void setEventQueueAccessor(EventQueueAccessor eqa) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   862
        eventQueueAccessor = eqa;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   863
    }
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
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   866
     * Retrieve the accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   867
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   868
    public static EventQueueAccessor getEventQueueAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   869
        if (eventQueueAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   870
            unsafe.ensureClassInitialized(EventQueue.class);
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
        return eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   873
    }
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
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   876
     * Set an accessor object for the java.awt.PopupMenu class.
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
    public static void setPopupMenuAccessor(PopupMenuAccessor pma) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   879
        popupMenuAccessor = pma;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   880
    }
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
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   883
     * Retrieve the accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   884
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   885
    public static PopupMenuAccessor getPopupMenuAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   886
        if (popupMenuAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   887
            unsafe.ensureClassInitialized(PopupMenu.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   888
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   889
        return popupMenuAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   890
    }
4913
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
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   893
     * Set an accessor object for the java.awt.FileDialog class.
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
    public static void setFileDialogAccessor(FileDialogAccessor fda) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   896
        fileDialogAccessor = fda;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   897
    }
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
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   900
     * Retrieve the accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   901
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   902
    public static FileDialogAccessor getFileDialogAccessor() {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   903
        if (fileDialogAccessor == null) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   904
            unsafe.ensureClassInitialized(FileDialog.class);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   905
        }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   906
        return fileDialogAccessor;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   907
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   908
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   909
    /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   910
     * 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
   911
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   912
    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
   913
        scrollPaneAdjustableAccessor = adj;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   914
    }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   915
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
     * 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
   918
     * class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   919
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   920
    public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   921
        if (scrollPaneAdjustableAccessor == null) {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   922
            unsafe.ensureClassInitialized(ScrollPaneAdjustable.class);
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   923
        }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   924
        return scrollPaneAdjustableAccessor;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   925
    }
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   926
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   927
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   928
     * Set an accessor object for the java.awt.CheckboxMenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   929
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   930
    public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   931
        checkboxMenuItemAccessor = cmia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   932
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   933
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   934
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   935
     * Retrieve the accessor object for the java.awt.CheckboxMenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   936
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   937
    public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   938
        if (checkboxMenuItemAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   939
            unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   940
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   941
        return checkboxMenuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   942
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   943
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   944
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   945
     * Set an accessor object for the java.awt.Cursor class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   946
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   947
    public static void setCursorAccessor(CursorAccessor ca) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   948
        cursorAccessor = ca;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   949
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   950
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   951
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   952
     * Retrieve the accessor object for the java.awt.Cursor class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   953
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   954
    public static CursorAccessor getCursorAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   955
        if (cursorAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   956
            unsafe.ensureClassInitialized(CursorAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   957
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   958
        return cursorAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   959
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   960
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   961
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   962
     * Set an accessor object for the java.awt.MenuBar class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   963
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   964
    public static void setMenuBarAccessor(MenuBarAccessor mba) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   965
        menuBarAccessor = mba;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   966
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   967
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   968
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   969
     * Retrieve the accessor object for the java.awt.MenuBar class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   970
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   971
    public static MenuBarAccessor getMenuBarAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   972
        if (menuBarAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   973
            unsafe.ensureClassInitialized(MenuBarAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   974
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   975
        return menuBarAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   976
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   977
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   978
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   979
     * Set an accessor object for the java.awt.MenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   980
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   981
    public static void setMenuItemAccessor(MenuItemAccessor mia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   982
        menuItemAccessor = mia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   983
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   984
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   985
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   986
     * Retrieve the accessor object for the java.awt.MenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   987
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   988
    public static MenuItemAccessor getMenuItemAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   989
        if (menuItemAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   990
            unsafe.ensureClassInitialized(MenuItemAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   991
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   992
        return menuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   993
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   994
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   995
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   996
     * Set an accessor object for the java.awt.Menu class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   997
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   998
    public static void setMenuAccessor(MenuAccessor ma) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   999
        menuAccessor = ma;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1000
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1001
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1002
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1003
     * Retrieve the accessor object for the java.awt.Menu class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1004
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1005
    public static MenuAccessor getMenuAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1006
        if (menuAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1007
            unsafe.ensureClassInitialized(MenuAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1008
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1009
        return menuAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1010
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1011
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1012
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1013
     * Set an accessor object for the java.awt.event.KeyEvent class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1014
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1015
    public static void setKeyEventAccessor(KeyEventAccessor kea) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1016
        keyEventAccessor = kea;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1017
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1018
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1019
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1020
     * Retrieve the accessor object for the java.awt.event.KeyEvent class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1021
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1022
    public static KeyEventAccessor getKeyEventAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1023
        if (keyEventAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1024
            unsafe.ensureClassInitialized(KeyEventAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1025
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1026
        return keyEventAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1027
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1028
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1029
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1030
     * Set an accessor object for the javax.swing.ClientPropertyKey class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1031
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1032
    public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1033
        clientPropertyKeyAccessor = cpka;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1034
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1035
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1036
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1037
     * Retrieve the accessor object for the javax.swing.ClientPropertyKey class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1038
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1039
    public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1040
        if (clientPropertyKeyAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1041
            unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1042
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1043
        return clientPropertyKeyAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1044
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1045
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1046
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1047
     * Set an accessor object for the java.awt.SystemTray class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1048
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1049
    public static void setSystemTrayAccessor(SystemTrayAccessor sta) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1050
        systemTrayAccessor = sta;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1051
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1052
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1053
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1054
     * Retrieve the accessor object for the java.awt.SystemTray class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1055
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1056
    public static SystemTrayAccessor getSystemTrayAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1057
        if (systemTrayAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1058
            unsafe.ensureClassInitialized(SystemTrayAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1059
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1060
        return systemTrayAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1061
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1062
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1063
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1064
     * Set an accessor object for the java.awt.TrayIcon class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1065
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1066
    public static void setTrayIconAccessor(TrayIconAccessor tia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1067
        trayIconAccessor = tia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1068
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1069
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1070
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1071
     * Retrieve the accessor object for the java.awt.TrayIcon class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1072
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1073
    public static TrayIconAccessor getTrayIconAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1074
        if (trayIconAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1075
            unsafe.ensureClassInitialized(TrayIconAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1076
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1077
        return trayIconAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1078
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1079
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1080
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1081
     * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1082
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1083
    public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1084
        defaultKeyboardFocusManagerAccessor = dkfma;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1085
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1086
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1087
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1088
     * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1089
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1090
    public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1091
        if (defaultKeyboardFocusManagerAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1092
            unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1093
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1094
        return defaultKeyboardFocusManagerAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1095
    }
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1096
    /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1097
     * 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
  1098
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1099
    public static void setSequencedEventAccessor(SequencedEventAccessor sea) {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1100
        sequencedEventAccessor = sea;
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1101
    }
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
    /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1104
     * 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
  1105
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1106
    public static SequencedEventAccessor getSequencedEventAccessor() {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1107
        // 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
  1108
        // 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
  1109
        // (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
  1110
        return sequencedEventAccessor;
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1111
    }
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
  1112
}