6b796d0297e1cb6de540feeb27e8b9d269808640
[jalviewjs.git] / site / j2s / jssun / awt / ModalityEvent.js
1 Clazz.declarePackage ("jssun.awt");
2 Clazz.load (["java.awt.AWTEvent", "$.ActiveEvent"], "jssun.awt.ModalityEvent", ["java.lang.Error"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.listener = null;
5 Clazz.instantialize (this, arguments);
6 }, jssun.awt, "ModalityEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
7 Clazz.makeConstructor (c$, 
8 function (source, listener, id) {
9 Clazz.superConstructor (this, jssun.awt.ModalityEvent, [source, id]);
10 this.listener = listener;
11 }, "~O,jssun.awt.ModalityListener,~N");
12 Clazz.overrideMethod (c$, "dispatch", 
13 function () {
14 switch (this.getID ()) {
15 case 1300:
16 this.listener.modalityPushed (this);
17 break;
18 case 1301:
19 this.listener.modalityPopped (this);
20 break;
21 default:
22 throw  new Error ("Invalid event id.");
23 }
24 });
25 Clazz.defineStatics (c$,
26 "MODALITY_PUSHED", 1300,
27 "MODALITY_POPPED", 1301);
28 });