jdk/src/share/classes/sun/awt/AWTAccessor.java
author denis
Thu, 17 Mar 2011 17:16:35 -0700
changeset 8816 29f983feda95
parent 7668 d4a77089c587
child 9035 1255eb81cc2f
permissions -rw-r--r--
6907662: System clipboard should ensure access restrictions Reviewed-by: alexp
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
/*
7668
d4a77089c587 6962318: Update copyright year
ohair
parents: 7241
diff changeset
     2
 * Copyright (c) 2008, 2010, 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
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    28
import java.awt.*;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
    29
import java.awt.event.InputEvent;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    30
import java.awt.geom.Point2D;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    31
import java.awt.image.BufferedImage;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    32
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    33
import sun.misc.Unsafe;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
    34
import java.awt.peer.ComponentPeer;
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    35
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    36
import java.security.AccessController;
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    37
import java.security.AccessControlContext;
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    38
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    39
/**
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    40
 * The AWTAccessor utility class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    41
 * 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
    42
 * 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
    43
 * different classes/packages. See sun.misc.SharedSecretes
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    44
 * for another example.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    45
 */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    46
public final class AWTAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    47
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    48
    private static final Unsafe unsafe = Unsafe.getUnsafe();
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    49
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    50
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    51
     * 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
    52
     * 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
    53
     * and interfaces.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    54
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    55
    private AWTAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    56
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    57
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    58
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    59
     * 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
    60
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    61
    public interface ComponentAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    62
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    63
         * Sets whether the native background erase for a component
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    64
         * has been disabled via SunToolkit.disableBackgroundErase().
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    65
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    66
        void setBackgroundEraseDisabled(Component comp, boolean disabled);
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
         * Indicates whether the native background erase for a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    69
         * component has been disabled via
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    70
         * SunToolkit.disableBackgroundErase().
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    71
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    72
        boolean getBackgroundEraseDisabled(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    73
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    74
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    75
         * Gets the bounds of this component in the form of a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    76
         * <code>Rectangle</code> object. The bounds specify this
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    77
         * component's width, height, and location relative to
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    78
         * its parent.
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
        Rectangle getBounds(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    81
        /*
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    82
         * 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
    83
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    84
         * 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
    85
         */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    86
        void setMixingCutoutShape(Component comp, Shape shape);
2459
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    87
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    88
        /**
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    89
         * Sets GraphicsConfiguration value for the component.
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    90
         */
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    91
        void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    92
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    93
         * Requests focus to the component.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    94
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    95
        boolean requestFocus(Component comp, CausedFocusEvent.Cause cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    96
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    97
         * Determines if the component can gain focus.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    98
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    99
        boolean canBeFocusOwner(Component comp);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   100
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   101
        /**
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   102
         * Returns whether the component is visible without invoking
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   103
         * any client code.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   104
         */
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   105
        boolean isVisible(Component comp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   106
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   107
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   108
         * Sets the RequestFocusController.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   109
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   110
        void setRequestFocusController(RequestFocusController requestController);
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
         * Returns the appContext of the component.
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
        AppContext getAppContext(Component comp);
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
         * Sets 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
        void setAppContext(Component comp, AppContext appContext);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   121
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   122
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   123
         * Returns the parent of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   124
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   125
        Container getParent(Component comp);
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
         * Sets the parent of the component to the specified parent.
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
        void setParent(Component comp, Container parent);
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
         * Resizes the component to the specified width and height.
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 setSize(Component comp, int width, int height);
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
         * Returns the location of the component.
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
        Point getLocation(Component comp);
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
         * Moves the component to the new location.
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
        void setLocation(Component comp, int x, int y);
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
         * Determines whether this component is enabled.
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
        boolean isEnabled(Component comp);
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 displayable.
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 isDisplayable(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
         * Gets the cursor set in the component.
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
        Cursor getCursor(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
         * Returns the peer of 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
        ComponentPeer getPeer(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
         * Sets the peer of the component to the specified peer.
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
        void setPeer(Component comp, ComponentPeer peer);
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
         * Determines whether this component is lightweight.
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
        boolean isLightweight(Component comp);
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
         * Returns whether or not paint messages received from
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   179
         * the operating system should be ignored.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   180
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   181
        boolean getIgnoreRepaint(Component comp);
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
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   184
         * Returns the width of the component.
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
        int getWidth(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 height 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 getHeight(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 x coordinate 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 getX(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 y 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 getY(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
         * Gets the foreground color of this 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
        Color getForeground(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 background 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 getBackground(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
         * Sets the background of this component to the specified color.
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
        void setBackground(Component comp, Color background);
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
         * Gets the font of the component.
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
        Font getFont(Component comp);
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
         * Processes events occurring on this 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
        void processEvent(Component comp, AWTEvent e);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   227
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   228
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   229
        /*
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   230
         * Returns the acc this component was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   231
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   232
        AccessControlContext getAccessControlContext(Component comp);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   233
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   234
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   235
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   236
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   237
     * An interface of accessor for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   238
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   239
    public interface ContainerAccessor {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   240
        /**
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   241
         * Validates the container unconditionally.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   242
         */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   243
        void validateUnconditionally(Container cont);
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   244
    }
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
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   247
     * An interface of accessor for java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   248
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   249
    public interface WindowAccessor {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   250
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   251
         * Get opacity level of the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   252
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   253
        float getOpacity(Window window);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   254
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   255
         * Set opacity level to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   256
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   257
        void setOpacity(Window window, float opacity);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   258
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   259
         * Get a shape assigned to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   260
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   261
        Shape getShape(Window window);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   262
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   263
         * Set a shape to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   264
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   265
        void setShape(Window window, Shape shape);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   266
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   267
         * Set the opaque preoperty to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   268
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   269
        void setOpaque(Window window, boolean isOpaque);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   270
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   271
         * Update the image of a non-opaque (translucent) window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   272
         */
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2472
diff changeset
   273
        void updateWindow(Window window);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   274
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   275
        /** Get the size of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   276
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   277
        Dimension getSecurityWarningSize(Window w);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   278
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
         * Set 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
        void setSecurityWarningSize(Window w, int width, int height);
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
        /** Set the position of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   285
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   286
        void setSecurityWarningPosition(Window w, Point2D point,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   287
                float alignmentX, float alignmentY);
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
        /** Request to recalculate the new position of the security warning for
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   290
         * the given window size/location as reported by the native system.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   291
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   292
        Point2D calculateSecurityWarningPosition(Window window,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   293
                double x, double y, double w, double h);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   294
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   295
        /** Sets the synchronous status of focus requests on lightweight
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   296
         * components in the specified window to the specified value.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   297
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   298
        void setLWRequestStatus(Window changed, boolean status);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   299
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   300
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   301
         * Indicates whether this window should receive focus on subsequently
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   302
         * being shown, or being moved to the front.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   303
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   304
        boolean isAutoRequestFocus(Window w);
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
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   307
         * Indicates whether the specified window is an utility window for TrayIcon.
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 isTrayIconWindow(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
         * Marks the specified window as 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
        void setTrayIconWindow(Window w, boolean isTrayIconWindow);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   315
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   316
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   317
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   318
     * An accessor for the AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   319
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   320
    public interface AWTEventAccessor {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   321
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   322
         * Marks the event as posted.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   323
         */
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   324
        void setPosted(AWTEvent ev);
6826
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   325
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   326
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   327
         * 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
   328
         * generated by the system.
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   329
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   330
        void setSystemGenerated(AWTEvent ev);
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
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   333
         * 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
   334
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   335
        boolean isSystemGenerated(AWTEvent ev);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   336
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   337
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   338
        /*
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   339
         * Returns the acc this event was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   340
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   341
        AccessControlContext getAccessControlContext(AWTEvent ev);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   342
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   343
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   344
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   345
    public interface InputEventAccessor {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   346
        /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   347
         * Accessor for InputEvent.getButtonDownMasks()
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   348
         */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   349
        int[] getButtonDownMasks();
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   350
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   351
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   352
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   353
     * 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
   354
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   355
    public interface FrameAccessor {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   356
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   357
         * 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
   358
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   359
        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
   360
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   361
         * 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
   362
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   363
       int getExtendedState(Frame frame);
7239
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   364
        /*
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   365
         * Gets the maximized bounds of this frame.
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   366
         */
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   367
       Rectangle getMaximizedBounds(Frame frame);
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   368
    }
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
    /*
2465
1a6452b990cf 6815946: regression: failed to build MToolkit
ant
parents: 2464
diff changeset
   371
     * 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
   372
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   373
    public interface KeyboardFocusManagerAccessor {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   374
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   375
         * Indicates whether the native implementation should
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   376
         * proceed with a pending focus request for the heavyweight.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   377
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   378
        int shouldNativelyFocusHeavyweight(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   379
                                           Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   380
                                           boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   381
                                           boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   382
                                           long time,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   383
                                           CausedFocusEvent.Cause cause);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   384
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   385
         * Delivers focus for the lightweight descendant of the heavyweight
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   386
         * synchronously.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   387
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   388
        boolean processSynchronousLightweightTransfer(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   389
                                                      Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   390
                                                      boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   391
                                                      boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   392
                                                      long time);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   393
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   394
         * 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
   395
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   396
        void removeLastFocusRequest(Component heavyweight);
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   397
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   398
        /*
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   399
         * Sets the most recent focus owner in the window.
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   400
         */
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   401
        void setMostRecentFocusOwner(Window window, Component component);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   402
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   403
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   404
    /*
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   405
     * An accessor for the MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   406
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   407
    public interface MenuComponentAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   408
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   409
         * Returns the appContext of the menu component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   410
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   411
        AppContext getAppContext(MenuComponent menuComp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   412
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   413
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   414
         * Sets the appContext of the menu component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   415
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   416
        void setAppContext(MenuComponent menuComp, AppContext appContext);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   417
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   418
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   419
         * Returns the menu container of the menu component
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   420
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   421
        MenuContainer getParent(MenuComponent menuComp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   422
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   423
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   424
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   425
     * An accessor for the EventQueue class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   426
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   427
    public interface EventQueueAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   428
        /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   429
         * Gets the event dispatch thread.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   430
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   431
        Thread getDispatchThread(EventQueue eventQueue);
4365
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   432
        /*
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   433
         * Checks if the current thread is EDT for the given EQ.
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   434
         */
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   435
        public boolean isDispatchThreadImpl(EventQueue eventQueue);
3084
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
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
     * An accessor for the PopupMenu class
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
    public interface PopupMenuAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   442
        /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   443
         * Returns whether the popup menu is attached to a tray
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   444
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   445
        boolean isTrayIconPopup(PopupMenu popupMenu);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   446
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   447
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   448
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   449
     * An accessor for the FileDialog class
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   450
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   451
    public interface FileDialogAccessor {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   452
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   453
         * Sets the files the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   454
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   455
        void setFiles(FileDialog fileDialog, String directory, String files[]);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   456
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   457
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   458
         * Sets the file the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   459
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   460
        void setFile(FileDialog fileDialog, String file);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   461
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   462
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   463
         * Sets the directory the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   464
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   465
        void setDirectory(FileDialog fileDialog, String directory);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   466
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   467
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   468
         * Returns whether the file dialog allows the multiple file selection.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   469
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   470
        boolean isMultipleMode(FileDialog fileDialog);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   471
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   472
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   473
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   474
     * Accessor instances are initialized in the static initializers of
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   475
     * 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
   476
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   477
    private static ComponentAccessor componentAccessor;
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   478
    private static ContainerAccessor containerAccessor;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   479
    private static WindowAccessor windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   480
    private static AWTEventAccessor awtEventAccessor;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   481
    private static InputEventAccessor inputEventAccessor;
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   482
    private static FrameAccessor frameAccessor;
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   483
    private static KeyboardFocusManagerAccessor kfmAccessor;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   484
    private static MenuComponentAccessor menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   485
    private static EventQueueAccessor eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   486
    private static PopupMenuAccessor popupMenuAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   487
    private static FileDialogAccessor fileDialogAccessor;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   488
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   489
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   490
     * 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
   491
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   492
    public static void setComponentAccessor(ComponentAccessor ca) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   493
        componentAccessor = ca;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   494
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   495
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   496
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   497
     * 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
   498
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   499
    public static ComponentAccessor getComponentAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   500
        if (componentAccessor == null) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   501
            unsafe.ensureClassInitialized(Component.class);
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   502
        }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   503
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   504
        return componentAccessor;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   505
    }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   506
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   507
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   508
     * Set an accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   509
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   510
    public static void setContainerAccessor(ContainerAccessor ca) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   511
        containerAccessor = ca;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   512
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   513
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   514
    /*
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   515
     * Retrieve the accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   516
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   517
    public static ContainerAccessor getContainerAccessor() {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   518
        if (containerAccessor == null) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   519
            unsafe.ensureClassInitialized(Container.class);
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   520
        }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   521
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   522
        return containerAccessor;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   523
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   524
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   525
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   526
     * Set an accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   527
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   528
    public static void setWindowAccessor(WindowAccessor wa) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   529
        windowAccessor = wa;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   530
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   531
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   532
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   533
     * Retrieve the accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   534
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   535
    public static WindowAccessor getWindowAccessor() {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   536
        if (windowAccessor == null) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   537
            unsafe.ensureClassInitialized(Window.class);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   538
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   539
        return windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   540
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   541
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   542
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   543
     * Set an accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   544
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   545
    public static void setAWTEventAccessor(AWTEventAccessor aea) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   546
        awtEventAccessor = aea;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   547
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   548
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   549
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   550
     * Retrieve the accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   551
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   552
    public static AWTEventAccessor getAWTEventAccessor() {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   553
        if (awtEventAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   554
            unsafe.ensureClassInitialized(AWTEvent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   555
        }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   556
        return awtEventAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   557
    }
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   558
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   559
    /*
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   560
     * Set an accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   561
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   562
    public static void setInputEventAccessor(InputEventAccessor iea) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   563
        inputEventAccessor = iea;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   564
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   565
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   566
    /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   567
     * Retrieve the accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   568
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   569
    public static InputEventAccessor getInputEventAccessor() {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   570
        if (inputEventAccessor == null) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   571
            unsafe.ensureClassInitialized(InputEvent.class);
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   572
        }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   573
        return inputEventAccessor;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   574
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   575
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   576
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   577
     * 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
   578
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   579
    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
   580
        frameAccessor = fa;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   581
    }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   582
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   583
    /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   584
     * 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
   585
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   586
    public static FrameAccessor getFrameAccessor() {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   587
        if (frameAccessor == null) {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   588
            unsafe.ensureClassInitialized(Frame.class);
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   589
        }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   590
        return frameAccessor;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   591
    }
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   592
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   593
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   594
     * Set an accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   595
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   596
    public static void setKeyboardFocusManagerAccessor(KeyboardFocusManagerAccessor kfma) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   597
        kfmAccessor = kfma;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   598
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   599
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   600
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   601
     * Retrieve the accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   602
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   603
    public static KeyboardFocusManagerAccessor getKeyboardFocusManagerAccessor() {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   604
        if (kfmAccessor == null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   605
            unsafe.ensureClassInitialized(KeyboardFocusManager.class);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   606
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   607
        return kfmAccessor;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   608
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   609
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   610
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   611
     * Set an accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   612
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   613
    public static void setMenuComponentAccessor(MenuComponentAccessor mca) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   614
        menuComponentAccessor = mca;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   615
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   616
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   617
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   618
     * Retrieve the accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   619
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   620
    public static MenuComponentAccessor getMenuComponentAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   621
        if (menuComponentAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   622
            unsafe.ensureClassInitialized(MenuComponent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   623
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   624
        return menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   625
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   626
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   627
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   628
     * Set an accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   629
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   630
    public static void setEventQueueAccessor(EventQueueAccessor eqa) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   631
        eventQueueAccessor = eqa;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   632
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   633
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   634
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   635
     * Retrieve the accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   636
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   637
    public static EventQueueAccessor getEventQueueAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   638
        if (eventQueueAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   639
            unsafe.ensureClassInitialized(EventQueue.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   640
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   641
        return eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   642
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   643
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   644
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   645
     * Set an accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   646
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   647
    public static void setPopupMenuAccessor(PopupMenuAccessor pma) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   648
        popupMenuAccessor = pma;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   649
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   650
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   651
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   652
     * Retrieve the accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   653
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   654
    public static PopupMenuAccessor getPopupMenuAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   655
        if (popupMenuAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   656
            unsafe.ensureClassInitialized(PopupMenu.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   657
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   658
        return popupMenuAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   659
    }
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   660
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   661
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   662
     * Set an accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   663
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   664
    public static void setFileDialogAccessor(FileDialogAccessor fda) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   665
        fileDialogAccessor = fda;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   666
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   667
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   668
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   669
     * Retrieve the accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   670
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   671
    public static FileDialogAccessor getFileDialogAccessor() {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   672
        if (fileDialogAccessor == null) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   673
            unsafe.ensureClassInitialized(FileDialog.class);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   674
        }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   675
        return fileDialogAccessor;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   676
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   677
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   678
}