author | serb |
Wed, 18 Apr 2018 14:07:41 -0700 | |
changeset 49998 | 9070717a16a1 |
parent 47216 | 71c04702a3d5 |
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.util.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
29 |
import java.beans.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
30 |
import java.awt.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
31 |
import java.awt.event.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
32 |
import javax.swing.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
33 |
import javax.swing.event.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
34 |
import javax.swing.table.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
35 |
import javax.swing.tree.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
36 |
import javax.swing.text.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
37 |
import javax.swing.undo.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
38 |
import javax.accessibility.*; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
39 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
40 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
41 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
42 |
* <P>{@code SwingEventMonitor} extends {@link AWTEventMonitor} by adding a suite of |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
43 |
* listeners conditionally installed on every Swing component instance |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
44 |
* in the Java Virtual Machine. The events captured by these listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
45 |
* are made available through a unified set of listeners supported by |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
46 |
* {@code SwingEventMonitor}. With this, all the individual events on each of the |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
47 |
* AWT and Swing component instances are funneled into one set of listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
48 |
* broken down by category (see {@link EventID} for the categories). |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
49 |
* <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
|
50 |
* 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
|
51 |
* <p>Because this class extends {@code AWTEventMonitor}, it is not |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
52 |
* necessary to use this class and {@code AWTEventMonitor} at the same time. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
53 |
* If you want to monitor both AWT and Swing components, you should |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
54 |
* use just this class. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
55 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
56 |
* @see AWTEventMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
57 |
* |
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 |
public class SwingEventMonitor extends AWTEventMonitor { |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
62 |
* The master list of all listeners registered by other classes. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
63 |
* This can only be publicly modified by calling the add or |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
64 |
* remove listener methods in this class. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
65 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
66 |
static protected final EventListenerList listenerList = new EventListenerList(); |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
69 |
* 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
|
70 |
* 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
|
71 |
* 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
|
72 |
* 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
|
73 |
*/ |
42712
679c4f3300b1
8167182: Exported elements referring to inaccessible types in jdk.accessibility
prr
parents:
34894
diff
changeset
|
74 |
static private final SwingEventListener swingListener = new SwingEventListener(); |
29883
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
77 |
* Adds the specified listener to receive all {@link EventID#ANCESTOR ANCESTOR} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
78 |
* 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
|
79 |
* <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
|
80 |
* 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
|
81 |
* 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
|
82 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
83 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
84 |
* @see #removeAncestorListener |
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 public void addAncestorListener(AncestorListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
87 |
if (listenerList.getListenerCount(AncestorListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
88 |
swingListener.installListeners(EventID.ANCESTOR); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
89 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
90 |
listenerList.add(AncestorListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
91 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
92 |
|
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 |
* 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
|
95 |
* {@link EventID#ANCESTOR ANCESTOR} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
96 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
97 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
98 |
* @see #addAncestorListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
99 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
100 |
static public void removeAncestorListener(AncestorListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
101 |
listenerList.remove(AncestorListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
102 |
if (listenerList.getListenerCount(AncestorListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
103 |
swingListener.removeListeners(EventID.ANCESTOR); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
104 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
105 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
108 |
* Adds the specified listener to receive all {@link EventID#CARET CARET} events |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
109 |
* 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
|
110 |
* <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
|
111 |
* 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
|
112 |
* 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
|
113 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
114 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
115 |
* @see #removeCaretListener |
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 |
static public void addCaretListener(CaretListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
118 |
if (listenerList.getListenerCount(CaretListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
119 |
swingListener.installListeners(EventID.CARET); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
120 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
121 |
listenerList.add(CaretListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
122 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
123 |
|
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 |
* 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
|
126 |
* {@link EventID#CARET CARET} events when they occur. |
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 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
129 |
* @see #addCaretListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
130 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
131 |
static public void removeCaretListener(CaretListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
132 |
listenerList.remove(CaretListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
133 |
if (listenerList.getListenerCount(CaretListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
134 |
swingListener.removeListeners(EventID.CARET); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
135 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
136 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
139 |
* Adds the specified listener to receive all |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
140 |
* {@link EventID#CELLEDITOR CELLEDITOR} events on each |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
141 |
* 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
|
142 |
* <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
|
143 |
* 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
|
144 |
* 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
|
145 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
146 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
147 |
* @see #removeCellEditorListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
148 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
149 |
static public void addCellEditorListener(CellEditorListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
150 |
if (listenerList.getListenerCount(CellEditorListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
151 |
swingListener.installListeners(EventID.CELLEDITOR); |
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 |
listenerList.add(CellEditorListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
154 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
157 |
* 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
|
158 |
* {@link EventID#CELLEDITOR CELLEDITOR} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
159 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
160 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
161 |
* @see #addCellEditorListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
162 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
163 |
static public void removeCellEditorListener(CellEditorListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
164 |
listenerList.remove(CellEditorListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
165 |
if (listenerList.getListenerCount(CellEditorListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
166 |
swingListener.removeListeners(EventID.CELLEDITOR); |
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 |
|
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 |
* Adds the specified listener to receive all {@link EventID#CHANGE CHANGE} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
172 |
* 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
|
173 |
* <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
|
174 |
* 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
|
175 |
* 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
|
176 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
177 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
178 |
* @see #removeChangeListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
179 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
180 |
static public void addChangeListener(ChangeListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
181 |
if (listenerList.getListenerCount(ChangeListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
182 |
swingListener.installListeners(EventID.CHANGE); |
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 |
listenerList.add(ChangeListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
185 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
188 |
* 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
|
189 |
* {@link EventID#CHANGE CHANGE} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
190 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
191 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
192 |
* @see #addChangeListener |
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 |
static public void removeChangeListener(ChangeListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
195 |
listenerList.remove(ChangeListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
196 |
if (listenerList.getListenerCount(ChangeListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
197 |
swingListener.removeListeners(EventID.CHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
198 |
} |
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 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
201 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
202 |
* Adds the specified listener to receive all {@link EventID#COLUMNMODEL COLUMNMODEL} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
203 |
* 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
|
204 |
* <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
|
205 |
* 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
|
206 |
* 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
|
207 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
208 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
209 |
* @see #removeColumnModelListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
210 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
211 |
static public void addColumnModelListener(TableColumnModelListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
212 |
if (listenerList.getListenerCount(TableColumnModelListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
213 |
swingListener.installListeners(EventID.COLUMNMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
214 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
215 |
listenerList.add(TableColumnModelListener.class, l); |
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 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
218 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
219 |
* 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
|
220 |
* {@link EventID#COLUMNMODEL COLUMNMODEL} events when they occur. |
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 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
223 |
* @see #addColumnModelListener |
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 |
static public void removeColumnModelListener(TableColumnModelListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
226 |
listenerList.remove(TableColumnModelListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
227 |
if (listenerList.getListenerCount(TableColumnModelListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
228 |
swingListener.removeListeners(EventID.COLUMNMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
229 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
230 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
231 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
232 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
233 |
* Adds the specified listener to receive all {@link EventID#DOCUMENT DOCUMENT} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
234 |
* 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
|
235 |
* <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
|
236 |
* 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
|
237 |
* 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
|
238 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
239 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
240 |
* @see #removeDocumentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
241 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
242 |
static public void addDocumentListener(DocumentListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
243 |
if (listenerList.getListenerCount(DocumentListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
244 |
swingListener.installListeners(EventID.DOCUMENT); |
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 |
listenerList.add(DocumentListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
247 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
248 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
249 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
250 |
* 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
|
251 |
* {@link EventID#DOCUMENT DOCUMENT} events when they occur. |
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 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
254 |
* @see #addDocumentListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
255 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
256 |
static public void removeDocumentListener(DocumentListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
257 |
listenerList.remove(DocumentListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
258 |
if (listenerList.getListenerCount(DocumentListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
259 |
swingListener.removeListeners(EventID.DOCUMENT); |
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 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
262 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
263 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
264 |
* Adds the specified listener to receive all {@link EventID#LISTDATA LISTDATA} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
265 |
* 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
|
266 |
* <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
|
267 |
* 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
|
268 |
* 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
|
269 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
270 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
271 |
* @see #removeListDataListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
272 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
273 |
static public void addListDataListener(ListDataListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
274 |
if (listenerList.getListenerCount(ListDataListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
275 |
swingListener.installListeners(EventID.LISTDATA); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
276 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
277 |
listenerList.add(ListDataListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
278 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
279 |
|
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 |
* 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
|
282 |
* {@link EventID#LISTDATA LISTDATA} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
283 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
284 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
285 |
* @see #addListDataListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
286 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
287 |
static public void removeListDataListener(ListDataListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
288 |
listenerList.remove(ListDataListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
289 |
if (listenerList.getListenerCount(ListDataListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
290 |
swingListener.removeListeners(EventID.LISTDATA); |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
295 |
* Adds the specified listener to receive all {@link EventID#LISTSELECTION LISTSELECTION} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
296 |
* 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
|
297 |
* <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
|
298 |
* 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
|
299 |
* 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
|
300 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
301 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
302 |
* @see #removeListSelectionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
303 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
304 |
static public void addListSelectionListener(ListSelectionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
305 |
if (listenerList.getListenerCount(ListSelectionListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
306 |
swingListener.installListeners(EventID.LISTSELECTION); |
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 |
listenerList.add(ListSelectionListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
309 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
312 |
* 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
|
313 |
* {@link EventID#LISTSELECTION LISTSELECTION} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
314 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
315 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
316 |
* @see #addListSelectionListener |
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 |
static public void removeListSelectionListener(ListSelectionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
319 |
listenerList.remove(ListSelectionListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
320 |
if (listenerList.getListenerCount(ListSelectionListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
321 |
swingListener.removeListeners(EventID.LISTSELECTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
322 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
323 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
326 |
* Adds the specified listener to receive all {@link EventID#MENU MENU} events |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
327 |
* 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
|
328 |
* <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
|
329 |
* 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
|
330 |
* 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
|
331 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
332 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
333 |
* @see #removeMenuListener |
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 |
static public void addMenuListener(MenuListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
336 |
if (listenerList.getListenerCount(MenuListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
337 |
swingListener.installListeners(EventID.MENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
338 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
339 |
listenerList.add(MenuListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
340 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
341 |
|
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 |
* 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
|
344 |
* {@link EventID#MENU MENU} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
345 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
346 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
347 |
* @see #addMenuListener |
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 |
static public void removeMenuListener(MenuListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
350 |
listenerList.remove(MenuListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
351 |
if (listenerList.getListenerCount(MenuListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
352 |
swingListener.removeListeners(EventID.MENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
353 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
354 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
355 |
|
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 |
* Adds the specified listener to receive all {@link EventID#POPUPMENU POPUPMENU} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
358 |
* 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
|
359 |
* <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
|
360 |
* 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
|
361 |
* 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
|
362 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
363 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
364 |
* @see #removePopupMenuListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
365 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
366 |
static public void addPopupMenuListener(PopupMenuListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
367 |
if (listenerList.getListenerCount(PopupMenuListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
368 |
swingListener.installListeners(EventID.POPUPMENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
369 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
370 |
listenerList.add(PopupMenuListener.class, l); |
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 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
373 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
374 |
* 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
|
375 |
* {@link EventID#POPUPMENU POPUPMENU} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
376 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
377 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
378 |
* @see #addPopupMenuListener |
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 |
static public void removePopupMenuListener(PopupMenuListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
381 |
listenerList.remove(PopupMenuListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
382 |
if (listenerList.getListenerCount(PopupMenuListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
383 |
swingListener.removeListeners(EventID.POPUPMENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
384 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
385 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
386 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
387 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
388 |
* Adds the specified listener to receive all {@link EventID#TABLEMODEL TABLEMODEL} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
389 |
* 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
|
390 |
* <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
|
391 |
* 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
|
392 |
* 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
|
393 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
394 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
395 |
* @see #removeTableModelListener |
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 |
static public void addTableModelListener(TableModelListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
398 |
if (listenerList.getListenerCount(TableModelListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
399 |
swingListener.installListeners(EventID.TABLEMODEL); |
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 |
listenerList.add(TableModelListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
402 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
405 |
* 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
|
406 |
* {@link EventID#TABLEMODEL TABLEMODEL} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
407 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
408 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
409 |
* @see #addTableModelListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
410 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
411 |
static public void removeTableModelListener(TableModelListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
412 |
listenerList.remove(TableModelListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
413 |
if (listenerList.getListenerCount(TableModelListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
414 |
swingListener.removeListeners(EventID.TABLEMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
415 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
416 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
417 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
418 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
419 |
* Adds the specified listener to receive all {@link EventID#TREEEXPANSION TREEEXPANSION} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
420 |
* 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
|
421 |
* <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
|
422 |
* 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
|
423 |
* 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
|
424 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
425 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
426 |
* @see #removeTreeExpansionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
427 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
428 |
static public void addTreeExpansionListener(TreeExpansionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
429 |
if (listenerList.getListenerCount(TreeExpansionListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
430 |
swingListener.installListeners(EventID.TREEEXPANSION); |
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 |
listenerList.add(TreeExpansionListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
433 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
434 |
|
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 |
* 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
|
437 |
* {@link EventID#TREEEXPANSION TREEEXPANSION} events when they occur. |
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 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
440 |
* @see #addTreeExpansionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
441 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
442 |
static public void removeTreeExpansionListener(TreeExpansionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
443 |
listenerList.remove(TreeExpansionListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
444 |
if (listenerList.getListenerCount(TreeExpansionListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
445 |
swingListener.removeListeners(EventID.TREEEXPANSION); |
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 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
448 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
449 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
450 |
* Adds the specified listener to receive all {@link EventID#TREEMODEL TREEMODEL} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
451 |
* 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
|
452 |
* <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
|
453 |
* 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
|
454 |
* 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
|
455 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
456 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
457 |
* @see #removeTreeModelListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
458 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
459 |
static public void addTreeModelListener(TreeModelListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
460 |
if (listenerList.getListenerCount(TreeModelListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
461 |
swingListener.installListeners(EventID.TREEMODEL); |
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 |
listenerList.add(TreeModelListener.class, l); |
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 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
466 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
467 |
* 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
|
468 |
* {@link EventID#TREEMODEL TREEMODEL} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
469 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
470 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
471 |
* @see #addTreeModelListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
472 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
473 |
static public void removeTreeModelListener(TreeModelListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
474 |
listenerList.remove(TreeModelListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
475 |
if (listenerList.getListenerCount(TreeModelListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
476 |
swingListener.removeListeners(EventID.TREEMODEL); |
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 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
480 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
481 |
* Adds the specified listener to receive all {@link EventID#TREESELECTION TREESELECTION} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
482 |
* 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
|
483 |
* <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
|
484 |
* 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
|
485 |
* 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
|
486 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
487 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
488 |
* @see #removeTreeSelectionListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
489 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
490 |
static public void addTreeSelectionListener(TreeSelectionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
491 |
if (listenerList.getListenerCount(TreeSelectionListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
492 |
swingListener.installListeners(EventID.TREESELECTION); |
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 |
listenerList.add(TreeSelectionListener.class, 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#TREESELECTION TREESELECTION} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
500 |
* @see #addTreeSelectionListener |
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 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
503 |
static public void removeTreeSelectionListener(TreeSelectionListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
504 |
listenerList.remove(TreeSelectionListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
505 |
if (listenerList.getListenerCount(TreeSelectionListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
506 |
swingListener.removeListeners(EventID.TREESELECTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
507 |
} |
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 |
* Adds the specified listener to receive all {@link EventID#UNDOABLEEDIT UNDOABLEEDIT} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
512 |
* 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
|
513 |
* <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
|
514 |
* 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
|
515 |
* 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
|
516 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
517 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
518 |
* @see #removeUndoableEditListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
519 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
520 |
static public void addUndoableEditListener(UndoableEditListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
521 |
if (listenerList.getListenerCount(UndoableEditListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
522 |
swingListener.installListeners(EventID.UNDOABLEEDIT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
523 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
524 |
listenerList.add(UndoableEditListener.class, l); |
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 |
|
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 |
* 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
|
529 |
* {@link EventID#UNDOABLEEDIT UNDOABLEEDIT} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
530 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
531 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
532 |
* @see #addUndoableEditListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
533 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
534 |
static public void removeUndoableEditListener(UndoableEditListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
535 |
listenerList.remove(UndoableEditListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
536 |
if (listenerList.getListenerCount(UndoableEditListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
537 |
swingListener.removeListeners(EventID.UNDOABLEEDIT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
538 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
539 |
} |
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 |
* Adds the specified listener to receive all {@link EventID#INTERNALFRAME INTERNALFRAME} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
543 |
* 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
|
544 |
* <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
|
545 |
* 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
|
546 |
* 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
|
547 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
548 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
549 |
* @see #removeInternalFrameListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
550 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
551 |
static public void addInternalFrameListener(InternalFrameListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
552 |
if (listenerList.getListenerCount(InternalFrameListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
553 |
swingListener.installListeners(EventID.INTERNALFRAME); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
554 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
555 |
listenerList.add(InternalFrameListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
556 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
559 |
* 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
|
560 |
* {@link EventID#INTERNALFRAME INTERNALFRAME} events when they occur. |
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 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
563 |
* @see #addInternalFrameListener |
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 |
static public void removeInternalFrameListener(InternalFrameListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
566 |
listenerList.remove(InternalFrameListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
567 |
if (listenerList.getListenerCount(InternalFrameListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
568 |
swingListener.removeListeners(EventID.INTERNALFRAME); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
569 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
570 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
571 |
|
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 |
* Adds the specified listener to receive all {@link EventID#PROPERTYCHANGE PROPERTYCHANGE} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
574 |
* 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
|
575 |
* <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
|
576 |
* 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
|
577 |
* 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
|
578 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
579 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
580 |
* @see #removePropertyChangeListener |
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 public void addPropertyChangeListener(PropertyChangeListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
583 |
if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
584 |
swingListener.installListeners(EventID.PROPERTYCHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
585 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
586 |
listenerList.add(PropertyChangeListener.class, l); |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
590 |
* 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
|
591 |
* {@link EventID#PROPERTYCHANGE PROPERTYCHANGE} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
592 |
* @see #addPropertyChangeListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
593 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
594 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
595 |
static public void removePropertyChangeListener(PropertyChangeListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
596 |
listenerList.remove(PropertyChangeListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
597 |
if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
598 |
swingListener.removeListeners(EventID.PROPERTYCHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
599 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
600 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
601 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
602 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
603 |
* Adds the specified listener to receive all {@link EventID#VETOABLECHANGE VETOABLECHANGE} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
604 |
* 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
|
605 |
* <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
|
606 |
* 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
|
607 |
* 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
|
608 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
609 |
* @param l the listener to add |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
610 |
* @see #removeVetoableChangeListener |
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 |
static public void addVetoableChangeListener(VetoableChangeListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
613 |
if (listenerList.getListenerCount(VetoableChangeListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
614 |
swingListener.installListeners(EventID.VETOABLECHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
615 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
616 |
listenerList.add(VetoableChangeListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
617 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
618 |
|
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 |
* 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
|
621 |
* {@link EventID#VETOABLECHANGE VETOABLECHANGE} events when they occur. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
622 |
* |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
623 |
* @param l the listener to remove |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
624 |
* @see #addVetoableChangeListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
625 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
626 |
static public void removeVetoableChangeListener(VetoableChangeListener l) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
627 |
listenerList.remove(VetoableChangeListener.class, l); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
628 |
if (listenerList.getListenerCount(VetoableChangeListener.class) == 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
629 |
swingListener.removeListeners(EventID.VETOABLECHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
630 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
631 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
632 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
633 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
634 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
635 |
* SwingEventListener is the class that does all the work for |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
636 |
* SwingEventMonitor. It is not intended for use by any other class |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
637 |
* except SwingEventMonitor. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
638 |
* |
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 |
static class SwingEventListener extends AWTEventsListener |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
641 |
implements AncestorListener, CaretListener, CellEditorListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
642 |
ChangeListener, DocumentListener, ListDataListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
643 |
ListSelectionListener, MenuListener, PopupMenuListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
644 |
TableColumnModelListener, TableModelListener, TreeExpansionListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
645 |
TreeModelListener, TreeSelectionListener, UndoableEditListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
646 |
InternalFrameListener, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
647 |
PropertyChangeListener, VetoableChangeListener { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
648 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
649 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
650 |
* internal variables for Caret introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
651 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
652 |
private java.lang.Class<?>[] caretListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
653 |
private java.lang.reflect.Method removeCaretMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
654 |
private java.lang.reflect.Method addCaretMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
655 |
private java.lang.Object[] caretArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
656 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
657 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
658 |
* internal variables for CellEditor introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
659 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
660 |
private java.lang.Class<?>[] cellEditorListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
661 |
private java.lang.reflect.Method removeCellEditorMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
662 |
private java.lang.reflect.Method addCellEditorMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
663 |
private java.lang.Object[] cellEditorArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
664 |
private java.lang.reflect.Method getCellEditorMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
665 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
666 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
667 |
* internal variables for Change introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
668 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
669 |
private java.lang.Class<?>[] changeListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
670 |
private java.lang.reflect.Method removeChangeMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
671 |
private java.lang.reflect.Method addChangeMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
672 |
private java.lang.Object[] changeArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
673 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
674 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
675 |
* internal variable for ColumnModel introspection |
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 |
private java.lang.reflect.Method getColumnModelMethod; |
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 |
* internal variables for Document introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
681 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
682 |
private java.lang.Class<?>[] documentListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
683 |
private java.lang.reflect.Method removeDocumentMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
684 |
private java.lang.reflect.Method addDocumentMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
685 |
private java.lang.Object[] documentArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
686 |
private java.lang.reflect.Method getDocumentMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
687 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
688 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
689 |
* internal variable for ListData, Table, and Tree introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
690 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
691 |
private java.lang.reflect.Method getModelMethod; |
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 |
* internal variables for ListSelection introspection |
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 |
private java.lang.Class<?>[] listSelectionListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
697 |
private java.lang.reflect.Method removeListSelectionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
698 |
private java.lang.reflect.Method addListSelectionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
699 |
private java.lang.Object[] listSelectionArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
700 |
private java.lang.reflect.Method getSelectionModelMethod; |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
703 |
* internal variables for Menu introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
704 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
705 |
private java.lang.Class<?>[] menuListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
706 |
private java.lang.reflect.Method removeMenuMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
707 |
private java.lang.reflect.Method addMenuMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
708 |
private java.lang.Object[] menuArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
709 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
710 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
711 |
* internal variables for PopupMenu introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
712 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
713 |
private java.lang.Class<?>[] popupMenuListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
714 |
private java.lang.reflect.Method removePopupMenuMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
715 |
private java.lang.reflect.Method addPopupMenuMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
716 |
private java.lang.Object[] popupMenuArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
717 |
private java.lang.reflect.Method getPopupMenuMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
718 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
719 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
720 |
* internal variables for TreeExpansion introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
721 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
722 |
private java.lang.Class<?>[] treeExpansionListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
723 |
private java.lang.reflect.Method removeTreeExpansionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
724 |
private java.lang.reflect.Method addTreeExpansionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
725 |
private java.lang.Object[] treeExpansionArgs; |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
728 |
* internal variables for TreeSelection introspection |
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 |
private java.lang.Class<?>[] treeSelectionListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
731 |
private java.lang.reflect.Method removeTreeSelectionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
732 |
private java.lang.reflect.Method addTreeSelectionMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
733 |
private java.lang.Object[] treeSelectionArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
734 |
|
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 |
* internal variables for UndoableEdit introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
737 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
738 |
private java.lang.Class<?>[] undoableEditListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
739 |
private java.lang.reflect.Method removeUndoableEditMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
740 |
private java.lang.reflect.Method addUndoableEditMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
741 |
private java.lang.Object[] undoableEditArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
742 |
|
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 |
* internal variables for InternalFrame introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
745 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
746 |
private java.lang.Class<?>[] internalFrameListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
747 |
private java.lang.reflect.Method removeInternalFrameMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
748 |
private java.lang.reflect.Method addInternalFrameMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
749 |
private java.lang.Object[] internalFrameArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
750 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
751 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
752 |
* internal variables for PropertyChange introspection |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
753 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
754 |
private java.lang.Class<?>[] propertyChangeListeners; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
755 |
private java.lang.reflect.Method removePropertyChangeMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
756 |
private java.lang.reflect.Method addPropertyChangeMethod; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
757 |
private java.lang.Object[] propertyChangeArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
758 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
759 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
760 |
* internal variables for a variety of change introspections |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
761 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
762 |
private java.lang.Class<?>[] nullClass; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
763 |
private java.lang.Object[] nullArgs; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
764 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
765 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
766 |
* 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
|
767 |
* 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
|
768 |
* registered listeners in SwingEventMonitor. Also registers itself |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
769 |
* 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
|
770 |
* automatically add new listeners to new components. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
771 |
* @see EventQueueMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
772 |
* @see SwingEventMonitor |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
773 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
774 |
public SwingEventListener() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
775 |
initializeIntrospection(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
776 |
installListeners(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
777 |
EventQueueMonitor.addTopLevelWindowListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
778 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
779 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
780 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
781 |
* 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
|
782 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
783 |
private boolean initializeIntrospection() { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
784 |
caretListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
785 |
caretArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
786 |
caretListeners[0] = javax.swing.event.CaretListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
787 |
caretArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
788 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
789 |
cellEditorListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
790 |
cellEditorArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
791 |
cellEditorListeners[0] = javax.swing.event.CellEditorListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
792 |
cellEditorArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
793 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
794 |
changeListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
795 |
changeArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
796 |
changeListeners[0] = javax.swing.event.ChangeListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
797 |
changeArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
798 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
799 |
documentListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
800 |
documentArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
801 |
documentListeners[0] = javax.swing.event.DocumentListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
802 |
documentArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
803 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
804 |
listSelectionListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
805 |
listSelectionArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
806 |
listSelectionListeners[0] = javax.swing.event.ListSelectionListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
807 |
listSelectionArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
808 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
809 |
menuListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
810 |
menuArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
811 |
menuListeners[0] = javax.swing.event.MenuListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
812 |
menuArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
813 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
814 |
popupMenuListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
815 |
popupMenuArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
816 |
popupMenuListeners[0] = javax.swing.event.PopupMenuListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
817 |
popupMenuArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
818 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
819 |
treeExpansionListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
820 |
treeExpansionArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
821 |
treeExpansionListeners[0] = javax.swing.event.TreeExpansionListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
822 |
treeExpansionArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
823 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
824 |
treeSelectionListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
825 |
treeSelectionArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
826 |
treeSelectionListeners[0] = javax.swing.event.TreeSelectionListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
827 |
treeSelectionArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
828 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
829 |
undoableEditListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
830 |
undoableEditArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
831 |
undoableEditListeners[0] = javax.swing.event.UndoableEditListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
832 |
undoableEditArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
833 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
834 |
internalFrameListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
835 |
internalFrameArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
836 |
internalFrameListeners[0] = javax.swing.event.InternalFrameListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
837 |
internalFrameArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
838 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
839 |
nullClass = new java.lang.Class<?>[0]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
840 |
nullArgs = new java.lang.Object[0]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
841 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
842 |
propertyChangeListeners = new java.lang.Class<?>[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
843 |
propertyChangeArgs = new java.lang.Object[1]; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
844 |
propertyChangeListeners[0] = java.beans.PropertyChangeListener.class; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
845 |
propertyChangeArgs[0] = this; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
846 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
847 |
return true; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
848 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
849 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
850 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
851 |
* Installs all appropriate Swing listeners to just the component. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
852 |
* Also calls super (AWTEventsListener.installListeners()) to install |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
853 |
* the requested AWT listeners. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
854 |
* @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
|
855 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
856 |
protected void installListeners(Component c) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
857 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
858 |
// This SwingEventListener needs to be notified when a new |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
859 |
// Swing component has been added so it can add Swing listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
860 |
// to these components. As a result, we always need a Container |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
861 |
// listener on every Container. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
862 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
863 |
installListeners(c,EventID.CONTAINER); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
864 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
865 |
// conditionally install Swing listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
866 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
867 |
if (SwingEventMonitor.listenerList.getListenerCount(AncestorListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
868 |
installListeners(c,EventID.ANCESTOR); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
869 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
870 |
if (SwingEventMonitor.listenerList.getListenerCount(CaretListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
871 |
installListeners(c,EventID.CARET); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
872 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
873 |
if (SwingEventMonitor.listenerList.getListenerCount(CellEditorListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
874 |
installListeners(c,EventID.CELLEDITOR); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
875 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
876 |
if (SwingEventMonitor.listenerList.getListenerCount(ChangeListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
877 |
installListeners(c,EventID.CHANGE); |
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 |
if (SwingEventMonitor.listenerList.getListenerCount(TableColumnModelListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
880 |
installListeners(c,EventID.COLUMNMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
881 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
882 |
if (SwingEventMonitor.listenerList.getListenerCount(DocumentListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
883 |
installListeners(c,EventID.DOCUMENT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
884 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
885 |
if (SwingEventMonitor.listenerList.getListenerCount(ListDataListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
886 |
installListeners(c,EventID.LISTDATA); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
887 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
888 |
if (SwingEventMonitor.listenerList.getListenerCount(ListSelectionListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
889 |
installListeners(c,EventID.LISTSELECTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
890 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
891 |
if (SwingEventMonitor.listenerList.getListenerCount(MenuListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
892 |
installListeners(c,EventID.MENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
893 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
894 |
if (SwingEventMonitor.listenerList.getListenerCount(PopupMenuListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
895 |
installListeners(c,EventID.POPUPMENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
896 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
897 |
if (SwingEventMonitor.listenerList.getListenerCount(TableModelListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
898 |
installListeners(c,EventID.TABLEMODEL); |
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 |
if (SwingEventMonitor.listenerList.getListenerCount(TreeExpansionListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
901 |
installListeners(c,EventID.TREEEXPANSION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
902 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
903 |
if (SwingEventMonitor.listenerList.getListenerCount(TreeModelListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
904 |
installListeners(c,EventID.TREEMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
905 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
906 |
if (SwingEventMonitor.listenerList.getListenerCount(TreeSelectionListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
907 |
installListeners(c,EventID.TREESELECTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
908 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
909 |
if (SwingEventMonitor.listenerList.getListenerCount(UndoableEditListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
910 |
installListeners(c,EventID.UNDOABLEEDIT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
911 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
912 |
if (SwingEventMonitor.listenerList.getListenerCount(InternalFrameListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
913 |
installListeners(c,EventID.INTERNALFRAME); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
914 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
915 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
916 |
// Conditionally install Beans listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
917 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
918 |
if (SwingEventMonitor.listenerList.getListenerCount(PropertyChangeListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
919 |
installListeners(c,EventID.PROPERTYCHANGE); |
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 |
if (SwingEventMonitor.listenerList.getListenerCount(VetoableChangeListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
922 |
installListeners(c,EventID.VETOABLECHANGE); |
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 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
925 |
// Now install the AWT listeners if needed. |
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 |
super.installListeners(c); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
928 |
} |
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 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
931 |
* Installs all appropriate Swing listeners to the component and all its |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
932 |
* children. As a precaution, it always attempts to remove itself as |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
933 |
* a listener first so we're always guaranteed it will installed itself |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
934 |
* just once. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
935 |
* @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
|
936 |
* @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
|
937 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
938 |
protected void installListeners(Component c, int eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
939 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
940 |
// 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
|
941 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
942 |
switch (eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
943 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
944 |
case EventID.CONTAINER: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
945 |
if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
946 |
((Container) c).removeContainerListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
947 |
((Container) c).addContainerListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
948 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
949 |
break; |
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 |
case EventID.ANCESTOR: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
952 |
if (c instanceof JComponent) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
953 |
((JComponent) c).removeAncestorListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
954 |
((JComponent) c).addAncestorListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
955 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
956 |
break; |
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 |
case EventID.CARET: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
959 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
960 |
removeCaretMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
961 |
"removeCaretListener", caretListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
962 |
addCaretMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
963 |
"addCaretListener", caretListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
964 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
965 |
removeCaretMethod.invoke(c, caretArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
966 |
addCaretMethod.invoke(c, caretArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
967 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
968 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
969 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
970 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
971 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
972 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
973 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
974 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
975 |
System.out.println("Exception: " + e.toString()); |
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 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
978 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
979 |
case EventID.CELLEDITOR: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
980 |
// Look for components which support the getCellEditor method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
981 |
// (e.g. JTable, JTree) |
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 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
984 |
getCellEditorMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
985 |
"getCellEditorMethod", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
986 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
987 |
Object o = getCellEditorMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
988 |
if (o != null && o instanceof CellEditor) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
989 |
((CellEditor) o).removeCellEditorListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
990 |
((CellEditor) o).addCellEditorListener(this); |
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 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
993 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
994 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
995 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
996 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
997 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
998 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
999 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1000 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1001 |
} |
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 |
// Look for components which support CellEditor listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1004 |
// (no current example) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1005 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1006 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1007 |
removeCellEditorMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1008 |
"removeCellEditorListener", cellEditorListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1009 |
addCellEditorMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1010 |
"addCellEditorListener", cellEditorListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1011 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1012 |
removeCellEditorMethod.invoke(c, cellEditorArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1013 |
addCellEditorMethod.invoke(c, cellEditorArgs); |
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.CHANGE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1027 |
// [[[FIXME: Need to add support for Style, StyleContext -pk]]] |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1028 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1029 |
// Look for components which support Change listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1030 |
// (e.g. AbstractButton, Caret, JProgressBar, JSlider, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1031 |
// JTabbedpane, JTextComponent, JViewport) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1032 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1033 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1034 |
removeChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1035 |
"removeChangeListener", changeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1036 |
addChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1037 |
"addChangeListener", changeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1038 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1039 |
removeChangeMethod.invoke(c, changeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1040 |
addChangeMethod.invoke(c, changeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1041 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1042 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1043 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1044 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1045 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1046 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1047 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1048 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1049 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1050 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1051 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1052 |
// Look for components which support the getModel method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1053 |
// whose model supports Change listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1054 |
// (e.g. BoundedRangeModel, ButtonModel, SingleSelectionModel) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1055 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1056 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1057 |
getModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1058 |
"getModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1059 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1060 |
Object o = getModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1061 |
if (o != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1062 |
removeChangeMethod = o.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1063 |
"removeChangeListener", changeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1064 |
addChangeMethod = o.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1065 |
"addChangeListener", changeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1066 |
removeChangeMethod.invoke(o, changeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1067 |
addChangeMethod.invoke(o, changeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1068 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1069 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1070 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1071 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1072 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1075 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1076 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1077 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1078 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1079 |
|
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.COLUMNMODEL: |
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 |
getColumnModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1085 |
"getTableColumnModel", nullClass); |
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 |
Object o = getColumnModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1088 |
if (o != null && o instanceof TableColumnModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1089 |
((TableColumnModel) o).removeColumnModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1090 |
((TableColumnModel) o).addColumnModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1091 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1092 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1093 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1094 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1095 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1096 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1097 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1098 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1099 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1100 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1101 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1102 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1103 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1104 |
case EventID.DOCUMENT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1105 |
// Look for components which support the getDocument method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1106 |
// (e.g. JTextComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1107 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1108 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1109 |
getDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1110 |
"getDocument", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1111 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1112 |
Object o = getDocumentMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1113 |
if (o != null && o instanceof Document) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1114 |
((Document) o).removeDocumentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1115 |
((Document) o).addDocumentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1116 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1117 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1118 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1119 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1120 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1123 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1124 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1125 |
System.out.println("Exception: " + e.toString()); |
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 |
// Look for components which support Document listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1129 |
// (no current example) |
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 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1132 |
removeDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1133 |
"removeDocumentListener", documentListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1134 |
addDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1135 |
"addDocumentListener", documentListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1136 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1137 |
removeDocumentMethod.invoke(c, documentArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1138 |
addDocumentMethod.invoke(c, documentArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1139 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1140 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1141 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1142 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1145 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1146 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1147 |
System.out.println("Exception: " + e.toString()); |
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 |
// Add the monitor as a PropertyChangeListener for document |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1150 |
// change events from text components. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1151 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1152 |
if (c instanceof JTextComponent) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1153 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1154 |
removePropertyChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1155 |
"removePropertyChangeListener", |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1156 |
propertyChangeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1157 |
addPropertyChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1158 |
"addPropertyChangeListener", |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1159 |
propertyChangeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1160 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1161 |
removePropertyChangeMethod.invoke(c, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1162 |
propertyChangeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1163 |
addPropertyChangeMethod.invoke(c, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1164 |
propertyChangeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1165 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1166 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1167 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1168 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1171 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1172 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1173 |
System.out.println("Exception: " + e.toString()); |
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 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1176 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1177 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1178 |
case EventID.LISTDATA: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1179 |
case EventID.TABLEMODEL: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1180 |
case EventID.TREEMODEL: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1181 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1182 |
getModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1183 |
"getModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1184 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1185 |
Object o = getModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1186 |
if (o != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1187 |
if (eventID == EventID.LISTDATA && |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1188 |
o instanceof ListModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1189 |
((ListModel) o).removeListDataListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1190 |
((ListModel) o).addListDataListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1191 |
} else if (eventID == EventID.TABLEMODEL && |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1192 |
o instanceof TableModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1193 |
((TableModel) o).removeTableModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1194 |
((TableModel) o).addTableModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1195 |
} else if ( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1196 |
o instanceof TreeModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1197 |
((TreeModel) o).removeTreeModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1198 |
((TreeModel) o).addTreeModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1199 |
} |
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 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1202 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1203 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1204 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1207 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1208 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1209 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1210 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1211 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1212 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1213 |
case EventID.LISTSELECTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1214 |
// Look for components which support ListSelectionListeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1215 |
// (e.g. JList) |
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 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1218 |
removeListSelectionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1219 |
"removeListSelectionListener", listSelectionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1220 |
addListSelectionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1221 |
"addListSelectionListener", listSelectionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1222 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1223 |
removeListSelectionMethod.invoke(c, listSelectionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1224 |
addListSelectionMethod.invoke(c, listSelectionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1225 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1226 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1227 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1228 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1229 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1230 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1231 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1232 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1233 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1234 |
} |
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 |
// Look for selection models which support ListSelectionListeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1237 |
// (e.g. JTable's selection model) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1238 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1239 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1240 |
getSelectionModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1241 |
"getSelectionModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1242 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1243 |
Object o = getSelectionModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1244 |
if (o != null && o instanceof ListSelectionModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1245 |
((ListSelectionModel) o).removeListSelectionListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1246 |
((ListSelectionModel) o).addListSelectionListener(this); |
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 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1249 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1250 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1251 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1254 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1255 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1256 |
System.out.println("Exception: " + e.toString()); |
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 |
break; |
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 |
case EventID.MENU: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1261 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1262 |
removeMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1263 |
"removeMenuListener", menuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1264 |
addMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1265 |
"addMenuListener", menuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1266 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1267 |
removeMenuMethod.invoke(c, menuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1268 |
addMenuMethod.invoke(c, menuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1269 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1270 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1271 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1272 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1275 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1276 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1277 |
System.out.println("Exception: " + e.toString()); |
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 |
break; |
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 |
case EventID.POPUPMENU: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1282 |
// Look for components which support PopupMenuListeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1283 |
// (e.g. JPopupMenu) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1284 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1285 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1286 |
removePopupMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1287 |
"removePopupMenuListener", popupMenuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1288 |
addPopupMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1289 |
"addPopupMenuListener", popupMenuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1290 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1291 |
removePopupMenuMethod.invoke(c, popupMenuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1292 |
addPopupMenuMethod.invoke(c, popupMenuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1293 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1294 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1295 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1296 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1297 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1298 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1299 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1300 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1301 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1302 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1303 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1304 |
// Look for components which support getPopupMenu |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1305 |
// (e.g. JMenu) |
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 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1308 |
getPopupMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1309 |
"getPopupMenu", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1310 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1311 |
Object o = getPopupMenuMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1312 |
if (o != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1313 |
removePopupMenuMethod = o.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1314 |
"removePopupMenuListener", popupMenuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1315 |
addPopupMenuMethod = o.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1316 |
"addPopupMenuListener", popupMenuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1317 |
removePopupMenuMethod.invoke(o, popupMenuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1318 |
addPopupMenuMethod.invoke(o, popupMenuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1319 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1320 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1321 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1322 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1323 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1324 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1325 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1326 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1327 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1328 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1329 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1330 |
break; |
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 |
case EventID.TREEEXPANSION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1333 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1334 |
removeTreeExpansionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1335 |
"removeTreeExpansionListener", treeExpansionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1336 |
addTreeExpansionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1337 |
"addTreeExpansionListener", treeExpansionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1338 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1339 |
removeTreeExpansionMethod.invoke(c, treeExpansionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1340 |
addTreeExpansionMethod.invoke(c, treeExpansionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1341 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1342 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1343 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1344 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1345 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1346 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1347 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1348 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1349 |
System.out.println("Exception: " + e.toString()); |
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 |
break; |
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 |
case EventID.TREESELECTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1354 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1355 |
removeTreeSelectionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1356 |
"removeTreeSelectionListener", treeSelectionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1357 |
addTreeSelectionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1358 |
"addTreeSelectionListener", treeSelectionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1359 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1360 |
removeTreeSelectionMethod.invoke(c, treeSelectionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1361 |
addTreeSelectionMethod.invoke(c, treeSelectionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1362 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1363 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1364 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1365 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1368 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1369 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1370 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1371 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1372 |
break; |
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 |
case EventID.UNDOABLEEDIT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1375 |
// Look for components which support the getDocument method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1376 |
// (e.g. JTextComponent) |
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 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1379 |
getDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1380 |
"getDocument", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1381 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1382 |
Object o = getDocumentMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1383 |
if (o != null && o instanceof Document) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1384 |
((Document) o).removeUndoableEditListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1385 |
((Document) o).addUndoableEditListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1386 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1387 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1388 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1389 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1390 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1391 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1392 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1393 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1394 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1395 |
System.out.println("Exception: " + e.toString()); |
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 |
// Look for components which support UndoableEdit listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1399 |
// (no current example) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1400 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1401 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1402 |
removeUndoableEditMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1403 |
"removeUndoableEditListener", undoableEditListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1404 |
addUndoableEditMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1405 |
"addUndoableEditListener", undoableEditListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1406 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1407 |
removeUndoableEditMethod.invoke(c, undoableEditArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1408 |
addUndoableEditMethod.invoke(c, undoableEditArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1409 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1410 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1411 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1412 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1413 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1414 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1415 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1416 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1417 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1418 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1419 |
break; |
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 |
case EventID.INTERNALFRAME: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1422 |
// Look for components which support InternalFrame listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1423 |
// (e.g. JInternalFrame) |
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 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1426 |
removeInternalFrameMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1427 |
"removeInternalFrameListener", internalFrameListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1428 |
addInternalFrameMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1429 |
"addInternalFrameListener", internalFrameListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1430 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1431 |
removeInternalFrameMethod.invoke(c, internalFrameArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1432 |
addInternalFrameMethod.invoke(c, internalFrameArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1433 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1434 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1435 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1436 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1437 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1438 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1439 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1440 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1441 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1442 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1443 |
break; |
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 |
case EventID.PROPERTYCHANGE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1446 |
// Look for components which support PropertyChange listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1447 |
// (e.g. JComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1448 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1449 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1450 |
removePropertyChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1451 |
"removePropertyChangeListener", propertyChangeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1452 |
addPropertyChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1453 |
"addPropertyChangeListener", propertyChangeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1454 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1455 |
removePropertyChangeMethod.invoke(c, propertyChangeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1456 |
addPropertyChangeMethod.invoke(c, propertyChangeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1457 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1458 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1459 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1460 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1461 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1462 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1463 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1464 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1465 |
System.out.println("Exception: " + e.toString()); |
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 |
// Look for components which support the getSelectionModel method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1469 |
// (e.g. JTextComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1470 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1471 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1472 |
getSelectionModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1473 |
"getSelectionModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1474 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1475 |
Object o = getSelectionModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1476 |
if (o != null && o instanceof TreeSelectionModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1477 |
((TreeSelectionModel) o).removePropertyChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1478 |
((TreeSelectionModel) o).addPropertyChangeListener(this); |
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 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1481 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1482 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1483 |
System.out.println("Exception: " + e.toString()); |
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 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1486 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1487 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1488 |
System.out.println("Exception: " + e.toString()); |
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 |
break; |
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 |
case EventID.VETOABLECHANGE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1493 |
if (c instanceof JComponent) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1494 |
((JComponent) c).removeVetoableChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1495 |
((JComponent) c).addVetoableChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1496 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1497 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1498 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1499 |
// 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
|
1500 |
// accomplish anything. |
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 |
default: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1503 |
return; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1504 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1505 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1506 |
if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1507 |
int count = ((Container) c).getComponentCount(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1508 |
for (int i = 0; i < count; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1509 |
installListeners(((Container) c).getComponent(i), eventID); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1510 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1511 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1512 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1513 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1514 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1515 |
* 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
|
1516 |
* @param c the component |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1517 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1518 |
protected void removeListeners(Component c) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1519 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1520 |
// conditionaly remove the Swing listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1521 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1522 |
if (SwingEventMonitor.listenerList.getListenerCount(AncestorListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1523 |
removeListeners(c,EventID.ANCESTOR); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1524 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1525 |
if (SwingEventMonitor.listenerList.getListenerCount(CaretListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1526 |
removeListeners(c,EventID.CARET); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1527 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1528 |
if (SwingEventMonitor.listenerList.getListenerCount(CellEditorListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1529 |
removeListeners(c,EventID.CELLEDITOR); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1530 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1531 |
if (SwingEventMonitor.listenerList.getListenerCount(ChangeListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1532 |
removeListeners(c,EventID.CHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1533 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1534 |
if (SwingEventMonitor.listenerList.getListenerCount(TableColumnModelListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1535 |
removeListeners(c,EventID.COLUMNMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1536 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1537 |
if (SwingEventMonitor.listenerList.getListenerCount(DocumentListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1538 |
removeListeners(c,EventID.DOCUMENT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1539 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1540 |
if (SwingEventMonitor.listenerList.getListenerCount(ListDataListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1541 |
removeListeners(c,EventID.LISTDATA); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1542 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1543 |
if (SwingEventMonitor.listenerList.getListenerCount(ListSelectionListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1544 |
removeListeners(c,EventID.LISTSELECTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1545 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1546 |
if (SwingEventMonitor.listenerList.getListenerCount(MenuListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1547 |
removeListeners(c,EventID.MENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1548 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1549 |
if (SwingEventMonitor.listenerList.getListenerCount(PopupMenuListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1550 |
removeListeners(c,EventID.POPUPMENU); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1551 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1552 |
if (SwingEventMonitor.listenerList.getListenerCount(TableModelListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1553 |
removeListeners(c,EventID.TABLEMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1554 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1555 |
if (SwingEventMonitor.listenerList.getListenerCount(TreeExpansionListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1556 |
removeListeners(c,EventID.TREEEXPANSION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1557 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1558 |
if (SwingEventMonitor.listenerList.getListenerCount(TreeModelListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1559 |
removeListeners(c,EventID.TREEMODEL); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1560 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1561 |
if (SwingEventMonitor.listenerList.getListenerCount(TreeSelectionListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1562 |
removeListeners(c,EventID.TREESELECTION); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1563 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1564 |
if (SwingEventMonitor.listenerList.getListenerCount(UndoableEditListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1565 |
removeListeners(c,EventID.UNDOABLEEDIT); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1566 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1567 |
if (SwingEventMonitor.listenerList.getListenerCount(InternalFrameListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1568 |
removeListeners(c,EventID.INTERNALFRAME); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1569 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1570 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1571 |
// conditionaly remove the beans listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1572 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1573 |
if (SwingEventMonitor.listenerList.getListenerCount(PropertyChangeListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1574 |
removeListeners(c,EventID.PROPERTYCHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1575 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1576 |
if (SwingEventMonitor.listenerList.getListenerCount(VetoableChangeListener.class) > 0) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1577 |
removeListeners(c,EventID.VETOABLECHANGE); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1578 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1579 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1580 |
// Now remove the AWT listeners if needed. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1581 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1582 |
super.removeListeners(c); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1583 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1584 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1585 |
/** |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1586 |
* Removes all Swing listeners for the event ID from the component and |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1587 |
* all of its children. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1588 |
* @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
|
1589 |
*/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1590 |
protected void removeListeners(Component c, int eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1591 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1592 |
// 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
|
1593 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1594 |
switch (eventID) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1595 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1596 |
case EventID.CONTAINER: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1597 |
//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
|
1598 |
// for our own use. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1599 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1600 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1601 |
case EventID.ANCESTOR: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1602 |
if (c instanceof JComponent) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1603 |
((JComponent) c).removeAncestorListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1604 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1605 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1606 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1607 |
case EventID.CARET: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1608 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1609 |
removeCaretMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1610 |
"removeCaretListener", caretListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1611 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1612 |
removeCaretMethod.invoke(c, caretArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1613 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1614 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1615 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1616 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1617 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1618 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1619 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1620 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1621 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1622 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1623 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1624 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1625 |
case EventID.CELLEDITOR: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1626 |
// Look for components which support the getCellEditor method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1627 |
// (e.g. JTable, JTree) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1628 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1629 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1630 |
getCellEditorMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1631 |
"getCellEditorMethod", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1632 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1633 |
Object o = getCellEditorMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1634 |
if (o != null && o instanceof CellEditor) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1635 |
((CellEditor) o).removeCellEditorListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1636 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1637 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1638 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1639 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1640 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1641 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1642 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1643 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1644 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1645 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1646 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1647 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1648 |
// Look for components which support CellEditor listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1649 |
// (no current example) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1650 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1651 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1652 |
removeCellEditorMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1653 |
"removeCellEditorListener", cellEditorListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1654 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1655 |
removeCellEditorMethod.invoke(c, cellEditorArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1656 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1657 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1658 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1659 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1660 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1661 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1662 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1663 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1664 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1665 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1666 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1667 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1668 |
case EventID.CHANGE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1669 |
// [[[FIXME: Need to add support for Style, StyleContext -pk ]]] |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1670 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1671 |
// Look for components which support Change listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1672 |
// (e.g. AbstractButton, Caret, JProgressBar, JSlider, |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1673 |
// JTabbedpane, JTextComponent, JViewport) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1674 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1675 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1676 |
removeChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1677 |
"removeChangeListener", changeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1678 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1679 |
removeChangeMethod.invoke(c, changeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1680 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1681 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1682 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1683 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1684 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1685 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1686 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1687 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1688 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1689 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1690 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1691 |
// Look for components which support the getModel method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1692 |
// whose model supports Change listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1693 |
// (e.g. BoundedRangeModel, ButtonModel, SingleSelectionModel) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1694 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1695 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1696 |
getModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1697 |
"getModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1698 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1699 |
Object o = getModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1700 |
if (o != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1701 |
removeChangeMethod = o.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1702 |
"removeChangeListener", changeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1703 |
removeChangeMethod.invoke(o, changeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1704 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1705 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1706 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1707 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1708 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1709 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1710 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1711 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1712 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1713 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1714 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1715 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1716 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1717 |
case EventID.COLUMNMODEL: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1718 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1719 |
getColumnModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1720 |
"getTableColumnModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1721 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1722 |
Object o = getColumnModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1723 |
if (o != null && o instanceof TableColumnModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1724 |
((TableColumnModel) o).removeColumnModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1725 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1726 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1727 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1728 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1729 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1730 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1731 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1732 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1733 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1734 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1735 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1736 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1737 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1738 |
case EventID.DOCUMENT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1739 |
// Look for components which support the getDocument method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1740 |
// (e.g. JTextComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1741 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1742 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1743 |
getDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1744 |
"getDocument", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1745 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1746 |
Object o = getDocumentMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1747 |
if (o != null && o instanceof Document) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1748 |
((Document) o).removeDocumentListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1749 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1750 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1751 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1752 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1753 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1754 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1755 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1756 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1757 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1758 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1759 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1760 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1761 |
// Look for components which support Document listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1762 |
// (no current example) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1763 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1764 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1765 |
removeDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1766 |
"removeDocumentListener", documentListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1767 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1768 |
removeDocumentMethod.invoke(c, documentArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1769 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1770 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1771 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1772 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1773 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1774 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1775 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1776 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1777 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1778 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1779 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1780 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1781 |
case EventID.LISTDATA: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1782 |
case EventID.TABLEMODEL: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1783 |
case EventID.TREEMODEL: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1784 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1785 |
getModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1786 |
"getModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1787 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1788 |
Object o = getModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1789 |
if (o != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1790 |
if (eventID == EventID.LISTDATA && |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1791 |
o instanceof ListModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1792 |
((ListModel) o).removeListDataListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1793 |
} else if (eventID == EventID.TABLEMODEL && |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1794 |
o instanceof TableModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1795 |
((TableModel) o).removeTableModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1796 |
} else if ( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1797 |
o instanceof TreeModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1798 |
((TreeModel) o).removeTreeModelListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1799 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1800 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1801 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1802 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1803 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1804 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1805 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1806 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1807 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1808 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1809 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1810 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1811 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1812 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1813 |
case EventID.LISTSELECTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1814 |
// Look for components which support ListSelectionListeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1815 |
// (e.g. JList) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1816 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1817 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1818 |
removeListSelectionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1819 |
"removeListSelectionListener", listSelectionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1820 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1821 |
removeListSelectionMethod.invoke(c, listSelectionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1822 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1823 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1824 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1825 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1826 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1827 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1828 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1829 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1830 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1831 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1832 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1833 |
// Look for selection models which support |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1834 |
// ListSelectionListeners (e.g. JTable's selection model) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1835 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1836 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1837 |
getSelectionModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1838 |
"getSelectionModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1839 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1840 |
Object o = getSelectionModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1841 |
if (o != null && o instanceof ListSelectionModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1842 |
((ListSelectionModel) o).removeListSelectionListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1843 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1844 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1845 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1846 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1847 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1848 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1849 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1850 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1851 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1852 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1853 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1854 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1855 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1856 |
case EventID.MENU: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1857 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1858 |
removeMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1859 |
"removeMenuListener", menuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1860 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1861 |
removeMenuMethod.invoke(c, menuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1862 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1863 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1864 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1865 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1866 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1867 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1868 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1869 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1870 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1871 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1872 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1873 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1874 |
case EventID.POPUPMENU: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1875 |
// Look for components which support PopupMenuListeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1876 |
// (e.g. JPopupMenu) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1877 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1878 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1879 |
removePopupMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1880 |
"removePopupMenuListener", popupMenuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1881 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1882 |
removePopupMenuMethod.invoke(c, popupMenuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1883 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1884 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1885 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1886 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1887 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1888 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1889 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1890 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1891 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1892 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1893 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1894 |
// Look for components which support getPopupMenu |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1895 |
// (e.g. JMenu) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1896 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1897 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1898 |
getPopupMenuMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1899 |
"getPopupMenu", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1900 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1901 |
Object o = getPopupMenuMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1902 |
if (o != null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1903 |
removePopupMenuMethod = o.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1904 |
"removePopupMenuListener", popupMenuListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1905 |
removePopupMenuMethod.invoke(o, popupMenuArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1906 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1907 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1908 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1909 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1910 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1911 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1912 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1913 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1914 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1915 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1916 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1917 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1918 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1919 |
case EventID.TREEEXPANSION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1920 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1921 |
removeTreeExpansionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1922 |
"removeTreeExpansionListener", treeExpansionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1923 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1924 |
removeTreeExpansionMethod.invoke(c, treeExpansionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1925 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1926 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1927 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1928 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1929 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1930 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1931 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1932 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1933 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1934 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1935 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1936 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1937 |
case EventID.TREESELECTION: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1938 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1939 |
removeTreeSelectionMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1940 |
"removeTreeSelectionListener", treeSelectionListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1941 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1942 |
removeTreeSelectionMethod.invoke(c, treeSelectionArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1943 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1944 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1945 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1946 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1947 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1948 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1949 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1950 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1951 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1952 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1953 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1954 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1955 |
case EventID.UNDOABLEEDIT: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1956 |
// Look for components which support the getDocument method |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1957 |
// (e.g. JTextComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1958 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1959 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1960 |
getDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1961 |
"getDocument", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1962 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1963 |
Object o = getDocumentMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1964 |
if (o != null && o instanceof Document) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1965 |
((Document) o).removeUndoableEditListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1966 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1967 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1968 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1969 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1970 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1971 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1972 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1973 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1974 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1975 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1976 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1977 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1978 |
// Look for components which support UndoableEdit listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1979 |
// (no current example) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1980 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1981 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1982 |
removeUndoableEditMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1983 |
"removeUndoableEditListener", undoableEditListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1984 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1985 |
removeUndoableEditMethod.invoke(c, undoableEditArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1986 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1987 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1988 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1989 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1990 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1991 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1992 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1993 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1994 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1995 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1996 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1997 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1998 |
case EventID.INTERNALFRAME: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
1999 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2000 |
removeInternalFrameMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2001 |
"removeInternalFrameListener", internalFrameListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2002 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2003 |
removeInternalFrameMethod.invoke(c, internalFrameArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2004 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2005 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2006 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2007 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2008 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2009 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2010 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2011 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2012 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2013 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2014 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2015 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2016 |
case EventID.PROPERTYCHANGE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2017 |
// Look for components which support PropertyChange listeners |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2018 |
// (e.g. JComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2019 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2020 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2021 |
removePropertyChangeMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2022 |
"removePropertyChangeListener", propertyChangeListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2023 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2024 |
removePropertyChangeMethod.invoke(c, propertyChangeArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2025 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2026 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2027 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2028 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2029 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2030 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2031 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2032 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2033 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2034 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2035 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2036 |
// Look for components which support the getSelectionModel |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2037 |
// method (e.g. JTextComponent) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2038 |
// |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2039 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2040 |
getSelectionModelMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2041 |
"getSelectionModel", nullClass); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2042 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2043 |
Object o = getSelectionModelMethod.invoke(c, nullArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2044 |
if (o != null && o instanceof TreeSelectionModel) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2045 |
((TreeSelectionModel) o).removePropertyChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2046 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2047 |
} catch (java.lang.reflect.InvocationTargetException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2048 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2049 |
} catch (IllegalAccessException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2050 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2051 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2052 |
} catch (NoSuchMethodException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2053 |
// System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2054 |
} catch (SecurityException e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2055 |
System.out.println("Exception: " + e.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2056 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2057 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2058 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2059 |
case EventID.VETOABLECHANGE: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2060 |
if (c instanceof JComponent) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2061 |
((JComponent) c).removeVetoableChangeListener(this); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2062 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2063 |
break; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2064 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2065 |
default: |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2066 |
return; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2067 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2068 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2069 |
if (c instanceof Container) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2070 |
int count = ((Container) c).getComponentCount(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2071 |
for (int i = 0; i < count; i++) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2072 |
removeListeners(((Container) c).getComponent(i), eventID); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2073 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2074 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2075 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2076 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2077 |
/********************************************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2078 |
/* */ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2079 |
/* Listener Interface Methods */ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2080 |
/* */ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2081 |
/********************************************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2082 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2083 |
/* ContainerListener Methods ************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2084 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2085 |
public void componentAdded(ContainerEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2086 |
installListeners(e.getChild()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2087 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2088 |
public void componentRemoved(ContainerEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2089 |
removeListeners(e.getChild()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2090 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2091 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2092 |
/* AncestorListener Methods ******************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2093 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2094 |
public void ancestorAdded(AncestorEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2095 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2096 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2097 |
if (listeners[i]==AncestorListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2098 |
((AncestorListener)listeners[i+1]).ancestorAdded(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2099 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2100 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2101 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2102 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2103 |
public void ancestorRemoved(AncestorEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2104 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2105 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2106 |
if (listeners[i]==AncestorListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2107 |
((AncestorListener)listeners[i+1]).ancestorRemoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2108 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2109 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2110 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2111 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2112 |
public void ancestorMoved(AncestorEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2113 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2114 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2115 |
if (listeners[i]==AncestorListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2116 |
((AncestorListener)listeners[i+1]).ancestorMoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2117 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2118 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2119 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2120 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2121 |
/* CaretListener Methods ******************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2122 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2123 |
public void caretUpdate(CaretEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2124 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2125 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2126 |
if (listeners[i]==CaretListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2127 |
((CaretListener)listeners[i+1]).caretUpdate(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2128 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2129 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2130 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2131 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2132 |
/* CellEditorListener Methods *****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2133 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2134 |
public void editingStopped(ChangeEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2135 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2136 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2137 |
if (listeners[i]==CellEditorListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2138 |
((CellEditorListener)listeners[i+1]).editingStopped(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2139 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2140 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2141 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2142 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2143 |
public void editingCanceled(ChangeEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2144 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2145 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2146 |
if (listeners[i]==CellEditorListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2147 |
((CellEditorListener)listeners[i+1]).editingCanceled(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2148 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2149 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2150 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2151 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2152 |
/* ChangeListener Methods *****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2153 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2154 |
public void stateChanged(ChangeEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2155 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2156 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2157 |
if (listeners[i]==ChangeListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2158 |
((ChangeListener)listeners[i+1]).stateChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2159 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2160 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2161 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2162 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2163 |
/* TableColumnModelListener Methods *******************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2164 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2165 |
public void columnAdded(TableColumnModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2166 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2167 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2168 |
if (listeners[i]==TableColumnModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2169 |
((TableColumnModelListener)listeners[i+1]).columnAdded(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2170 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2171 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2172 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2173 |
public void columnMarginChanged(ChangeEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2174 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2175 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2176 |
if (listeners[i]==TableColumnModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2177 |
((TableColumnModelListener)listeners[i+1]).columnMarginChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2178 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2179 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2180 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2181 |
public void columnMoved(TableColumnModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2182 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2183 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2184 |
if (listeners[i]==TableColumnModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2185 |
((TableColumnModelListener)listeners[i+1]).columnMoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2186 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2187 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2188 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2189 |
public void columnRemoved(TableColumnModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2190 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2191 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2192 |
if (listeners[i]==TableColumnModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2193 |
((TableColumnModelListener)listeners[i+1]).columnRemoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2194 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2195 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2196 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2197 |
public void columnSelectionChanged(ListSelectionEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2198 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2199 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2200 |
if (listeners[i]==TableColumnModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2201 |
((TableColumnModelListener)listeners[i+1]).columnSelectionChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2202 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2203 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2204 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2205 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2206 |
/* DocumentListener Methods **************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2207 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2208 |
public void changedUpdate(DocumentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2209 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2210 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2211 |
if (listeners[i]==DocumentListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2212 |
((DocumentListener)listeners[i+1]).changedUpdate(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2213 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2214 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2215 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2216 |
public void insertUpdate(DocumentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2217 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2218 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2219 |
if (listeners[i]==DocumentListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2220 |
((DocumentListener)listeners[i+1]).insertUpdate(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2221 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2222 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2223 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2224 |
public void removeUpdate(DocumentEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2225 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2226 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2227 |
if (listeners[i]==DocumentListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2228 |
((DocumentListener)listeners[i+1]).removeUpdate(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2229 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2230 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2231 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2232 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2233 |
/* ListDataListener Methods *****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2234 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2235 |
public void contentsChanged(ListDataEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2236 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2237 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2238 |
if (listeners[i]==ListDataListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2239 |
((ListDataListener)listeners[i+1]).contentsChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2240 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2241 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2242 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2243 |
public void intervalAdded(ListDataEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2244 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2245 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2246 |
if (listeners[i]==ListDataListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2247 |
((ListDataListener)listeners[i+1]).intervalAdded(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2248 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2249 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2250 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2251 |
public void intervalRemoved(ListDataEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2252 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2253 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2254 |
if (listeners[i]==ListDataListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2255 |
((ListDataListener)listeners[i+1]).intervalRemoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2256 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2257 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2258 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2259 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2260 |
/* ListSelectionListener Methods ***********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2261 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2262 |
public void valueChanged(ListSelectionEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2263 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2264 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2265 |
if (listeners[i]==ListSelectionListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2266 |
((ListSelectionListener)listeners[i+1]).valueChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2267 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2268 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2269 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2270 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2271 |
/* MenuListener Methods *****************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2272 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2273 |
public void menuCanceled(MenuEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2274 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2275 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2276 |
if (listeners[i]==MenuListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2277 |
((MenuListener)listeners[i+1]).menuCanceled(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2278 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2279 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2280 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2281 |
public void menuDeselected(MenuEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2282 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2283 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2284 |
if (listeners[i]==MenuListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2285 |
((MenuListener)listeners[i+1]).menuDeselected(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2286 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2287 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2288 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2289 |
public void menuSelected(MenuEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2290 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2291 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2292 |
if (listeners[i]==MenuListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2293 |
((MenuListener)listeners[i+1]).menuSelected(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2294 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2295 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2296 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2297 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2298 |
/* PopupMenuListener Methods **************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2299 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2300 |
public void popupMenuWillBecomeVisible(PopupMenuEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2301 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2302 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2303 |
if (listeners[i]==PopupMenuListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2304 |
((PopupMenuListener)listeners[i+1]).popupMenuWillBecomeVisible(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2305 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2306 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2307 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2308 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2309 |
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2310 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2311 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2312 |
if (listeners[i]==PopupMenuListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2313 |
((PopupMenuListener)listeners[i+1]).popupMenuWillBecomeInvisible(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2314 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2315 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2316 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2317 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2318 |
public void popupMenuCanceled(PopupMenuEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2319 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2320 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2321 |
if (listeners[i]==PopupMenuListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2322 |
((PopupMenuListener)listeners[i+1]).popupMenuCanceled(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2323 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2324 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2325 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2326 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2327 |
/* TableModelListener Methods **************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2328 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2329 |
public void tableChanged(TableModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2330 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2331 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2332 |
if (listeners[i]==TableModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2333 |
((TableModelListener)listeners[i+1]).tableChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2334 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2335 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2336 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2337 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2338 |
/* TreeExpansionListener Methods **********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2339 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2340 |
public void treeCollapsed(TreeExpansionEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2341 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2342 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2343 |
if (listeners[i]==TreeExpansionListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2344 |
((TreeExpansionListener)listeners[i+1]).treeCollapsed(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2345 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2346 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2347 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2348 |
public void treeExpanded(TreeExpansionEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2349 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2350 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2351 |
if (listeners[i]==TreeExpansionListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2352 |
((TreeExpansionListener)listeners[i+1]).treeExpanded(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2353 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2354 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2355 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2356 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2357 |
/* TreeModelListener Methods **********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2358 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2359 |
public void treeNodesChanged(TreeModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2360 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2361 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2362 |
if (listeners[i]==TreeModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2363 |
((TreeModelListener)listeners[i+1]).treeNodesChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2364 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2365 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2366 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2367 |
public void treeNodesInserted(TreeModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2368 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2369 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2370 |
if (listeners[i]==TreeModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2371 |
((TreeModelListener)listeners[i+1]).treeNodesInserted(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2372 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2373 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2374 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2375 |
public void treeNodesRemoved(TreeModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2376 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2377 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2378 |
if (listeners[i]==TreeModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2379 |
((TreeModelListener)listeners[i+1]).treeNodesRemoved(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2380 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2381 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2382 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2383 |
public void treeStructureChanged(TreeModelEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2384 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2385 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2386 |
if (listeners[i]==TreeModelListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2387 |
((TreeModelListener)listeners[i+1]).treeStructureChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2388 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2389 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2390 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2391 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2392 |
/* TreeSelectionListener Methods ***********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2393 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2394 |
public void valueChanged(TreeSelectionEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2395 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2396 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2397 |
if (listeners[i]==TreeSelectionListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2398 |
((TreeSelectionListener)listeners[i+1]).valueChanged(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2399 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2400 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2401 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2402 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2403 |
/* UndoableEditListener Methods **************************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2404 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2405 |
public void undoableEditHappened(UndoableEditEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2406 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2407 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2408 |
if (listeners[i]==UndoableEditListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2409 |
((UndoableEditListener)listeners[i+1]).undoableEditHappened(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2410 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2411 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2412 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2413 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2414 |
/* InternalFrame Methods **********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2415 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2416 |
public void internalFrameOpened(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2417 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2418 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2419 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2420 |
((InternalFrameListener)listeners[i+1]).internalFrameOpened(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2421 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2422 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2423 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2424 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2425 |
public void internalFrameActivated(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2426 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2427 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2428 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2429 |
((InternalFrameListener)listeners[i+1]).internalFrameActivated(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2430 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2431 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2432 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2433 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2434 |
public void internalFrameDeactivated(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2435 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2436 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2437 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2438 |
((InternalFrameListener)listeners[i+1]).internalFrameDeactivated(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2439 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2440 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2441 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2442 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2443 |
public void internalFrameIconified(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2444 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2445 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2446 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2447 |
((InternalFrameListener)listeners[i+1]).internalFrameIconified(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2448 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2449 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2450 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2451 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2452 |
public void internalFrameDeiconified(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2453 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2454 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2455 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2456 |
((InternalFrameListener)listeners[i+1]).internalFrameDeiconified(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2457 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2458 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2459 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2460 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2461 |
public void internalFrameClosing(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2462 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2463 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2464 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2465 |
((InternalFrameListener)listeners[i+1]).internalFrameClosing(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2466 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2467 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2468 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2469 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2470 |
public void internalFrameClosed(InternalFrameEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2471 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2472 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2473 |
if (listeners[i]==InternalFrameListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2474 |
((InternalFrameListener)listeners[i+1]).internalFrameClosed(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2475 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2476 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2477 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2478 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2479 |
/* PropertyChangeListener Methods **********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2480 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2481 |
public void propertyChange(PropertyChangeEvent e) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2482 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2483 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2484 |
if (listeners[i]==PropertyChangeListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2485 |
((PropertyChangeListener)listeners[i+1]).propertyChange(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2486 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2487 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2488 |
// Re-add the monitor as a DocumentChangeListener if |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2489 |
// the document changed in the text component. |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2490 |
if (e.getSource() instanceof JTextComponent) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2491 |
Document c = ((JTextComponent)e.getSource()).getDocument(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2492 |
if (c == null) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2493 |
return; |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2494 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2495 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2496 |
removeDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2497 |
"removeDocumentListener", documentListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2498 |
addDocumentMethod = c.getClass().getMethod( |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2499 |
"addDocumentListener", documentListeners); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2500 |
try { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2501 |
removeDocumentMethod.invoke(c, documentArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2502 |
addDocumentMethod.invoke(c, documentArgs); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2503 |
} catch (java.lang.reflect.InvocationTargetException e2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2504 |
System.out.println("Exception: " + e2.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2505 |
} catch (IllegalAccessException e2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2506 |
System.out.println("Exception: " + e2.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2507 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2508 |
} catch (NoSuchMethodException e2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2509 |
// System.out.println("Exception: " + e2.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2510 |
} catch (SecurityException e2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2511 |
System.out.println("Exception: " + e2.toString()); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2512 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2513 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2514 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2515 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2516 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2517 |
/* VetoableChangeListener Methods **********************************/ |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2518 |
|
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2519 |
public void vetoableChange(PropertyChangeEvent e) |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2520 |
throws PropertyVetoException { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2521 |
Object[] listeners = SwingEventMonitor.listenerList.getListenerList(); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2522 |
for (int i = listeners.length-2; i>=0; i-=2) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2523 |
if (listeners[i]==VetoableChangeListener.class) { |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2524 |
((VetoableChangeListener)listeners[i+1]).vetoableChange(e); |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2525 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2526 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2527 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2528 |
} |
e02d168adbc6
8076182: Open Source Java Access Bridge - Create Patch for JEP C127 8055831
ptbrunet
parents:
diff
changeset
|
2529 |
} |