2fb047e7618777b2ac3478ef6b899fd19f494a7e
[jalviewjs.git] / site / j2s / javax / swing / event / SwingPropertyChangeSupport.js
1 Clazz.declarePackage ("javax.swing.event");\r
2 Clazz.load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.notifyOnEDT = false;\r
5 Clazz.instantialize (this, arguments);\r
6 }, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport);\r
7 Clazz.makeConstructor (c$, \r
8 function (sourceBean) {\r
9 this.construct (sourceBean, false);\r
10 }, "~O");\r
11 Clazz.makeConstructor (c$, \r
12 function (sourceBean, notifyOnEDT) {\r
13 Clazz.superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]);\r
14 this.notifyOnEDT = notifyOnEDT;\r
15 }, "~O,~B");\r
16 Clazz.defineMethod (c$, "firePropertyChangeEvt", \r
17 function (evt) {\r
18 if (evt == null) {\r
19 throw  new NullPointerException ();\r
20 }if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) {\r
21 Clazz.superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]);\r
22 } else {\r
23 javax.swing.SwingUtilities.invokeLater (((Clazz.isClassDefined ("javax.swing.event.SwingPropertyChangeSupport$1") ? 0 : javax.swing.event.SwingPropertyChangeSupport.$SwingPropertyChangeSupport$1$ ()), Clazz.innerTypeInstance (javax.swing.event.SwingPropertyChangeSupport$1, this, Clazz.cloneFinals ("evt", evt))));\r
24 }}, "java.beans.PropertyChangeEvent");\r
25 Clazz.defineMethod (c$, "isNotifyOnEDT", \r
26 function () {\r
27 return this.notifyOnEDT;\r
28 });\r
29 c$.$SwingPropertyChangeSupport$1$ = function () {\r
30 Clazz.pu$h(self.c$);\r
31 c$ = Clazz.declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable);\r
32 Clazz.overrideMethod (c$, "run", \r
33 function () {\r
34 this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt);\r
35 });\r
36 c$ = Clazz.p0p ();\r
37 };\r
38 });\r