jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java
author prr
Fri, 03 Feb 2017 09:28:34 -0800
changeset 43724 a272f9475e44
parent 42731 631236c16dff
permissions -rw-r--r--
8173409: make setMixingCutoutShape public and remove jdk.desktop Reviewed-by: serb, mchung, alexsch
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
/*
37694
c064aefc5a2f 8080395: consider making sun.awt.CausedFocusEvent functionality public
ssadetsky
parents: 35667
diff changeset
     2
 * Copyright (c) 2008, 2016, 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
33674
566777f73c32 8140606: Update library code to use internal Unsafe
chegar
parents: 30470
diff changeset
    28
import jdk.internal.misc.Unsafe;
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
    29
24523
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
    30
import javax.accessibility.AccessibleContext;
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    31
import java.awt.*;
37694
c064aefc5a2f 8080395: consider making sun.awt.CausedFocusEvent functionality public
ssadetsky
parents: 35667
diff changeset
    32
import java.awt.event.FocusEvent.Cause;
30470
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
    33
import java.awt.dnd.DragSourceContext;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
    34
import java.awt.dnd.DropTargetContext;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
    35
import java.awt.dnd.peer.DragSourceContextPeer;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
    36
import java.awt.dnd.peer.DropTargetContextPeer;
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
    37
import java.awt.event.AWTEventListener;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
    38
import java.awt.event.InputEvent;
21246
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
    39
import java.awt.event.InvocationEvent;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
    40
import java.awt.event.KeyEvent;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    41
import java.awt.geom.Point2D;
23297
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
    42
import java.awt.image.BufferStrategy;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
    43
import java.awt.peer.ComponentPeer;
16092
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
    44
30469
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
    45
import java.awt.peer.MenuComponentPeer;
16092
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
    46
import java.lang.reflect.InvocationTargetException;
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    47
import java.security.AccessControlContext;
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
    48
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
    49
import java.io.File;
20147
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
    50
import java.util.ResourceBundle;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
    51
import java.util.Vector;
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
    52
import javax.accessibility.AccessibleBundle;
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
    53
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    54
/**
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
    55
 * The AWTAccessor utility class.
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    56
 * 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
    57
 * 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
    58
 * different classes/packages. See sun.misc.SharedSecretes
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    59
 * for another example.
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 final class AWTAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    62
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    63
    private static final Unsafe unsafe = Unsafe.getUnsafe();
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    64
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    65
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    66
     * 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
    67
     * 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
    68
     * and interfaces.
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    69
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    70
    private AWTAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    71
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    72
2451
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
     * 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
    75
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
    76
    public interface ComponentAccessor {
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    77
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    78
         * Sets whether the native background erase for a component
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    79
         * has been disabled via SunToolkit.disableBackgroundErase().
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    80
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    81
        void setBackgroundEraseDisabled(Component comp, boolean disabled);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    82
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    83
         * Indicates whether the native background erase for a
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    84
         * component has been disabled via
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    85
         * SunToolkit.disableBackgroundErase().
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    86
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    87
        boolean getBackgroundEraseDisabled(Component comp);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    88
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    89
         *
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    90
         * Gets the bounds of this component in the form of a
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33674
diff changeset
    91
         * {@code Rectangle} object. The bounds specify this
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    92
         * component's width, height, and location relative to
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    93
         * its parent.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    94
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
    95
        Rectangle getBounds(Component comp);
2459
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    96
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    97
        /**
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    98
         * Sets GraphicsConfiguration value for the component.
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
    99
         */
08f3416ff334 6804747: Ensure consistent graphicsConfig member across components hierarchy
anthony
parents: 2453
diff changeset
   100
        void setGraphicsConfiguration(Component comp, GraphicsConfiguration gc);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   101
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   102
         * Requests focus to the component.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   103
         */
