90 if (! isNotifyOnEDT()
91 || SwingUtilities.isEventDispatchThread()) {
92 super.firePropertyChange(evt);
93 } else {
94 SwingUtilities.invokeLater(
95 new Runnable() {
96 public void run() {
97 firePropertyChange(evt);
98 }
99 });
100 }
101 }
102
103 /**
104 * Returns {@code notifyOnEDT} property.
105 *
106 * @return {@code notifyOnEDT} property
107 * @see #SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT)
108 * @since 1.6
109 */
110 public final boolean isNotifyOnEDT() {
111 return notifyOnEDT;
112 }
113
114 // Serialization version ID
115 static final long serialVersionUID = 7162625831330845068L;
116
117 /**
118 * whether to notify listeners on EDT
119 *
120 * @serial
121 * @since 1.6
122 */
123 private final boolean notifyOnEDT;
124 }
|
90 if (! isNotifyOnEDT()
91 || SwingUtilities.isEventDispatchThread()) {
92 super.firePropertyChange(evt);
93 } else {
94 SwingUtilities.invokeLater(
95 new Runnable() {
96 public void run() {
97 firePropertyChange(evt);
98 }
99 });
100 }
101 }
102
103 /**
104 * Returns {@code notifyOnEDT} property.
105 *
106 * @return {@code notifyOnEDT} property
107 * @see #SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT)
108 * @since 1.6
109 */
110 public boolean isNotifyOnEDT() {
111 return notifyOnEDT;
112 }
113
114 // Serialization version ID
115 static final long serialVersionUID = 7162625831330845068L;
116
117 /**
118 * whether to notify listeners on EDT
119 *
120 * @serial
121 * @since 1.6
122 */
123 private final boolean notifyOnEDT;
124 }
|