author | serb |
Wed, 18 Apr 2018 14:07:41 -0700 | |
changeset 49998 | 9070717a16a1 |
parent 47216 | 71c04702a3d5 |
child 52252 | de9486d74a74 |
permissions | -rw-r--r-- |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1 |
/* |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
2 |
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
4 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
10 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
15 |
* accompanied this code). |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
16 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
20 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
23 |
* questions. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
24 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
25 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
26 |
package com.sun.java.accessibility.util; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
27 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
28 |
import java.awt.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
29 |
import java.awt.event.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
30 |
import javax.swing.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
31 |
import javax.swing.event.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
32 |
import sun.awt.AWTPermissions; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
33 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
34 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
35 |
* <P>The {@code AWTEventMonitor} implements a suite of listeners that are |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
36 |
* conditionally installed on every AWT component instance in the Java |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
37 |
* Virtual Machine. The events captured by these listeners are made |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
38 |
* available through a unified set of listeners supported by {@code AWTEventMonitor}. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
39 |
* With this, all the individual events on each of the AWT component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
40 |
* instances are funneled into one set of listeners broken down by category |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
41 |
* (see {@link EventID} for the categories). |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
42 |
* <p>This class depends upon {@link EventQueueMonitor}, which provides the base |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
43 |
* level support for capturing the top-level containers as they are created. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
44 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
45 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
46 |
public class AWTEventMonitor { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
47 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
48 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
49 |
* The current component with keyboard focus. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
50 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
51 |
* @see #getComponentWithFocus |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
52 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
53 |
* @deprecated This field is unused; to get the component with focus use the |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
54 |
* getComponentWithFocus method. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
55 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
56 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
57 |
static protected Component componentWithFocus = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
58 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
59 |
static private Component componentWithFocus_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
60 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
61 |
// Low-level listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
62 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
63 |
* The current list of registered ComponentListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
64 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
65 |
* @see #addComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
66 |
* @see #removeComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
67 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
68 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
69 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
70 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
71 |
static protected ComponentListener componentListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
72 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
73 |
static private ComponentListener componentListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
74 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
75 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
76 |
* The current list of registered ContainerListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
77 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
78 |
* @see #addContainerListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
79 |
* @see #removeContainerListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
80 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
81 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
82 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
83 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
84 |
static protected ContainerListener containerListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
85 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
86 |
static private ContainerListener containerListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
87 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
88 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
89 |
* The current list of registered FocusListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
90 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
91 |
* @see #addFocusListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
92 |
* @see #removeFocusListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
93 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
94 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
95 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
96 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
97 |
static protected FocusListener focusListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
98 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
99 |
static private FocusListener focusListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
100 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
101 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
102 |
* The current list of registered KeyListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
103 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
104 |
* @see #addKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
105 |
* @see #removeKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
106 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
107 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
108 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
109 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
110 |
static protected KeyListener keyListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
111 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
112 |
static private KeyListener keyListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
113 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
114 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
115 |
* The current list of registered MouseListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
116 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
117 |
* @see #addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
118 |
* @see #removeMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
119 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
120 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
121 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
122 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
123 |
static protected MouseListener mouseListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
124 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
125 |
static private MouseListener mouseListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
126 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
127 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
128 |
* The current list of registered MouseMotionListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
129 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
130 |
* @see #addMouseMotionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
131 |
* @see #removeMouseMotionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
132 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
133 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
134 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
135 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
136 |
static protected MouseMotionListener mouseMotionListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
137 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
138 |
static private MouseMotionListener mouseMotionListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
139 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
140 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
141 |
* The current list of registered WindowListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
142 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
143 |
* @see #addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
144 |
* @see #removeWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
145 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
146 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
147 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
148 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
149 |
static protected WindowListener windowListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
150 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
151 |
static private WindowListener windowListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
152 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
153 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
154 |
// Semantic listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
155 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
156 |
* The current list of registered ActionListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
157 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
158 |
* @see #addActionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
159 |
* @see #removeActionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
160 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
161 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
162 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
163 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
164 |
static protected ActionListener actionListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
165 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
166 |
static private ActionListener actionListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
167 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
168 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
169 |
* The current list of registered AdjustmentListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
170 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
171 |
* @see #addAdjustmentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
172 |
* @see #removeAdjustmentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
173 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
174 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
175 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
176 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
177 |
static protected AdjustmentListener adjustmentListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
178 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
179 |
static private AdjustmentListener adjustmentListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
180 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
181 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
182 |
* The current list of registered ItemListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
183 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
184 |
* @see #addItemListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
185 |
* @see #removeItemListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
186 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
187 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
188 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
189 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
190 |
static protected ItemListener itemListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
191 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
192 |
static private ItemListener itemListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
193 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
194 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
195 |
* The current list of registered TextListener classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
196 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
197 |
* @see #addTextListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
198 |
* @see #removeTextListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
199 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
200 |
* @deprecated This field is unused. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
201 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
202 |
@Deprecated(since="8", forRemoval=true) |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
203 |
static protected TextListener textListener = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
204 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
205 |
static private TextListener textListener_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
206 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
207 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
208 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
209 |
* The actual listener that is installed on the component instances. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
210 |
* This listener calls the other registered listeners when an event |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
211 |
* occurs. By doing things this way, the actual number of listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
212 |
* installed on a component instance is drastically reduced. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
213 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
214 |
static private final AWTEventsListener awtListener = new AWTEventsListener(); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
215 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
216 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
217 |
* Returns the component that currently has keyboard focus. The return |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
218 |
* value can be null. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
219 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
220 |
* @return the component that has keyboard focus |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
221 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
222 |
static public Component getComponentWithFocus() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
223 |
return componentWithFocus_private; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
224 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
225 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
226 |
/* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
227 |
* Check permissions |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
228 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
229 |
static private void checkInstallPermission() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
230 |
SecurityManager security = System.getSecurityManager(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
231 |
if (security != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
232 |
security.checkPermission(AWTPermissions.ALL_AWT_EVENTS_PERMISSION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
233 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
234 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
235 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
236 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
237 |
* Adds the specified listener to receive all {@link EventID#COMPONENT COMPONENT} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
238 |
* events on each component instance in the Java Virtual Machine as they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
239 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
240 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
241 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
242 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
243 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
244 |
* @see #removeComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
245 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
246 |
static public void addComponentListener(ComponentListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
247 |
if (componentListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
248 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
249 |
awtListener.installListeners(EventID.COMPONENT); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
250 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
251 |
componentListener_private = AWTEventMulticaster.add(componentListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
252 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
253 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
254 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
255 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
256 |
* {@link EventID#COMPONENT COMPONENT} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
257 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
258 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
259 |
* @see #addComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
260 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
261 |
static public void removeComponentListener(ComponentListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
262 |
componentListener_private = AWTEventMulticaster.remove(componentListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
263 |
if (componentListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
264 |
awtListener.removeListeners(EventID.COMPONENT); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
265 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
266 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
267 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
268 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
269 |
* Adds the specified listener to receive all {@link EventID#CONTAINER CONTAINER} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
270 |
* events on each component instance in the Java Virtual Machine as they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
271 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
272 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
273 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
274 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
275 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
276 |
* @see #removeContainerListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
277 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
278 |
static public void addContainerListener(ContainerListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
279 |
containerListener_private = AWTEventMulticaster.add(containerListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
280 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
281 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
282 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
283 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
284 |
* {@link EventID#CONTAINER CONTAINER} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
285 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
286 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
287 |
* @see #addContainerListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
288 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
289 |
static public void removeContainerListener(ContainerListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
290 |
containerListener_private = AWTEventMulticaster.remove(containerListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
291 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
292 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
293 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
294 |
* Adds the specified listener to receive all {@link EventID#FOCUS FOCUS} events |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
295 |
* on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
296 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
297 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
298 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
299 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
300 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
301 |
* @see #removeFocusListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
302 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
303 |
static public void addFocusListener(FocusListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
304 |
focusListener_private = AWTEventMulticaster.add(focusListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
305 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
306 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
307 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
308 |
* Removes the specified listener so it no longer receives {@link EventID#FOCUS FOCUS} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
309 |
* events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
310 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
311 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
312 |
* @see #addFocusListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
313 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
314 |
static public void removeFocusListener(FocusListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
315 |
focusListener_private = AWTEventMulticaster.remove(focusListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
316 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
317 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
318 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
319 |
* Adds the specified listener to receive all {@link EventID#KEY KEY} events on each |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
320 |
* component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
321 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
322 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
323 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
324 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
325 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
326 |
* @see #removeKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
327 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
328 |
static public void addKeyListener(KeyListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
329 |
if (keyListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
330 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
331 |
awtListener.installListeners(EventID.KEY); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
332 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
333 |
keyListener_private = AWTEventMulticaster.add(keyListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
334 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
335 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
336 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
337 |
* Removes the specified listener so it no longer receives {@link EventID#KEY KEY} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
338 |
* events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
339 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
340 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
341 |
* @see #addKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
342 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
343 |
static public void removeKeyListener(KeyListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
344 |
keyListener_private = AWTEventMulticaster.remove(keyListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
345 |
if (keyListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
346 |
awtListener.removeListeners(EventID.KEY); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
347 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
348 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
349 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
350 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
351 |
* Adds the specified listener to receive all {@link EventID#MOUSE MOUSE} events |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
352 |
* on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
353 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
354 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
355 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
356 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
357 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
358 |
* @see #removeMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
359 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
360 |
static public void addMouseListener(MouseListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
361 |
if (mouseListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
362 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
363 |
awtListener.installListeners(EventID.MOUSE); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
364 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
365 |
mouseListener_private = AWTEventMulticaster.add(mouseListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
366 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
367 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
368 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
369 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
370 |
* {@link EventID#MOUSE MOUSE} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
371 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
372 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
373 |
* @see #addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
374 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
375 |
static public void removeMouseListener(MouseListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
376 |
mouseListener_private = AWTEventMulticaster.remove(mouseListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
377 |
if (mouseListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
378 |
awtListener.removeListeners(EventID.MOUSE); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
379 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
380 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
381 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
382 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
383 |
* Adds the specified listener to receive all mouse {@link EventID#MOTION MOTION} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
384 |
* events on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
385 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
386 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
387 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
388 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
389 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
390 |
* @see #removeMouseMotionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
391 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
392 |
static public void addMouseMotionListener(MouseMotionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
393 |
if (mouseMotionListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
394 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
395 |
awtListener.installListeners(EventID.MOTION); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
396 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
397 |
mouseMotionListener_private = AWTEventMulticaster.add(mouseMotionListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
398 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
399 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
400 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
401 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
402 |
* {@link EventID#MOTION MOTION} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
403 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
404 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
405 |
* @see #addMouseMotionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
406 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
407 |
static public void removeMouseMotionListener(MouseMotionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
408 |
mouseMotionListener_private = AWTEventMulticaster.remove(mouseMotionListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
409 |
if (mouseMotionListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
410 |
awtListener.removeListeners(EventID.MOTION); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
411 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
412 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
413 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
414 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
415 |
* Adds the specified listener to receive all {@link EventID#WINDOW WINDOW} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
416 |
* events on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
417 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
418 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
419 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
420 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
421 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
422 |
* @see #removeWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
423 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
424 |
static public void addWindowListener(WindowListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
425 |
if (windowListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
426 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
427 |
awtListener.installListeners(EventID.WINDOW); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
428 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
429 |
windowListener_private = AWTEventMulticaster.add(windowListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
430 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
431 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
432 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
433 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
434 |
* {@link EventID#WINDOW WINDOW} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
435 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
436 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
437 |
* @see #addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
438 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
439 |
static public void removeWindowListener(WindowListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
440 |
windowListener_private = AWTEventMulticaster.remove(windowListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
441 |
if (windowListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
442 |
awtListener.removeListeners(EventID.WINDOW); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
443 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
444 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
445 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
446 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
447 |
* Adds the specified listener to receive all {@link EventID#ACTION ACTION} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
448 |
* events on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
449 |
* <P>Note: This listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
450 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
451 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
452 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
453 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
454 |
* @see #removeActionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
455 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
456 |
static public void addActionListener(ActionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
457 |
if (actionListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
458 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
459 |
awtListener.installListeners(EventID.ACTION); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
460 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
461 |
actionListener_private = AWTEventMulticaster.add(actionListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
462 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
463 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
464 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
465 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
466 |
* {@link EventID#ACTION ACTION} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
467 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
468 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
469 |
* @see #addActionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
470 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
471 |
static public void removeActionListener(ActionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
472 |
actionListener_private = AWTEventMulticaster.remove(actionListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
473 |
if (actionListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
474 |
awtListener.removeListeners(EventID.ACTION); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
475 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
476 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
477 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
478 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
479 |
* Adds the specified listener to receive all |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
480 |
* {@link EventID#ADJUSTMENT ADJUSTMENT} events on each component instance |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
481 |
* in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
482 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
483 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
484 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
485 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
486 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
487 |
* @see #removeAdjustmentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
488 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
489 |
static public void addAdjustmentListener(AdjustmentListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
490 |
if (adjustmentListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
491 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
492 |
awtListener.installListeners(EventID.ADJUSTMENT); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
493 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
494 |
adjustmentListener_private = AWTEventMulticaster.add(adjustmentListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
495 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
496 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
497 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
498 |
* Removes the specified listener so it no longer receives |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
499 |
* {@link EventID#ADJUSTMENT ADJUSTMENT} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
500 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
501 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
502 |
* @see #addAdjustmentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
503 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
504 |
static public void removeAdjustmentListener(AdjustmentListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
505 |
adjustmentListener_private = AWTEventMulticaster.remove(adjustmentListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
506 |
if (adjustmentListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
507 |
awtListener.removeListeners(EventID.ADJUSTMENT); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
508 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
509 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
510 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
511 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
512 |
* Adds the specified listener to receive all {@link EventID#ITEM ITEM} events |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
513 |
* on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
514 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
515 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
516 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
517 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
518 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
519 |
* @see #removeItemListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
520 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
521 |
static public void addItemListener(ItemListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
522 |
if (itemListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
523 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
524 |
awtListener.installListeners(EventID.ITEM); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
525 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
526 |
itemListener_private = AWTEventMulticaster.add(itemListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
527 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
528 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
529 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
530 |
* Removes the specified listener so it no longer receives {@link EventID#ITEM ITEM} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
531 |
* events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
532 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
533 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
534 |
* @see #addItemListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
535 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
536 |
static public void removeItemListener(ItemListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
537 |
itemListener_private = AWTEventMulticaster.remove(itemListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
538 |
if (itemListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
539 |
awtListener.removeListeners(EventID.ITEM); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
540 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
541 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
542 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
543 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
544 |
* Adds the specified listener to receive all {@link EventID#TEXT TEXT} events |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
545 |
* on each component instance in the Java Virtual Machine when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
546 |
* <P>Note: this listener is automatically added to all component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
547 |
* instances created after this method is called. In addition, it |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
548 |
* is only added to component instances that support this listener type. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
549 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
550 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
551 |
* @see #removeTextListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
552 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
553 |
static public void addTextListener(TextListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
554 |
if (textListener_private == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
555 |
checkInstallPermission(); |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
556 |
awtListener.installListeners(EventID.TEXT); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
557 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
558 |
textListener_private = AWTEventMulticaster.add(textListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
559 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
560 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
561 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
562 |
* Removes the specified listener so it no longer receives {@link EventID#TEXT TEXT} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
563 |
* events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
564 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
565 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
566 |
* @see #addTextListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
567 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
568 |
static public void removeTextListener(TextListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
569 |
textListener_private = AWTEventMulticaster.remove(textListener_private, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
570 |
if (textListener_private == null) { |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
571 |
awtListener.removeListeners(EventID.TEXT); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
572 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
573 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
574 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
575 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
576 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
577 |
* AWTEventsListener is the class that does all the work for AWTEventMonitor. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
578 |
* It is not intended for use by any other class except AWTEventMonitor. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
579 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
580 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
581 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
582 |
static class AWTEventsListener implements TopLevelWindowListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
583 |
ActionListener, AdjustmentListener, ComponentListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
584 |
ContainerListener, FocusListener, ItemListener, KeyListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
585 |
MouseListener, MouseMotionListener, TextListener, WindowListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
586 |
ChangeListener { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
587 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
588 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
589 |
* internal variables for Action introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
590 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
591 |
private java.lang.Class<?>[] actionListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
592 |
private java.lang.reflect.Method removeActionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
593 |
private java.lang.reflect.Method addActionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
594 |
private java.lang.Object[] actionArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
595 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
596 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
597 |
* internal variables for Item introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
598 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
599 |
private java.lang.Class<?>[] itemListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
600 |
private java.lang.reflect.Method removeItemMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
601 |
private java.lang.reflect.Method addItemMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
602 |
private java.lang.Object[] itemArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
603 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
604 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
605 |
* internal variables for Text introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
606 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
607 |
private java.lang.Class<?>[] textListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
608 |
private java.lang.reflect.Method removeTextMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
609 |
private java.lang.reflect.Method addTextMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
610 |
private java.lang.Object[] textArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
611 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
612 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
613 |
* internal variables for Window introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
614 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
615 |
private java.lang.Class<?>[] windowListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
616 |
private java.lang.reflect.Method removeWindowMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
617 |
private java.lang.reflect.Method addWindowMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
618 |
private java.lang.Object[] windowArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
619 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
620 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
621 |
* Create a new instance of this class and install it on each component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
622 |
* instance in the virtual machine that supports any of the currently |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
623 |
* registered listeners in AWTEventMonitor. Also registers itself |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
624 |
* as a TopLevelWindowListener with EventQueueMonitor so it can |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
625 |
* automatically add new listeners to new components. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
626 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
627 |
* @see EventQueueMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
628 |
* @see AWTEventMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
629 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
630 |
public AWTEventsListener() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
631 |
initializeIntrospection(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
632 |
installListeners(); |
34811
ae6bf12ff343
8071334: Investigate JAB changes required to support the version string change
ptbrunet
parents:
29883
diff
changeset
|
633 |
MenuSelectionManager.defaultManager().addChangeListener(this); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
634 |
EventQueueMonitor.addTopLevelWindowListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
635 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
636 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
637 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
638 |
* Set up all of the variables needed for introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
639 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
640 |
private boolean initializeIntrospection() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
641 |
actionListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
642 |
actionArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
643 |
actionListeners[0] = java.awt.event.ActionListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
644 |
actionArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
645 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
646 |
itemListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
647 |
itemArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
648 |
itemListeners[0] = java.awt.event.ItemListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
649 |
itemArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
650 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
651 |
textListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
652 |
textArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
653 |
textListeners[0] = java.awt.event.TextListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
654 |
textArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
655 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
656 |
windowListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
657 |
windowArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
658 |
windowListeners[0] = java.awt.event.WindowListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
659 |
windowArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
660 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
661 |
return true; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
662 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
663 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
664 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
665 |
* Installs all currently registered listeners on all components based |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
666 |
* upon the current topLevelWindows cached by EventQueueMonitor. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
667 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
668 |
* @see EventQueueMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
669 |
* @see AWTEventMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
670 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
671 |
protected void installListeners() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
672 |
Window topLevelWindows[] = EventQueueMonitor.getTopLevelWindows(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
673 |
if (topLevelWindows != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
674 |
for (int i = 0; i < topLevelWindows.length; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
675 |
installListeners(topLevelWindows[i]); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
676 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
677 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
678 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
679 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
680 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
681 |
* Installs listeners for the given event ID on all components based |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
682 |
* upon the current topLevelWindows cached by EventQueueMonitor. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
683 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
684 |
* @param eventID the event ID |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
685 |
* @see EventID |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
686 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
687 |
protected void installListeners(int eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
688 |
Window topLevelWindows[] = EventQueueMonitor.getTopLevelWindows(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
689 |
if (topLevelWindows != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
690 |
for (int i = 0; i < topLevelWindows.length; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
691 |
installListeners(topLevelWindows[i], eventID); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
692 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
693 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
694 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
695 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
696 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
697 |
* Installs all currently registered listeners to just the component. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
698 |
* @param c the component to add listeners to |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
699 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
700 |
protected void installListeners(Component c) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
701 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
702 |
// Container and focus listeners are always installed for our own use. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
703 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
704 |
installListeners(c,EventID.CONTAINER); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
705 |
installListeners(c,EventID.FOCUS); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
706 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
707 |
// conditionally install low-level listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
708 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
709 |
if (AWTEventMonitor.componentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
710 |
installListeners(c,EventID.COMPONENT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
711 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
712 |
if (AWTEventMonitor.keyListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
713 |
installListeners(c,EventID.KEY); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
714 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
715 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
716 |
installListeners(c,EventID.MOUSE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
717 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
718 |
if (AWTEventMonitor.mouseMotionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
719 |
installListeners(c,EventID.MOTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
720 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
721 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
722 |
installListeners(c,EventID.WINDOW); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
723 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
724 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
725 |
// conditionally install Semantic listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
726 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
727 |
if (AWTEventMonitor.actionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
728 |
installListeners(c,EventID.ACTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
729 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
730 |
if (AWTEventMonitor.adjustmentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
731 |
installListeners(c,EventID.ADJUSTMENT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
732 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
733 |
if (AWTEventMonitor.itemListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
734 |
installListeners(c,EventID.ITEM); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
735 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
736 |
if (AWTEventMonitor.textListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
737 |
installListeners(c,EventID.TEXT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
738 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
739 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
740 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
741 |
public void stateChanged(ChangeEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
742 |
processFocusGained(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
743 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
744 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
745 |
private void processFocusGained() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
746 |
Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
747 |
if (focusOwner == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
748 |
return; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
749 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
750 |
MenuSelectionManager.defaultManager().removeChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
751 |
MenuSelectionManager.defaultManager().addChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
752 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
753 |
// Only menus and popup selections are handled by the JRootPane. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
754 |
if (focusOwner instanceof JRootPane) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
755 |
MenuElement [] path = |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
756 |
MenuSelectionManager.defaultManager().getSelectedPath(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
757 |
if (path.length > 1) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
758 |
Component penult = path[path.length-2].getComponent(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
759 |
Component last = path[path.length-1].getComponent(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
760 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
761 |
if (last instanceof JPopupMenu || |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
762 |
last instanceof JMenu) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
763 |
// This is a popup with nothing in the popup |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
764 |
// selected. The menu itself is selected. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
765 |
componentWithFocus_private = last; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
766 |
} else if (penult instanceof JPopupMenu) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
767 |
// This is a popup with an item selected |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
768 |
componentWithFocus_private = penult; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
769 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
770 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
771 |
} else { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
772 |
// The focus owner has the selection. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
773 |
componentWithFocus_private = focusOwner; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
774 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
775 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
776 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
777 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
778 |
* Installs the given listener on the component and any of its children. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
779 |
* As a precaution, it always attempts to remove itself as a listener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
780 |
* first so it's always guaranteed to have installed itself just once. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
781 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
782 |
* @param c the component to add listeners to |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
783 |
* @param eventID the eventID to add listeners for |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
784 |
* @see EventID |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
785 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
786 |
protected void installListeners(Component c, int eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
787 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
788 |
// install the appropriate listener hook into this component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
789 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
790 |
switch (eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
791 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
792 |
case EventID.ACTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
793 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
794 |
removeActionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
795 |
"removeActionListener", actionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
796 |
addActionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
797 |
"addActionListener", actionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
798 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
799 |
removeActionMethod.invoke(c, actionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
800 |
addActionMethod.invoke(c, actionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
801 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
802 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
803 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
804 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
805 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
806 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
807 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
808 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
809 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
810 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
811 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
812 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
813 |
case EventID.ADJUSTMENT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
814 |
if (c instanceof Adjustable) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
815 |
((Adjustable) c).removeAdjustmentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
816 |
((Adjustable) c).addAdjustmentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
817 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
818 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
819 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
820 |
case EventID.COMPONENT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
821 |
c.removeComponentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
822 |
c.addComponentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
823 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
824 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
825 |
case EventID.CONTAINER: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
826 |
if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
827 |
((Container) c).removeContainerListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
828 |
((Container) c).addContainerListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
829 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
830 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
831 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
832 |
case EventID.FOCUS: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
833 |
c.removeFocusListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
834 |
c.addFocusListener(this); |
34811
ae6bf12ff343
8071334: Investigate JAB changes required to support the version string change
ptbrunet
parents:
29883
diff
changeset
|
835 |
processFocusGained(); |
29883
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
836 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
837 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
838 |
case EventID.ITEM: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
839 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
840 |
removeItemMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
841 |
"removeItemListener", itemListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
842 |
addItemMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
843 |
"addItemListener", itemListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
844 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
845 |
removeItemMethod.invoke(c, itemArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
846 |
addItemMethod.invoke(c, itemArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
847 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
848 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
849 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
850 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
851 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
852 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
853 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
854 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
855 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
856 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
857 |
// [PK] CheckboxMenuItem isn't a component but it does |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
858 |
// implement Interface ItemSelectable!! |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
859 |
// if (c instanceof CheckboxMenuItem) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
860 |
// ((CheckboxMenuItem) c).removeItemListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
861 |
// ((CheckboxMenuItem) c).addItemListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
862 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
863 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
864 |
case EventID.KEY: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
865 |
c.removeKeyListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
866 |
c.addKeyListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
867 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
868 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
869 |
case EventID.MOUSE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
870 |
c.removeMouseListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
871 |
c.addMouseListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
872 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
873 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
874 |
case EventID.MOTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
875 |
c.removeMouseMotionListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
876 |
c.addMouseMotionListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
877 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
878 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
879 |
case EventID.TEXT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
880 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
881 |
removeTextMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
882 |
"removeTextListener", textListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
883 |
addTextMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
884 |
"addTextListener", textListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
885 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
886 |
removeTextMethod.invoke(c, textArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
887 |
addTextMethod.invoke(c, textArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
888 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
889 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
890 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
891 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
892 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
893 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
894 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
895 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
896 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
897 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
898 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
899 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
900 |
case EventID.WINDOW: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
901 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
902 |
removeWindowMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
903 |
"removeWindowListener", windowListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
904 |
addWindowMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
905 |
"addWindowListener", windowListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
906 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
907 |
removeWindowMethod.invoke(c, windowArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
908 |
addWindowMethod.invoke(c, windowArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
909 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
910 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
911 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
912 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
913 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
914 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
915 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
916 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
917 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
918 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
919 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
920 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
921 |
// Don't bother recursing the children if this isn't going to |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
922 |
// accomplish anything. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
923 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
924 |
default: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
925 |
return; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
926 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
927 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
928 |
// if this component is a container, recurse through children |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
929 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
930 |
if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
931 |
int count = ((Container) c).getComponentCount(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
932 |
for (int i = 0; i < count; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
933 |
installListeners(((Container) c).getComponent(i), eventID); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
934 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
935 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
936 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
937 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
938 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
939 |
* Removes all listeners for the given event ID on all components based |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
940 |
* upon the topLevelWindows cached by EventQueueMonitor. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
941 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
942 |
* @param eventID the event ID |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
943 |
* @see EventID |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
944 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
945 |
protected void removeListeners(int eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
946 |
Window topLevelWindows[] = EventQueueMonitor.getTopLevelWindows(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
947 |
if (topLevelWindows != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
948 |
for (int i = 0; i < topLevelWindows.length; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
949 |
removeListeners(topLevelWindows[i], eventID); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
950 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
951 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
952 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
953 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
954 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
955 |
* Removes all listeners for the given component and all its children. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
956 |
* @param c the component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
957 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
958 |
protected void removeListeners(Component c) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
959 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
960 |
// conditionally remove low-level listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
961 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
962 |
if (AWTEventMonitor.componentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
963 |
removeListeners(c,EventID.COMPONENT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
964 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
965 |
if (AWTEventMonitor.keyListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
966 |
removeListeners(c,EventID.KEY); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
967 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
968 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
969 |
removeListeners(c,EventID.MOUSE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
970 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
971 |
if (AWTEventMonitor.mouseMotionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
972 |
removeListeners(c,EventID.MOTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
973 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
974 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
975 |
removeListeners(c,EventID.WINDOW); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
976 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
977 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
978 |
// Remove semantic listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
979 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
980 |
if (AWTEventMonitor.actionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
981 |
removeListeners(c,EventID.ACTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
982 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
983 |
if (AWTEventMonitor.adjustmentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
984 |
removeListeners(c,EventID.ADJUSTMENT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
985 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
986 |
if (AWTEventMonitor.itemListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
987 |
removeListeners(c,EventID.ITEM); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
988 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
989 |
if (AWTEventMonitor.textListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
990 |
removeListeners(c,EventID.TEXT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
991 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
992 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
993 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
994 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
995 |
* Removes all listeners for the event ID from the component and all |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
996 |
* of its children. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
997 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
998 |
* @param c the component to remove listeners from |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
999 |
* @see EventID |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1000 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1001 |
protected void removeListeners(Component c, int eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1002 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1003 |
// remove the appropriate listener hook into this component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1004 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1005 |
switch (eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1006 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1007 |
case EventID.ACTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1008 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1009 |
removeActionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1010 |
"removeActionListener", |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1011 |
actionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1012 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1013 |
removeActionMethod.invoke(c, actionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1014 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1015 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1016 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1017 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1018 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1019 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1020 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1021 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1022 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1023 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1024 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1025 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1026 |
case EventID.ADJUSTMENT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1027 |
if (c instanceof Adjustable) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1028 |
((Adjustable) c).removeAdjustmentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1029 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1030 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1031 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1032 |
case EventID.COMPONENT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1033 |
c.removeComponentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1034 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1035 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1036 |
// Never remove these because we're always interested in them |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1037 |
// for our own use. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1038 |
//case EventID.CONTAINER: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1039 |
// if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1040 |
// ((Container) c).removeContainerListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1041 |
// } |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1042 |
// break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1043 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1044 |
//case EventID.FOCUS: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1045 |
// c.removeFocusListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1046 |
// break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1047 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1048 |
case EventID.ITEM: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1049 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1050 |
removeItemMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1051 |
"removeItemListener", itemListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1052 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1053 |
removeItemMethod.invoke(c, itemArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1054 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1055 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1056 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1057 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1058 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1059 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1060 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1061 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1062 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1063 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1064 |
// [PK] CheckboxMenuItem isn't a component but it does |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1065 |
// implement Interface ItemSelectable!! |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1066 |
// if (c instanceof CheckboxMenuItem) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1067 |
// ((CheckboxMenuItem) c).removeItemListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1068 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1069 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1070 |
case EventID.KEY: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1071 |
c.removeKeyListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1072 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1073 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1074 |
case EventID.MOUSE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1075 |
c.removeMouseListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1076 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1077 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1078 |
case EventID.MOTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1079 |
c.removeMouseMotionListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1080 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1081 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1082 |
case EventID.TEXT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1083 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1084 |
removeTextMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1085 |
"removeTextListener", textListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1086 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1087 |
removeTextMethod.invoke(c, textArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1088 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1089 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1090 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1091 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1092 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1093 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1094 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1095 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1096 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1097 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1098 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1099 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1100 |
case EventID.WINDOW: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1101 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1102 |
removeWindowMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1103 |
"removeWindowListener", windowListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1104 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1105 |
removeWindowMethod.invoke(c, windowArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1106 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1107 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1108 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1109 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1110 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1111 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1112 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1113 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1114 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1115 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1116 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1117 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1118 |
default: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1119 |
return; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1120 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1121 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1122 |
if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1123 |
int count = ((Container) c).getComponentCount(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1124 |
for (int i = 0; i < count; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1125 |
removeListeners(((Container) c).getComponent(i), eventID); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1126 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1127 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1128 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1129 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1130 |
/********************************************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1131 |
/* */ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1132 |
/* Listener Interface Methods */ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1133 |
/* */ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1134 |
/********************************************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1135 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1136 |
/* TopLevelWindow Methods ***************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1137 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1138 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1139 |
* Called when top level window is created. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1140 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1141 |
* @see EventQueueMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1142 |
* @see EventQueueMonitor#addTopLevelWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1143 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1144 |
public void topLevelWindowCreated(Window w) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1145 |
installListeners(w); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1146 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1147 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1148 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1149 |
* Called when top level window is destroyed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1150 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1151 |
* @see EventQueueMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1152 |
* @see EventQueueMonitor#addTopLevelWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1153 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1154 |
public void topLevelWindowDestroyed(Window w) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1155 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1156 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1157 |
/* ActionListener Methods ***************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1158 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1159 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1160 |
* Called when an action is performed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1161 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1162 |
* @see AWTEventMonitor#addActionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1163 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1164 |
public void actionPerformed(ActionEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1165 |
if (AWTEventMonitor.actionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1166 |
AWTEventMonitor.actionListener_private.actionPerformed(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1167 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1168 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1169 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1170 |
/* AdjustmentListener Methods ***********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1171 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1172 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1173 |
* Called when an adjustment is made. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1174 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1175 |
* @see AWTEventMonitor#addAdjustmentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1176 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1177 |
public void adjustmentValueChanged(AdjustmentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1178 |
if (AWTEventMonitor.adjustmentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1179 |
AWTEventMonitor.adjustmentListener_private.adjustmentValueChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1180 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1181 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1182 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1183 |
/* ComponentListener Methods ************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1184 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1185 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1186 |
* Called when a component is hidden. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1187 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1188 |
* @see AWTEventMonitor#addComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1189 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1190 |
public void componentHidden(ComponentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1191 |
if (AWTEventMonitor.componentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1192 |
AWTEventMonitor.componentListener_private.componentHidden(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1193 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1194 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1195 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1196 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1197 |
* Called when a component is moved. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1198 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1199 |
* @see AWTEventMonitor#addComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1200 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1201 |
public void componentMoved(ComponentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1202 |
if (AWTEventMonitor.componentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1203 |
AWTEventMonitor.componentListener_private.componentMoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1204 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1205 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1206 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1207 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1208 |
* Called when a component is resized. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1209 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1210 |
* @see AWTEventMonitor#addComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1211 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1212 |
public void componentResized(ComponentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1213 |
if (AWTEventMonitor.componentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1214 |
AWTEventMonitor.componentListener_private.componentResized(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1215 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1216 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1217 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1218 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1219 |
* Called when a component is shown. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1220 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1221 |
* @see AWTEventMonitor#addComponentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1222 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1223 |
public void componentShown(ComponentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1224 |
if (AWTEventMonitor.componentListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1225 |
AWTEventMonitor.componentListener_private.componentShown(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1226 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1227 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1228 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1229 |
/* ContainerListener Methods ************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1230 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1231 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1232 |
* Called when a component is added to a container. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1233 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1234 |
* @see AWTEventMonitor#addContainerListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1235 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1236 |
public void componentAdded(ContainerEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1237 |
installListeners(e.getChild()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1238 |
if (AWTEventMonitor.containerListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1239 |
AWTEventMonitor.containerListener_private.componentAdded(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1240 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1241 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1242 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1243 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1244 |
* Called when a component is removed from a container. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1245 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1246 |
* @see AWTEventMonitor#addContainerListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1247 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1248 |
public void componentRemoved(ContainerEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1249 |
removeListeners(e.getChild()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1250 |
if (AWTEventMonitor.containerListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1251 |
AWTEventMonitor.containerListener_private.componentRemoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1252 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1253 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1254 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1255 |
/* FocusListener Methods ****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1256 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1257 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1258 |
* Called when a component gains keyboard focus. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1259 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1260 |
* @see AWTEventMonitor#addFocusListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1261 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1262 |
public void focusGained(FocusEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1263 |
AWTEventMonitor.componentWithFocus_private = (Component) e.getSource(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1264 |
if (AWTEventMonitor.focusListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1265 |
AWTEventMonitor.focusListener_private.focusGained(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1266 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1267 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1268 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1269 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1270 |
* Called when a component loses keyboard focus. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1271 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1272 |
* @see AWTEventMonitor#addFocusListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1273 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1274 |
public void focusLost(FocusEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1275 |
AWTEventMonitor.componentWithFocus_private = null; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1276 |
if (AWTEventMonitor.focusListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1277 |
AWTEventMonitor.focusListener_private.focusLost(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1278 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1279 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1280 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1281 |
/* ItemListener Methods *****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1282 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1283 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1284 |
* Called when an item's state changes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1285 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1286 |
* @see AWTEventMonitor#addItemListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1287 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1288 |
public void itemStateChanged(ItemEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1289 |
if (AWTEventMonitor.itemListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1290 |
AWTEventMonitor.itemListener_private.itemStateChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1291 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1292 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1293 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1294 |
/* KeyListener Methods ******************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1295 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1296 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1297 |
* Called when a key is pressed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1298 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1299 |
* @see AWTEventMonitor#addKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1300 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1301 |
public void keyPressed(KeyEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1302 |
if (AWTEventMonitor.keyListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1303 |
AWTEventMonitor.keyListener_private.keyPressed(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1304 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1305 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1306 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1307 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1308 |
* Called when a key is typed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1309 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1310 |
* @see AWTEventMonitor#addKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1311 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1312 |
public void keyReleased(KeyEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1313 |
if (AWTEventMonitor.keyListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1314 |
AWTEventMonitor.keyListener_private.keyReleased(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1315 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1316 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1317 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1318 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1319 |
* Called when a key is released. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1320 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1321 |
* @see AWTEventMonitor#addKeyListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1322 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1323 |
public void keyTyped(KeyEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1324 |
if (AWTEventMonitor.keyListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1325 |
AWTEventMonitor.keyListener_private.keyTyped(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1326 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1327 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1328 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1329 |
/* MouseListener Methods ****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1330 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1331 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1332 |
* Called when the mouse is clicked. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1333 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1334 |
* @see AWTEventMonitor#addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1335 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1336 |
public void mouseClicked(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1337 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1338 |
AWTEventMonitor.mouseListener_private.mouseClicked(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1339 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1340 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1341 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1342 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1343 |
* Called when the mouse enters a component. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1344 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1345 |
* @see AWTEventMonitor#addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1346 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1347 |
public void mouseEntered(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1348 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1349 |
AWTEventMonitor.mouseListener_private.mouseEntered(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1350 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1351 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1352 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1353 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1354 |
* Called when the mouse leaves a component. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1355 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1356 |
* @see AWTEventMonitor#addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1357 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1358 |
public void mouseExited(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1359 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1360 |
AWTEventMonitor.mouseListener_private.mouseExited(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1361 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1362 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1363 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1364 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1365 |
* Called when the mouse is pressed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1366 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1367 |
* @see AWTEventMonitor#addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1368 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1369 |
public void mousePressed(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1370 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1371 |
AWTEventMonitor.mouseListener_private.mousePressed(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1372 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1373 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1374 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1375 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1376 |
* Called when the mouse is released. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1377 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1378 |
* @see AWTEventMonitor#addMouseListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1379 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1380 |
public void mouseReleased(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1381 |
if (AWTEventMonitor.mouseListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1382 |
AWTEventMonitor.mouseListener_private.mouseReleased(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1383 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1384 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1385 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1386 |
/* MouseMotionListener Methods **********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1387 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1388 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1389 |
* Called when the mouse is dragged. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1390 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1391 |
* @see AWTEventMonitor#addMouseMotionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1392 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1393 |
public void mouseDragged(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1394 |
if (AWTEventMonitor.mouseMotionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1395 |
AWTEventMonitor.mouseMotionListener_private.mouseDragged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1396 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1397 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1398 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1399 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1400 |
* Called when the mouse is moved. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1401 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1402 |
* @see AWTEventMonitor#addMouseMotionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1403 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1404 |
public void mouseMoved(MouseEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1405 |
if (AWTEventMonitor.mouseMotionListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1406 |
AWTEventMonitor.mouseMotionListener_private.mouseMoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1407 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1408 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1409 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1410 |
/* TextListener Methods *****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1411 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1412 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1413 |
* Called when a component's text value changed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1414 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1415 |
* @see AWTEventMonitor#addTextListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1416 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1417 |
public void textValueChanged(TextEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1418 |
if (AWTEventMonitor.textListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1419 |
AWTEventMonitor.textListener_private.textValueChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1420 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1421 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1422 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1423 |
/* WindowListener Methods ***************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1424 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1425 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1426 |
* Called when a window is opened. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1427 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1428 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1429 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1430 |
public void windowOpened(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1431 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1432 |
AWTEventMonitor.windowListener_private.windowOpened(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1433 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1434 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1435 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1436 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1437 |
* Called when a window is in the process of closing. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1438 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1439 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1440 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1441 |
public void windowClosing(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1442 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1443 |
AWTEventMonitor.windowListener_private.windowClosing(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1444 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1445 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1446 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1447 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1448 |
* Called when a window is closed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1449 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1450 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1451 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1452 |
public void windowClosed(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1453 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1454 |
AWTEventMonitor.windowListener_private.windowClosed(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1455 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1456 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1457 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1458 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1459 |
* Called when a window is iconified. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1460 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1461 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1462 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1463 |
public void windowIconified(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1464 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1465 |
AWTEventMonitor.windowListener_private.windowIconified(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1466 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1467 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1468 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1469 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1470 |
* Called when a window is deiconified. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1471 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1472 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1473 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1474 |
public void windowDeiconified(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1475 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1476 |
AWTEventMonitor.windowListener_private.windowDeiconified(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1477 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1478 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1479 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1480 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1481 |
* Called when a window is activated. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1482 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1483 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1484 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1485 |
public void windowActivated(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1486 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1487 |
AWTEventMonitor.windowListener_private.windowActivated(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1488 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1489 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1490 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1491 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1492 |
* Called when a window is deactivated. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1493 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1494 |
* @see AWTEventMonitor#addWindowListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1495 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1496 |
public void windowDeactivated(WindowEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1497 |
if (AWTEventMonitor.windowListener_private != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1498 |
AWTEventMonitor.windowListener_private.windowDeactivated(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1499 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1500 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1501 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1502 |
} |