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