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