41805
d30817604de5 8154434: Open the request focus methods of the java.awt.Component which accept FocusEvent.Cause
ssadetsky
parents: 40719
diff changeset
   104
        void requestFocus(Component comp, Cause cause);
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   105
        /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   106
         * Determines if the component can gain focus.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   107
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   108
        boolean canBeFocusOwner(Component comp);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   109
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   110
        /**
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   111
         * Returns whether the component is visible without invoking
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   112
         * any client code.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   113
         */
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   114
        boolean isVisible(Component comp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   115
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   116
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   117
         * Sets the RequestFocusController.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   118
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   119
        void setRequestFocusController(RequestFocusController requestController);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   120
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   121
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   122
         * Returns the appContext of the component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   123
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   124
        AppContext getAppContext(Component comp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   125
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   126
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   127
         * Sets the appContext of the component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   128
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   129
        void setAppContext(Component comp, AppContext appContext);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   130
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   131
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   132
         * Returns the parent of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   133
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   134
        Container getParent(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   135
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   136
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   137
         * Sets the parent of the component to the specified parent.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   138
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   139
        void setParent(Component comp, Container parent);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   140
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   141
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   142
         * Resizes the component to the specified width and height.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   143
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   144
        void setSize(Component comp, int width, int height);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   145
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   146
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   147
         * Returns the location of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   148
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   149
        Point getLocation(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   150
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   151
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   152
         * Moves the component to the new location.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   153
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   154
        void setLocation(Component comp, int x, int y);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   155
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   156
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   157
         * Determines whether this component is enabled.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   158
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   159
        boolean isEnabled(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   160
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   161
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   162
         * Determines whether this component is displayable.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   163
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   164
        boolean isDisplayable(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   165
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   166
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   167
         * Gets the cursor set in the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   168
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   169
        Cursor getCursor(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   170
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   171
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   172
         * Returns the peer of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   173
         */
30469
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
   174
        <T extends ComponentPeer> T getPeer(Component comp);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   175
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   176
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   177
         * Sets the peer of the component to the specified peer.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   178
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   179
        void setPeer(Component comp, ComponentPeer peer);
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
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   182
         * Determines whether this component is lightweight.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   183
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   184
        boolean isLightweight(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   185
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   186
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   187
         * Returns whether or not paint messages received from
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   188
         * the operating system should be ignored.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   189
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   190
        boolean getIgnoreRepaint(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   191
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   192
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   193
         * Returns the width of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   194
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   195
        int getWidth(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   196
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   197
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   198
         * Returns the height of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   199
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   200
        int getHeight(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   201
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   202
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   203
         * Returns the x coordinate of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   204
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   205
        int getX(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   206
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   207
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   208
         * Returns the y coordinate of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   209
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   210
        int getY(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   211
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   212
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   213
         * Gets the foreground color of this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   214
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   215
        Color getForeground(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   216
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   217
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   218
         * Gets the background color of this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   219
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   220
        Color getBackground(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   221
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   222
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   223
         * Sets the background of this component to the specified color.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   224
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   225
        void setBackground(Component comp, Color background);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   226
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   227
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   228
         * Gets the font of the component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   229
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   230
        Font getFont(Component comp);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   231
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   232
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   233
         * Processes events occurring on this component.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   234
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   235
        void processEvent(Component comp, AWTEvent e);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   236
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   237
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   238
        /*
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   239
         * Returns the acc this component was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   240
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   241
        AccessControlContext getAccessControlContext(Component comp);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   242
20097
a4a07c4ead5f 8023474: First mousepress doesn't start editing in JTree
dmarkov
parents: 17899
diff changeset
   243
        /**
a4a07c4ead5f 8023474: First mousepress doesn't start editing in JTree
dmarkov
parents: 17899
diff changeset
   244
         * Revalidates the component synchronously.
a4a07c4ead5f 8023474: First mousepress doesn't start editing in JTree
dmarkov
parents: 17899
diff changeset
   245
         */
a4a07c4ead5f 8023474: First mousepress doesn't start editing in JTree
dmarkov
parents: 17899
diff changeset
   246
        void revalidateSynchronously(Component comp);
a4a07c4ead5f 8023474: First mousepress doesn't start editing in JTree
dmarkov
parents: 17899
diff changeset
   247
23297
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   248
        /**
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   249
         * Creates a new strategy for multi-buffering on this component.
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   250
         */
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   251
        void createBufferStrategy(Component comp, int numBuffers,
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   252
                BufferCapabilities caps) throws AWTException;
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   253
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   254
        /**
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   255
         * returns the buffer strategy used by this component.
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   256
         */
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   257
        BufferStrategy getBufferStrategy(Component comp);
1978
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   258
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   259
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   260
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   261
     * An interface of accessor for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   262
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   263
    public interface ContainerAccessor {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   264
        /**
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   265
         * Validates the container unconditionally.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   266
         */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   267
        void validateUnconditionally(Container cont);
20165
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   268
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   269
        /**
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   270
         *
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   271
         * Access to the private version of findComponentAt method which has
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   272
         * a controllable behavior. Setting 'ignoreEnabled' to 'false'
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   273
         * bypasses disabled Components during the search.
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   274
         */
75e673bbdba6 8007155: [macosx] Disabled panel takes mouse input in JLayeredPane
alexsch
parents: 20147
diff changeset
   275
        Component findComponentAt(Container cont, int x, int y, boolean ignoreEnabled);
24147
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   276
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   277
        /**
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   278
         * Starts LW Modal.
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   279
         */
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   280
        void startLWModal(Container cont);
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   281
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   282
        /**
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   283
         * Starts LW Modal.
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   284
         */
204ae465851d 8030052: Remove reflection from JOptionPane
alexsch
parents: 23297
diff changeset
   285
        void stopLWModal(Container cont);
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   286
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   287
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   288
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   289
     * An interface of accessor for java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   290
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   291
    public interface WindowAccessor {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   292
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   293
         * Get opacity level of the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   294
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   295
        float getOpacity(Window window);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   296
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   297
         * Set opacity level to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   298
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   299
        void setOpacity(Window window, float opacity);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   300
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   301
         * Get a shape assigned to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   302
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   303
        Shape getShape(Window window);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   304
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   305
         * Set a shape to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   306
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   307
        void setShape(Window window, Shape shape);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   308
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   309
         * Set the opaque preoperty to the given window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   310
         */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   311
        void setOpaque(Window window, boolean isOpaque);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   312
        /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   313
         * Update the image of a non-opaque (translucent) window.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   314
         */
2808
a139a919f645 6794764: Translucent windows are completely repainted on every paint event, on Windows
art
parents: 2472
diff changeset
   315
        void updateWindow(Window window);
2472
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   316
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   317
        /** Get the size of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   318
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   319
        Dimension getSecurityWarningSize(Window w);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   320
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   321
        /**
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   322
         * Set the size of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   323
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   324
        void setSecurityWarningSize(Window w, int width, int height);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   325
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   326
        /** Set the position of the security warning.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   327
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   328
        void setSecurityWarningPosition(Window w, Point2D point,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   329
                float alignmentX, float alignmentY);
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   330
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   331
        /** Request to recalculate the new position of the security warning for
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   332
         * the given window size/location as reported by the native system.
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   333
         */
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   334
        Point2D calculateSecurityWarningPosition(Window window,
b7aba00cabb6 6693253: Security Warning appearance requires enhancements
anthony
parents: 2465
diff changeset
   335
                double x, double y, double w, double h);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   336
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   337
        /** Sets the synchronous status of focus requests on lightweight
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   338
         * components in the specified window to the specified value.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   339
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   340
        void setLWRequestStatus(Window changed, boolean status);
4371
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   341
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   342
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   343
         * Indicates whether this window should receive focus on subsequently
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   344
         * being shown, or being moved to the front.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   345
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   346
        boolean isAutoRequestFocus(Window w);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   347
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   348
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   349
         * Indicates whether the specified window is an utility window for TrayIcon.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   350
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   351
        boolean isTrayIconWindow(Window w);
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   352
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   353
        /**
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   354
         * Marks the specified window as an utility window for TrayIcon.
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   355
         */
dc9dcb8b0ae7 6823138: Need to replace ComponentAccessor with AWTAccessor
dcherepanov
parents: 4365
diff changeset
   356
        void setTrayIconWindow(Window w, boolean isTrayIconWindow);
42731
631236c16dff 8169589: [macosx] Activating a JDialog puts to back another dialog
dmarkov
parents: 41805
diff changeset
   357
631236c16dff 8169589: [macosx] Activating a JDialog puts to back another dialog
dmarkov
parents: 41805
diff changeset
   358
        /**
631236c16dff 8169589: [macosx] Activating a JDialog puts to back another dialog
dmarkov
parents: 41805
diff changeset
   359
         * Return an array containing all the windows this
631236c16dff 8169589: [macosx] Activating a JDialog puts to back another dialog
dmarkov
parents: 41805
diff changeset
   360
         * window currently owns.
631236c16dff 8169589: [macosx] Activating a JDialog puts to back another dialog
dmarkov
parents: 41805
diff changeset
   361
         */
631236c16dff 8169589: [macosx] Activating a JDialog puts to back another dialog
dmarkov
parents: 41805
diff changeset
   362
        Window[] getOwnedWindows(Window w);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   363
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   364
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   365
    /**
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   366
     * An accessor for the AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   367
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   368
    public interface AWTEventAccessor {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   369
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   370
         * Marks the event as posted.
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   371
         */
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   372
        void setPosted(AWTEvent ev);
6826
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   373
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   374
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   375
         * 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
   376
         * generated by the system.
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   377
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   378
        void setSystemGenerated(AWTEvent ev);
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   379
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   380
        /**
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   381
         * 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
   382
         */
1fc6a05552f2 6991992: Need to forward-port AWT's part of the fix for 6691674
dcherepanov
parents: 6825
diff changeset
   383
        boolean isSystemGenerated(AWTEvent ev);
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   384
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   385
        /**
8816
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   386
         * Returns the acc this event was constructed with.
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   387
         */
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   388
        AccessControlContext getAccessControlContext(AWTEvent ev);
29f983feda95 6907662: System clipboard should ensure access restrictions
denis
parents: 7668
diff changeset
   389
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   390
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   391
         * Returns binary data associated with this event;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   392
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   393
        byte[] getBData(AWTEvent ev);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   394
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   395
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   396
         * Associates binary data with this event;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   397
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   398
        void setBData(AWTEvent ev, byte[] bdata);
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   399
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   400
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   401
    public interface InputEventAccessor {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   402
        /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   403
         * Accessor for InputEvent.getButtonDownMasks()
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   404
         */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   405
        int[] getButtonDownMasks();
23297
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   406
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   407
        /*
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   408
         * Accessor for InputEvent.canAccessSystemClipboard field
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   409
         */
2946ef51ee24 8029960: Remove reflection from Swing classes
alexsch
parents: 23268
diff changeset
   410
        boolean canAccessSystemClipboard(InputEvent event);
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   411
        void setCanAccessSystemClipboard(InputEvent event,
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   412
                boolean canAccessSystemClipboard);
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   413
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   414
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   415
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   416
     * 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
   417
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   418
    public interface FrameAccessor {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   419
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   420
         * 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
   421
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   422
        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
   423
        /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   424
         * 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
   425
         */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   426
       int getExtendedState(Frame frame);
7239
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   427
        /*
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   428
         * Gets the maximized bounds of this frame.
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   429
         */
514eb274caa1 6699851: setMaximizedbounds not working properly on dual screen environment
dcherepanov
parents: 6826
diff changeset
   430
       Rectangle getMaximizedBounds(Frame frame);
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   431
    }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   432
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   433
    /**
2465
1a6452b990cf 6815946: regression: failed to build MToolkit
ant
parents: 2464
diff changeset
   434
     * 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
   435
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   436
    public interface KeyboardFocusManagerAccessor {
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   437
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   438
         * Indicates whether the native implementation should
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   439
         * proceed with a pending focus request for the heavyweight.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   440
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   441
        int shouldNativelyFocusHeavyweight(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   442
                                           Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   443
                                           boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   444
                                           boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   445
                                           long time,
37694
c064aefc5a2f 8080395: consider making sun.awt.CausedFocusEvent functionality public
ssadetsky
parents: 35667
diff changeset
   446
                                           Cause cause);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   447
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   448
         * Delivers focus for the lightweight descendant of the heavyweight
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   449
         * synchronously.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   450
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   451
        boolean processSynchronousLightweightTransfer(Component heavyweight,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   452
                                                      Component descendant,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   453
                                                      boolean temporary,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   454
                                                      boolean focusedWindowChangeAllowed,
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   455
                                                      long time);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   456
        /**
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   457
         * 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
   458
         */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   459
        void removeLastFocusRequest(Component heavyweight);
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   460
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   461
        /**
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   462
         * Gets the most recent focus owner in the window.
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   463
         */
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   464
        Component getMostRecentFocusOwner(Window window);
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   465
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   466
        /**
6634
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   467
         * Sets the most recent focus owner in the window.
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   468
         */
439221465ac5 6505819: Provide traverseIn method for sun.awt.EmbeddedFrame
ant
parents: 5506
diff changeset
   469
        void setMostRecentFocusOwner(Window window, Component component);
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   470
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   471
        /**
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   472
         * Returns current KFM of the specified AppContext.
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   473
         */
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 10097
diff changeset
   474
        KeyboardFocusManager getCurrentKeyboardFocusManager(AppContext ctx);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   475
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   476
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   477
         * Return the current focus cycle root
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   478
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   479
        Container getCurrentFocusCycleRoot();
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   480
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   481
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   482
    /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   483
     * An accessor for the MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   484
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   485
    public interface MenuComponentAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   486
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   487
         * Returns the appContext of the menu component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   488
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   489
        AppContext getAppContext(MenuComponent menuComp);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   490
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   491
        /**
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   492
         * Sets the appContext of the menu component.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   493
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   494
        void setAppContext(MenuComponent menuComp, AppContext appContext);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   495
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   496
        /**
30469
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
   497
         * Returns the peer of the menu component.
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
   498
         */
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
   499
        <T extends MenuComponentPeer> T getPeer(MenuComponent menuComp);
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
   500
bac0a7ff7e1e 8074028: Remove API references to java.awt.peer
serb
parents: 25859
diff changeset
   501
        /**
25764
6333e4aa8a70 8049830: Remove reflection from ScreenMenuBar
pchelko
parents: 25133
diff changeset
   502
         * Returns the menu container of the menu component.
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   503
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   504
        MenuContainer getParent(MenuComponent menuComp);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   505
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   506
        /**
25764
6333e4aa8a70 8049830: Remove reflection from ScreenMenuBar
pchelko
parents: 25133
diff changeset
   507
         * Sets the menu container of the menu component.
6333e4aa8a70 8049830: Remove reflection from ScreenMenuBar
pchelko
parents: 25133
diff changeset
   508
         */
6333e4aa8a70 8049830: Remove reflection from ScreenMenuBar
pchelko
parents: 25133
diff changeset
   509
        void  setParent(MenuComponent menuComp, MenuContainer menuContainer);
6333e4aa8a70 8049830: Remove reflection from ScreenMenuBar
pchelko
parents: 25133
diff changeset
   510
6333e4aa8a70 8049830: Remove reflection from ScreenMenuBar
pchelko
parents: 25133
diff changeset
   511
        /**
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   512
         * Gets the font used for this menu component.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   513
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   514
        Font getFont_NoClientCode(MenuComponent menuComp);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   515
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   516
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   517
    /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   518
     * An accessor for the EventQueue class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   519
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   520
    public interface EventQueueAccessor {
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   521
        /**
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   522
         * Gets the event dispatch thread.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   523
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   524
        Thread getDispatchThread(EventQueue eventQueue);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   525
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   526
        /**
4365
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   527
         * Checks if the current thread is EDT for the given EQ.
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   528
         */
4ac67034e98b 4913324: Deadlock when using two event queues
art
parents: 3237
diff changeset
   529
        public boolean isDispatchThreadImpl(EventQueue eventQueue);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   530
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   531
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   532
         * Removes any pending events for the specified source object.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   533
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   534
        void removeSourceEvents(EventQueue eventQueue, Object source, boolean removeAllEvents);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   535
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   536
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   537
         * Returns whether an event is pending on any of the separate Queues.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   538
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   539
        boolean noEvents(EventQueue eventQueue);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   540
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   541
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   542
         * Called from PostEventQueue.postEvent to notify that a new event
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   543
         * appeared.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   544
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   545
        void wakeup(EventQueue eventQueue, boolean isShutdown);
16092
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   546
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   547
        /**
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   548
         * Static in EventQueue
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   549
         */
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   550
        void invokeAndWait(Object source, Runnable r)
129d7d8a7399 7192977: Issue in toolkit thread
bagiras
parents: 13656
diff changeset
   551
            throws InterruptedException, InvocationTargetException;
17899
d3a864bdee7d 8015477: Support single threaded AWT/FX mode.
pchelko
parents: 16100
diff changeset
   552
d3a864bdee7d 8015477: Support single threaded AWT/FX mode.
pchelko
parents: 16100
diff changeset
   553
        /**
d3a864bdee7d 8015477: Support single threaded AWT/FX mode.
pchelko
parents: 16100
diff changeset
   554
         * Sets the delegate for the EventQueue used by FX/AWT single threaded mode
d3a864bdee7d 8015477: Support single threaded AWT/FX mode.
pchelko
parents: 16100
diff changeset
   555
         */
25133
a327a33a1e0a 8041990: [macosx] Language specific keys does not work in applets when opened outside the browser
pchelko
parents: 24538
diff changeset
   556
        void setFwDispatcher(EventQueue eventQueue, FwDispatcher dispatcher);
a327a33a1e0a 8041990: [macosx] Language specific keys does not work in applets when opened outside the browser
pchelko
parents: 24538
diff changeset
   557
a327a33a1e0a 8041990: [macosx] Language specific keys does not work in applets when opened outside the browser
pchelko
parents: 24538
diff changeset
   558
        /**
a327a33a1e0a 8041990: [macosx] Language specific keys does not work in applets when opened outside the browser
pchelko
parents: 24538
diff changeset
   559
         * Gets most recent event time in the EventQueue
a327a33a1e0a 8041990: [macosx] Language specific keys does not work in applets when opened outside the browser
pchelko
parents: 24538
diff changeset
   560
         */
a327a33a1e0a 8041990: [macosx] Language specific keys does not work in applets when opened outside the browser
pchelko
parents: 24538
diff changeset
   561
        long getMostRecentEventTime(EventQueue eventQueue);
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   562
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   563
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   564
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   565
     * An accessor for the PopupMenu class
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   566
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   567
    public interface PopupMenuAccessor {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   568
        /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   569
         * Returns whether the popup menu is attached to a tray
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   570
         */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   571
        boolean isTrayIconPopup(PopupMenu popupMenu);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   572
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   573
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   574
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   575
     * An accessor for the FileDialog class
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   576
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   577
    public interface FileDialogAccessor {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   578
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   579
         * Sets the files the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   580
         */
12653
07d5ca30e79e 7124337: [macosx] FileDialog fails to select multiple files
dcherepanov
parents: 12047
diff changeset
   581
        void setFiles(FileDialog fileDialog, File files[]);
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   582
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   583
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   584
         * Sets the file the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   585
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   586
        void setFile(FileDialog fileDialog, String file);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   587
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   588
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   589
         * Sets the directory the user selects
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   590
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   591
        void setDirectory(FileDialog fileDialog, String directory);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   592
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   593
        /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   594
         * Returns whether the file dialog allows the multiple file selection.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   595
         */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   596
        boolean isMultipleMode(FileDialog fileDialog);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   597
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   598
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   599
    /*
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   600
     * An accessor for the ScrollPaneAdjustable class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   601
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   602
    public interface ScrollPaneAdjustableAccessor {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   603
        /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   604
         * Sets the value of this scrollbar to the specified value.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   605
         */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   606
        void setTypedValue(final ScrollPaneAdjustable adj, final int v,
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   607
                           final int type);
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   608
    }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   609
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   610
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   611
     * An accessor for the CheckboxMenuItem class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   612
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   613
    public interface CheckboxMenuItemAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   614
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   615
         * Returns whether menu item is checked
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   616
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   617
        boolean getState(CheckboxMenuItem cmi);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   618
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   619
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   620
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   621
     * An accessor for the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   622
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   623
    public interface CursorAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   624
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   625
         * Returns pData of the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   626
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   627
        long getPData(Cursor cursor);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   628
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   629
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   630
         * Sets pData to the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   631
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   632
        void setPData(Cursor cursor, long pData);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   633
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   634
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   635
         * Return type of the Cursor class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   636
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   637
        int getType(Cursor cursor);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   638
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   639
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   640
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   641
     * An accessor for the MenuBar class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   642
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   643
    public interface MenuBarAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   644
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   645
         * Returns help menu
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   646
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   647
        Menu getHelpMenu(MenuBar menuBar);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   648
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   649
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   650
         * Returns menus
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   651
         */
24538
25bf8153fbfe 8039642: Fix raw and unchecked warnings in sun.awt.*
henryjen
parents: 24523
diff changeset
   652
        Vector<Menu> getMenus(MenuBar menuBar);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   653
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   654
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   655
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   656
     * An accessor for the MenuItem class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   657
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   658
    public interface MenuItemAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   659
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   660
         * Returns whether menu item is enabled
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   661
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   662
        boolean isEnabled(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   663
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   664
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   665
         * Gets the command name of the action event that is fired
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   666
         * by this menu item.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   667
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   668
        String getActionCommandImpl(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   669
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   670
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   671
         * Returns true if the item and all its ancestors are
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   672
         * enabled, false otherwise
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   673
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   674
        boolean isItemEnabled(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   675
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   676
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   677
         * Returns label
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   678
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   679
        String getLabel(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   680
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   681
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   682
         * Returns shortcut
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   683
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   684
        MenuShortcut getShortcut(MenuItem item);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   685
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   686
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   687
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   688
     * An accessor for the Menu class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   689
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   690
    public interface MenuAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   691
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   692
         * Returns vector of the items that are part of the Menu
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   693
         */
24538
25bf8153fbfe 8039642: Fix raw and unchecked warnings in sun.awt.*
henryjen
parents: 24523
diff changeset
   694
        Vector<MenuItem> getItems(Menu menu);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   695
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   696
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   697
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   698
     * An accessor for the KeyEvent class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   699
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   700
    public interface KeyEventAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   701
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   702
         * Sets rawCode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   703
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   704
        void setRawCode(KeyEvent ev, long rawCode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   705
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   706
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   707
         * Sets primaryLevelUnicode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   708
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   709
        void setPrimaryLevelUnicode(KeyEvent ev, long primaryLevelUnicode);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   710
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   711
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   712
         * Sets extendedKeyCode field for KeyEvent
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   713
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   714
        void setExtendedKeyCode(KeyEvent ev, long extendedKeyCode);
14310
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   715
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   716
        /**
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   717
         * Gets original source for KeyEvent
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   718
         */
708173457cc0 8001633: Wrong alt processing during switching between windows.
alexp
parents: 13656
diff changeset
   719
        Component getOriginalSource(KeyEvent ev);
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   720
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   721
        /**
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   722
         * Gets isProxyActive field for KeyEvent
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   723
         */
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   724
        boolean isProxyActive(KeyEvent ev);
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   725
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   726
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   727
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   728
     * An accessor for the ClientPropertyKey class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   729
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   730
    public interface ClientPropertyKeyAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   731
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   732
         * Retrieves JComponent_TRANSFER_HANDLER enum object
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   733
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   734
        Object getJComponent_TRANSFER_HANDLER();
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   735
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   736
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   737
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   738
     * An accessor for the SystemTray class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   739
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   740
    public interface SystemTrayAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   741
        /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   742
         * Support for reporting bound property changes for Object properties.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   743
         */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   744
        void firePropertyChange(SystemTray tray, String propertyName, Object oldValue, Object newValue);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   745
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   746
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   747
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   748
     * An accessor for the TrayIcon class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   749
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   750
    public interface TrayIconAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   751
        void addNotify(TrayIcon trayIcon) throws AWTException;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   752
        void removeNotify(TrayIcon trayIcon);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   753
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   754
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   755
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   756
     * An accessor for the DefaultKeyboardFocusManager class
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   757
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   758
    public interface DefaultKeyboardFocusManagerAccessor {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   759
        public void consumeNextKeyTyped(DefaultKeyboardFocusManager dkfm, KeyEvent e);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   760
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   761
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   762
    /*
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   763
     * An accessor for the SequencedEventAccessor class
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   764
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   765
    public interface SequencedEventAccessor {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   766
        /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   767
         * Returns the nested event.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   768
         */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   769
        AWTEvent getNested(AWTEvent sequencedEvent);
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   770
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   771
        /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   772
         * Returns true if the event is an instances of SequencedEvent.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   773
         */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   774
        boolean isSequencedEvent(AWTEvent event);
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   775
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   776
        /*
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   777
         * Creates SequencedEvent with the given nested event
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   778
         */
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   779
        AWTEvent create(AWTEvent event);
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   780
    }
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   781
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   782
    /*
20147
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   783
     * An accessor for the Toolkit class
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   784
     */
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   785
    public interface ToolkitAccessor {
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   786
        void setPlatformResources(ResourceBundle bundle);
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   787
    }
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   788
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   789
    /*
21246
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   790
     * An accessor object for the InvocationEvent class
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   791
     */
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   792
    public interface InvocationEventAccessor {
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   793
        void dispose(InvocationEvent event);
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   794
    }
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   795
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   796
    /*
23268
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   797
     * An accessor object for the SystemColor class
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   798
     */
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   799
    public interface SystemColorAccessor {
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   800
        void updateSystemColors();
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   801
    }
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   802
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   803
    /*
24523
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   804
     * An accessor object for the AccessibleContext class
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   805
     */
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   806
    public interface AccessibleContextAccessor {
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   807
        void setAppContext(AccessibleContext accessibleContext, AppContext appContext);
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   808
        AppContext getAppContext(AccessibleContext accessibleContext);
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   809
        Object getNativeAXResource(AccessibleContext accessibleContext);
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   810
        void setNativeAXResource(AccessibleContext accessibleContext, Object value);
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   811
    }
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   812
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   813
    /*
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   814
     * An accessor object for the AccessibleContext class
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   815
     */
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   816
    public interface AccessibleBundleAccessor {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   817
        String getKey(AccessibleBundle accessibleBundle);
24523
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   818
    }
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   819
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   820
    /*
30470
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   821
     * An accessor object for the DragSourceContext class
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   822
     */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   823
    public interface DragSourceContextAccessor {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   824
        /**
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   825
         * Returns the peer of the DragSourceContext.
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   826
         */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   827
        DragSourceContextPeer getPeer(DragSourceContext dsc);
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   828
    }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   829
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   830
    /*
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   831
     * An accessor object for the DropTargetContext class
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   832
     */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   833
    public interface DropTargetContextAccessor {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   834
        /**
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   835
         * Resets the DropTargetContext.
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   836
         */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   837
        void reset(DropTargetContext dtc);
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   838
        /**
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   839
         * Sets the {@code DropTargetContextPeer}
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   840
         */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   841
        void setDropTargetContextPeer(DropTargetContext dtc,
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   842
                                      DropTargetContextPeer dtcp);
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   843
    }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   844
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   845
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   846
     * Accessor instances are initialized in the static initializers of
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   847
     * 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
   848
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   849
    private static ComponentAccessor componentAccessor;
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   850
    private static ContainerAccessor containerAccessor;
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   851
    private static WindowAccessor windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   852
    private static AWTEventAccessor awtEventAccessor;
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   853
    private static InputEventAccessor inputEventAccessor;
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   854
    private static FrameAccessor frameAccessor;
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   855
    private static KeyboardFocusManagerAccessor kfmAccessor;
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   856
    private static MenuComponentAccessor menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   857
    private static EventQueueAccessor eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   858
    private static PopupMenuAccessor popupMenuAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   859
    private static FileDialogAccessor fileDialogAccessor;
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
   860
    private static ScrollPaneAdjustableAccessor scrollPaneAdjustableAccessor;
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   861
    private static CheckboxMenuItemAccessor checkboxMenuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   862
    private static CursorAccessor cursorAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   863
    private static MenuBarAccessor menuBarAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   864
    private static MenuItemAccessor menuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   865
    private static MenuAccessor menuAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   866
    private static KeyEventAccessor keyEventAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   867
    private static ClientPropertyKeyAccessor clientPropertyKeyAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   868
    private static SystemTrayAccessor systemTrayAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   869
    private static TrayIconAccessor trayIconAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
   870
    private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
   871
    private static SequencedEventAccessor sequencedEventAccessor;
20147
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
   872
    private static ToolkitAccessor toolkitAccessor;
21246
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
   873
    private static InvocationEventAccessor invocationEventAccessor;
23268
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
   874
    private static SystemColorAccessor systemColorAccessor;
24523
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
   875
    private static AccessibleContextAccessor accessibleContextAccessor;
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
   876
    private static AccessibleBundleAccessor accessibleBundleAccessor;
30470
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   877
    private static DragSourceContextAccessor dragSourceContextAccessor;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
   878
    private static DropTargetContextAccessor dropTargetContextAccessor;
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   879
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
   880
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   881
     * 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
   882
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   883
    public static void setComponentAccessor(ComponentAccessor ca) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   884
        componentAccessor = ca;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   885
    }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   886
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   887
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   888
     * 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
   889
     */
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   890
    public static ComponentAccessor getComponentAccessor() {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   891
        if (componentAccessor == null) {
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   892
            unsafe.ensureClassInitialized(Component.class);
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   893
        }
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   894
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   895
        return componentAccessor;
8b981ce05cd0 6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7
anthony
parents:
diff changeset
   896
    }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   897
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   898
    /*
7241
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   899
     * Set an accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   900
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   901
    public static void setContainerAccessor(ContainerAccessor ca) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   902
        containerAccessor = ca;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   903
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   904
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   905
    /*
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   906
     * Retrieve the accessor object for the java.awt.Container class.
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   907
     */
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   908
    public static ContainerAccessor getContainerAccessor() {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   909
        if (containerAccessor == null) {
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   910
            unsafe.ensureClassInitialized(Container.class);
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   911
        }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   912
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   913
        return containerAccessor;
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   914
    }
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   915
ed85b6040a98 7002856: Provide an accessor for Container.validateUnconditionally()
anthony
parents: 7239
diff changeset
   916
    /*
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   917
     * Set an accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   918
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   919
    public static void setWindowAccessor(WindowAccessor wa) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   920
        windowAccessor = wa;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   921
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   922
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   923
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   924
     * Retrieve the accessor object for the java.awt.Window class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   925
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   926
    public static WindowAccessor getWindowAccessor() {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   927
        if (windowAccessor == null) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   928
            unsafe.ensureClassInitialized(Window.class);
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   929
        }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   930
        return windowAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   931
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   932
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   933
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   934
     * Set an accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   935
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   936
    public static void setAWTEventAccessor(AWTEventAccessor aea) {
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   937
        awtEventAccessor = aea;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   938
    }
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   939
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   940
    /*
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   941
     * Retrieve the accessor object for the java.awt.AWTEvent class.
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   942
     */
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   943
    public static AWTEventAccessor getAWTEventAccessor() {
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   944
        if (awtEventAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   945
            unsafe.ensureClassInitialized(AWTEvent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
   946
        }
2451
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   947
        return awtEventAccessor;
597df8e1d786 6633275: Need to support shaped/translucent windows
art
parents: 1978
diff changeset
   948
    }
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   949
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   950
    /*
6825
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   951
     * Set an accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   952
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   953
    public static void setInputEventAccessor(InputEventAccessor iea) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   954
        inputEventAccessor = iea;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   955
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   956
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   957
    /*
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   958
     * Retrieve the accessor object for the java.awt.event.InputEvent class.
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   959
     */
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   960
    public static InputEventAccessor getInputEventAccessor() {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   961
        if (inputEventAccessor == null) {
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   962
            unsafe.ensureClassInitialized(InputEvent.class);
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   963
        }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   964
        return inputEventAccessor;
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   965
    }
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   966
795e9fe949d3 6989721: awt native code compiler warnings
art
parents: 6634
diff changeset
   967
    /*
2453
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   968
     * 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
   969
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   970
    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
   971
        frameAccessor = fa;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   972
    }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   973
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   974
    /*
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   975
     * 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
   976
     */
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   977
    public static FrameAccessor getFrameAccessor() {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   978
        if (frameAccessor == null) {
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   979
            unsafe.ensureClassInitialized(Frame.class);
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   980
        }
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   981
        return frameAccessor;
35e5fab82613 6724890: Deadlock between AWT-EventQueue-1 and AWT-XAWT threads during IDE start
dcherepanov
parents: 2451
diff changeset
   982
    }
2464
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   983
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   984
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   985
     * Set an accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   986
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   987
    public static void setKeyboardFocusManagerAccessor(KeyboardFocusManagerAccessor kfma) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   988
        kfmAccessor = kfma;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   989
    }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   990
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   991
    /*
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   992
     * Retrieve the accessor object for the java.awt.KeyboardFocusManager class.
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   993
     */
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   994
    public static KeyboardFocusManagerAccessor getKeyboardFocusManagerAccessor() {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   995
        if (kfmAccessor == null) {
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   996
            unsafe.ensureClassInitialized(KeyboardFocusManager.class);
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   997
        }
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   998
        return kfmAccessor;
3c6755bdc55f 6806217: implement synthetic focus model for MS Windows
ant
parents: 2459
diff changeset
   999
    }
3084
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1000
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1001
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1002
     * Set an accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1003
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1004
    public static void setMenuComponentAccessor(MenuComponentAccessor mca) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1005
        menuComponentAccessor = mca;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1006
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1007
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1008
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1009
     * Retrieve the accessor object for the java.awt.MenuComponent class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1010
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1011
    public static MenuComponentAccessor getMenuComponentAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1012
        if (menuComponentAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1013
            unsafe.ensureClassInitialized(MenuComponent.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1014
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1015
        return menuComponentAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1016
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1017
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1018
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1019
     * Set an accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1020
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1021
    public static void setEventQueueAccessor(EventQueueAccessor eqa) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1022
        eventQueueAccessor = eqa;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1023
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1024
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1025
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1026
     * Retrieve the accessor object for the java.awt.EventQueue class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1027
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1028
    public static EventQueueAccessor getEventQueueAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1029
        if (eventQueueAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1030
            unsafe.ensureClassInitialized(EventQueue.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1031
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1032
        return eventQueueAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1033
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1034
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1035
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1036
     * Set an accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1037
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1038
    public static void setPopupMenuAccessor(PopupMenuAccessor pma) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1039
        popupMenuAccessor = pma;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1040
    }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1041
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1042
    /*
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1043
     * Retrieve the accessor object for the java.awt.PopupMenu class.
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1044
     */
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1045
    public static PopupMenuAccessor getPopupMenuAccessor() {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1046
        if (popupMenuAccessor == null) {
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1047
            unsafe.ensureClassInitialized(PopupMenu.class);
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1048
        }
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1049
        return popupMenuAccessor;
67ca55732362 6824169: Need to remove some AWT class dependencies
dcherepanov
parents: 2808
diff changeset
  1050
    }
4913
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1051
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1052
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1053
     * Set an accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1054
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1055
    public static void setFileDialogAccessor(FileDialogAccessor fda) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1056
        fileDialogAccessor = fda;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1057
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1058
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1059
    /*
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1060
     * Retrieve the accessor object for the java.awt.FileDialog class.
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1061
     */
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1062
    public static FileDialogAccessor getFileDialogAccessor() {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1063
        if (fileDialogAccessor == null) {
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1064
            unsafe.ensureClassInitialized(FileDialog.class);
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1065
        }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1066
        return fileDialogAccessor;
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1067
    }
9b3caa50afcf 6705345: Enable multiple file selection in AWT FileDialog
dcherepanov
parents: 4371
diff changeset
  1068
10097
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1069
    /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1070
     * Set an accessor object for the java.awt.ScrollPaneAdjustable class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1071
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1072
    public static void setScrollPaneAdjustableAccessor(ScrollPaneAdjustableAccessor adj) {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1073
        scrollPaneAdjustableAccessor = adj;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1074
    }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1075
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1076
    /*
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1077
     * Retrieve the accessor object for the java.awt.ScrollPaneAdjustable
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1078
     * class.
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1079
     */
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1080
    public static ScrollPaneAdjustableAccessor getScrollPaneAdjustableAccessor() {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1081
        if (scrollPaneAdjustableAccessor == null) {
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1082
            unsafe.ensureClassInitialized(ScrollPaneAdjustable.class);
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1083
        }
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1084
        return scrollPaneAdjustableAccessor;
67449ffe5991 6642728: Use reflection to access ScrollPane's private method from within sun.awt package
serb
parents: 9035
diff changeset
  1085
    }
13604
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1086
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1087
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1088
     * Set an accessor object for the java.awt.CheckboxMenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1089
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1090
    public static void setCheckboxMenuItemAccessor(CheckboxMenuItemAccessor cmia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1091
        checkboxMenuItemAccessor = cmia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1092
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1093
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1094
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1095
     * Retrieve the accessor object for the java.awt.CheckboxMenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1096
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1097
    public static CheckboxMenuItemAccessor getCheckboxMenuItemAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1098
        if (checkboxMenuItemAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1099
            unsafe.ensureClassInitialized(CheckboxMenuItemAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1100
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1101
        return checkboxMenuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1102
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1103
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1104
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1105
     * Set an accessor object for the java.awt.Cursor class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1106
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1107
    public static void setCursorAccessor(CursorAccessor ca) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1108
        cursorAccessor = ca;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1109
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1110
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1111
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1112
     * Retrieve the accessor object for the java.awt.Cursor class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1113
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1114
    public static CursorAccessor getCursorAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1115
        if (cursorAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1116
            unsafe.ensureClassInitialized(CursorAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1117
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1118
        return cursorAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1119
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1120
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1121
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1122
     * Set an accessor object for the java.awt.MenuBar class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1123
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1124
    public static void setMenuBarAccessor(MenuBarAccessor mba) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1125
        menuBarAccessor = mba;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1126
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1127
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1128
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1129
     * Retrieve the accessor object for the java.awt.MenuBar class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1130
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1131
    public static MenuBarAccessor getMenuBarAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1132
        if (menuBarAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1133
            unsafe.ensureClassInitialized(MenuBarAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1134
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1135
        return menuBarAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1136
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1137
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1138
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1139
     * Set an accessor object for the java.awt.MenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1140
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1141
    public static void setMenuItemAccessor(MenuItemAccessor mia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1142
        menuItemAccessor = mia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1143
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1144
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1145
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1146
     * Retrieve the accessor object for the java.awt.MenuItem class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1147
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1148
    public static MenuItemAccessor getMenuItemAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1149
        if (menuItemAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1150
            unsafe.ensureClassInitialized(MenuItemAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1151
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1152
        return menuItemAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1153
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1154
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1155
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1156
     * Set an accessor object for the java.awt.Menu class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1157
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1158
    public static void setMenuAccessor(MenuAccessor ma) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1159
        menuAccessor = ma;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1160
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1161
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1162
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1163
     * Retrieve the accessor object for the java.awt.Menu class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1164
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1165
    public static MenuAccessor getMenuAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1166
        if (menuAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1167
            unsafe.ensureClassInitialized(MenuAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1168
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1169
        return menuAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1170
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1171
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1172
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1173
     * Set an accessor object for the java.awt.event.KeyEvent class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1174
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1175
    public static void setKeyEventAccessor(KeyEventAccessor kea) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1176
        keyEventAccessor = kea;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1177
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1178
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1179
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1180
     * Retrieve the accessor object for the java.awt.event.KeyEvent class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1181
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1182
    public static KeyEventAccessor getKeyEventAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1183
        if (keyEventAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1184
            unsafe.ensureClassInitialized(KeyEventAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1185
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1186
        return keyEventAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1187
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1188
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1189
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1190
     * Set an accessor object for the javax.swing.ClientPropertyKey class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1191
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1192
    public static void setClientPropertyKeyAccessor(ClientPropertyKeyAccessor cpka) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1193
        clientPropertyKeyAccessor = cpka;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1194
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1195
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1196
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1197
     * Retrieve the accessor object for the javax.swing.ClientPropertyKey class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1198
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1199
    public static ClientPropertyKeyAccessor getClientPropertyKeyAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1200
        if (clientPropertyKeyAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1201
            unsafe.ensureClassInitialized(ClientPropertyKeyAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1202
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1203
        return clientPropertyKeyAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1204
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1205
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1206
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1207
     * Set an accessor object for the java.awt.SystemTray class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1208
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1209
    public static void setSystemTrayAccessor(SystemTrayAccessor sta) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1210
        systemTrayAccessor = sta;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1211
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1212
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1213
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1214
     * Retrieve the accessor object for the java.awt.SystemTray class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1215
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1216
    public static SystemTrayAccessor getSystemTrayAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1217
        if (systemTrayAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1218
            unsafe.ensureClassInitialized(SystemTrayAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1219
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1220
        return systemTrayAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1221
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1222
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1223
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1224
     * Set an accessor object for the java.awt.TrayIcon class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1225
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1226
    public static void setTrayIconAccessor(TrayIconAccessor tia) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1227
        trayIconAccessor = tia;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1228
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1229
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1230
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1231
     * Retrieve the accessor object for the java.awt.TrayIcon class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1232
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1233
    public static TrayIconAccessor getTrayIconAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1234
        if (trayIconAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1235
            unsafe.ensureClassInitialized(TrayIconAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1236
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1237
        return trayIconAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1238
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1239
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1240
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1241
     * Set an accessor object for the java.awt.DefaultKeyboardFocusManager class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1242
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1243
    public static void setDefaultKeyboardFocusManagerAccessor(DefaultKeyboardFocusManagerAccessor dkfma) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1244
        defaultKeyboardFocusManagerAccessor = dkfma;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1245
    }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1246
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1247
    /**
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1248
     * Retrieve the accessor object for the java.awt.DefaultKeyboardFocusManager class.
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1249
     */
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1250
    public static DefaultKeyboardFocusManagerAccessor getDefaultKeyboardFocusManagerAccessor() {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1251
        if (defaultKeyboardFocusManagerAccessor == null) {
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1252
            unsafe.ensureClassInitialized(DefaultKeyboardFocusManagerAccessor.class);
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1253
        }
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1254
        return defaultKeyboardFocusManagerAccessor;
31089af1a447 7163201: Simplify toolkit internals references
bagiras
parents: 12653
diff changeset
  1255
    }
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1256
    /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1257
     * Set an accessor object for the java.awt.SequencedEvent class.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1258
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1259
    public static void setSequencedEventAccessor(SequencedEventAccessor sea) {
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1260
        sequencedEventAccessor = sea;
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1261
    }
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1262
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1263
    /*
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1264
     * Get the accessor object for the java.awt.SequencedEvent class.
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1265
     */
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1266
    public static SequencedEventAccessor getSequencedEventAccessor() {
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1267
        if (sequencedEventAccessor == null) {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1268
            try {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1269
                unsafe.ensureClassInitialized(
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1270
                        Class.forName("java.awt.SequencedEvent"));
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1271
            } catch (ClassNotFoundException ignore) {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1272
            }
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1273
        }
13652
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1274
        return sequencedEventAccessor;
42544e68dc39 6981400: Tabbing between textfield do not work properly when ALT+TAB
ant
parents: 12653
diff changeset
  1275
    }
20147
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1276
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1277
    /*
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1278
     * Set an accessor object for the java.awt.Toolkit class.
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1279
     */
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1280
    public static void setToolkitAccessor(ToolkitAccessor ta) {
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1281
        toolkitAccessor = ta;
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1282
    }
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1283
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1284
    /*
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1285
     * Get the accessor object for the java.awt.Toolkit class.
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1286
     */
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1287
    public static ToolkitAccessor getToolkitAccessor() {
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1288
        if (toolkitAccessor == null) {
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1289
            unsafe.ensureClassInitialized(Toolkit.class);
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1290
        }
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1291
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1292
        return toolkitAccessor;
78e51d8fcb92 7129133: [macosx] Accelerators are displayed as Meta instead of the Command symbol
leonidr
parents: 20097
diff changeset
  1293
    }
21246
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1294
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1295
    /*
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1296
     * Get the accessor object for the java.awt.event.InvocationEvent class.
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1297
     */
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1298
    public static void setInvocationEventAccessor(InvocationEventAccessor invocationEventAccessor) {
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1299
        AWTAccessor.invocationEventAccessor = invocationEventAccessor;
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1300
    }
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1301
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1302
    /*
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1303
     * Set the accessor object for the java.awt.event.InvocationEvent class.
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1304
     */
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1305
    public static InvocationEventAccessor getInvocationEventAccessor() {
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1306
        return invocationEventAccessor;
9d1752954b0e 8025588: [macosx] Frozen AppKit thread in 7u40
pchelko
parents: 20165
diff changeset
  1307
    }
23268
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1308
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1309
    /*
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1310
     * Get the accessor object for the java.awt.SystemColor class.
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1311
     */
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1312
    public static SystemColorAccessor getSystemColorAccessor() {
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1313
        if (systemColorAccessor == null) {
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1314
            unsafe.ensureClassInitialized(SystemColor.class);
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1315
        }
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1316
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1317
        return systemColorAccessor;
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1318
    }
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1319
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1320
     /*
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1321
     * Set the accessor object for the java.awt.SystemColor class.
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1322
     */
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1323
     public static void setSystemColorAccessor(SystemColorAccessor systemColorAccessor) {
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1324
         AWTAccessor.systemColorAccessor = systemColorAccessor;
2cdb715ff32d 8029868: Fix KSS issues in sun.lwawt.macosx
pchelko
parents: 21246
diff changeset
  1325
     }
24523
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1326
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1327
    /*
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1328
     * Get the accessor object for the javax.accessibility.AccessibleContext class.
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1329
     */
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1330
    public static AccessibleContextAccessor getAccessibleContextAccessor() {
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1331
        if (accessibleContextAccessor == null) {
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1332
            unsafe.ensureClassInitialized(AccessibleContext.class);
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1333
        }
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1334
        return accessibleContextAccessor;
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1335
    }
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1336
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1337
   /*
40719
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1338
    * Set the accessor object for the javax.accessibility.AccessibleBundle class.
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1339
    */
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1340
    public static void setAccessibleBundleAccessor(AccessibleBundleAccessor accessor) {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1341
        AWTAccessor.accessibleBundleAccessor = accessor;
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1342
    }
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1343
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1344
    /*
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1345
     * Get the accessor object for the javax.accessibility.AccessibleBundle class.
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1346
     */
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1347
    public static AccessibleBundleAccessor getAccessibleBundleAccessor() {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1348
        if (accessibleBundleAccessor == null) {
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1349
            unsafe.ensureClassInitialized(AccessibleBundle.class);
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1350
        }
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1351
        return accessibleBundleAccessor;
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1352
    }
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1353
4ae72a69bd3b 8129854: Remove reflection from AWT/Swing classes
alexsch
parents: 37694
diff changeset
  1354
   /*
24523
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1355
    * Set the accessor object for the javax.accessibility.AccessibleContext class.
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1356
    */
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1357
    public static void setAccessibleContextAccessor(AccessibleContextAccessor accessor) {
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1358
        AWTAccessor.accessibleContextAccessor = accessor;
d3d9e027b190 8037477: Reproducible hang of JAWS and webstart application with JAB 2.0.4
pchelko
parents: 24147
diff changeset
  1359
    }
30470
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1360
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1361
    /*
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1362
     * Get the accessor object for the java.awt.dnd.DragSourceContext class.
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1363
     */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1364
    public static DragSourceContextAccessor getDragSourceContextAccessor() {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1365
        if (dragSourceContextAccessor == null) {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1366
            unsafe.ensureClassInitialized(DragSourceContext.class);
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1367
        }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1368
        return dragSourceContextAccessor;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1369
    }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1370
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1371
    /*
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1372
     * Set the accessor object for the java.awt.dnd.DragSourceContext class.
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1373
     */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1374
    public static void setDragSourceContextAccessor(DragSourceContextAccessor accessor) {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1375
        AWTAccessor.dragSourceContextAccessor = accessor;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1376
    }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1377
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1378
    /*
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1379
     * Get the accessor object for the java.awt.dnd.DropTargetContext class.
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1380
     */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1381
    public static DropTargetContextAccessor getDropTargetContextAccessor() {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1382
        if (dropTargetContextAccessor == null) {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1383
            unsafe.ensureClassInitialized(DropTargetContext.class);
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1384
        }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1385
        return dropTargetContextAccessor;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1386
    }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1387
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1388
    /*
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1389
     * Set the accessor object for the java.awt.dnd.DropTargetContext class.
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1390
     */
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1391
    public static void setDropTargetContextAccessor(DropTargetContextAccessor accessor) {
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1392
        AWTAccessor.dropTargetContextAccessor = accessor;
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1393
    }
bd197b8eda21 8074763: Remove API references to java.awt.dnd.peer
serb
parents: 30469
diff changeset
  1394
41805
d30817604de5 8154434: Open the request focus methods of the java.awt.Component which accept FocusEvent.Cause
ssadetsky
parents: 40719
diff changeset
  1395
}