d758a88d087994c7c47ad5a842a92314031c119b
[jalviewjs.git] / site / swingjs / j2s / javax / swing / ActionPropertyChangeListener.js
1 Clazz.declarePackage ("javax.swing");
2 Clazz.load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.action = null;
5 Clazz.instantialize (this, arguments);
6 }, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener);
7 Clazz.makeConstructor (c$, 
8 function (c, a) {
9 this.setTarget (c);
10 this.action = a;
11 }, "~O,javax.swing.Action");
12 Clazz.overrideMethod (c$, "propertyChange", 
13 function (e) {
14 var target = this.getTarget ();
15 if (target == null) {
16 this.getAction ().removePropertyChangeListener (this);
17 } else {
18 this.actionPropertyChanged (target, this.getAction (), e);
19 }}, "java.beans.PropertyChangeEvent");
20 Clazz.defineMethod (c$, "setTarget", 
21  function (c) {
22 }, "~O");
23 Clazz.defineMethod (c$, "getTarget", 
24 function () {
25 return null;
26 });
27 Clazz.defineMethod (c$, "getAction", 
28 function () {
29 return this.action;
30 });
31 });