JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / java / awt / SentEvent.js
1 Clazz.declarePackage ("java.awt");\r
2 Clazz.load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.$dispatched = false;\r
5 this.nested = null;\r
6 this.toNotify = null;\r
7 Clazz.instantialize (this, arguments);\r
8 }, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent);\r
9 Clazz.makeConstructor (c$, \r
10 function () {\r
11 this.construct (null);\r
12 });\r
13 Clazz.makeConstructor (c$, \r
14 function (nested) {\r
15 this.construct (nested, null);\r
16 }, "java.awt.AWTEvent");\r
17 Clazz.makeConstructor (c$, \r
18 function (nested, toNotify) {\r
19 Clazz.superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]);\r
20 this.nested = nested;\r
21 this.toNotify = toNotify;\r
22 }, "java.awt.AWTEvent,jssun.awt.AppContext");\r
23 Clazz.overrideMethod (c$, "dispatch", \r
24 function () {\r
25 try {\r
26 if (this.nested != null) {\r
27 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);\r
28 }} finally {\r
29 this.$dispatched = true;\r
30 if (this.toNotify != null) {\r
31 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());\r
32 }{\r
33 this.notifyAll ();\r
34 }}\r
35 });\r
36 Clazz.defineMethod (c$, "dispose", \r
37 function () {\r
38 this.$dispatched = true;\r
39 if (this.toNotify != null) {\r
40 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());\r
41 }{\r
42 this.notifyAll ();\r
43 }});\r
44 Clazz.defineStatics (c$,\r
45 "ID", 1007);\r
46 });\r