Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / AbstractAction.js
index 383e479..7825171 100644 (file)
-Clazz.declarePackage ("javax.swing");\r
-Clazz.load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.enabled = true;\r
-this.arrayTable = null;\r
-this.changeSupport = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);\r
-c$.shouldReconfigure = Clazz.defineMethod (c$, "shouldReconfigure", \r
-function (e) {\r
-if (e.getPropertyName () == null) {\r
-javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);\r
-}return false;\r
-}, "java.beans.PropertyChangeEvent");\r
-c$.setEnabledFromAction = Clazz.defineMethod (c$, "setEnabledFromAction", \r
-function (c, a) {\r
-c.setEnabled ((a != null) ? a.isEnabled () : true);\r
-}, "javax.swing.JComponent,javax.swing.Action");\r
-c$.setToolTipTextFromAction = Clazz.defineMethod (c$, "setToolTipTextFromAction", \r
-function (c, a) {\r
-c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);\r
-}, "javax.swing.JComponent,javax.swing.Action");\r
-c$.hasSelectedKey = Clazz.defineMethod (c$, "hasSelectedKey", \r
-function (a) {\r
-return (a != null && a.getValue ("SwingSelectedKey") != null);\r
-}, "javax.swing.Action");\r
-c$.isSelected = Clazz.defineMethod (c$, "isSelected", \r
-function (a) {\r
-return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));\r
-}, "javax.swing.Action");\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (name) {\r
-this.putValue ("Name", name);\r
-}, "~S");\r
-Clazz.makeConstructor (c$, \r
-function (name, icon) {\r
-this.construct (name);\r
-this.putValue ("SmallIcon", icon);\r
-}, "~S,javax.swing.Icon");\r
-Clazz.defineMethod (c$, "getValue", \r
-function (key) {\r
-if (key === "enabled") {\r
-return this.enabled;\r
-}if (this.arrayTable == null) {\r
-return null;\r
-}return this.arrayTable.get (key);\r
-}, "~S");\r
-Clazz.overrideMethod (c$, "putValue", \r
-function (key, newValue) {\r
-var oldValue = null;\r
-if (key === "enabled") {\r
-if (newValue == null || !(Clazz.instanceOf (newValue, Boolean))) {\r
-newValue = new Boolean (false);\r
-}oldValue = new Boolean (this.enabled);\r
-this.enabled = (newValue).booleanValue ();\r
-} else {\r
-if (this.arrayTable == null) {\r
-this.arrayTable =  new javax.swing.ArrayTable ();\r
-}if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);\r
-if (newValue == null) {\r
-this.arrayTable.remove (key);\r
-} else {\r
-this.arrayTable.put (key, newValue);\r
-}}this.firePropertyChange (key, oldValue, newValue);\r
-}, "~S,~O");\r
-Clazz.defineMethod (c$, "isEnabled", \r
-function () {\r
-return this.enabled;\r
-});\r
-Clazz.overrideMethod (c$, "setEnabled", \r
-function (newValue) {\r
-var oldValue = this.enabled;\r
-if (oldValue != newValue) {\r
-this.enabled = newValue;\r
-this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));\r
-}}, "~B");\r
-Clazz.defineMethod (c$, "getKeys", \r
-function () {\r
-if (this.arrayTable == null) {\r
-return null;\r
-}var keys =  new Array (this.arrayTable.size ());\r
-this.arrayTable.getKeys (keys);\r
-return keys;\r
-});\r
-Clazz.defineMethod (c$, "firePropertyChange", \r
-function (propertyName, oldValue, newValue) {\r
-if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {\r
-return;\r
-}this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);\r
-}, "~S,~O,~O");\r
-Clazz.overrideMethod (c$, "addPropertyChangeListener", \r
-function (listener) {\r
-if (this.changeSupport == null) {\r
-this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);\r
-}this.changeSupport.addPropertyChangeListener (listener);\r
-}, "java.beans.PropertyChangeListener");\r
-Clazz.overrideMethod (c$, "removePropertyChangeListener", \r
-function (listener) {\r
-if (this.changeSupport == null) {\r
-return;\r
-}this.changeSupport.removePropertyChangeListener (listener);\r
-}, "java.beans.PropertyChangeListener");\r
-Clazz.defineMethod (c$, "getPropertyChangeListeners", \r
-function () {\r
-if (this.changeSupport == null) {\r
-return  new Array (0);\r
-}return this.changeSupport.getPropertyChangeListeners ();\r
-});\r
-Clazz.defineMethod (c$, "clone", \r
-function () {\r
-var newAction = Clazz.superCall (this, javax.swing.AbstractAction, "clone", []);\r
-{\r
-if (this.arrayTable != null) {\r
-newAction.arrayTable = this.arrayTable.clone ();\r
-}}return newAction;\r
-});\r
-Clazz.defineStatics (c$,\r
-"RECONFIGURE_ON_NULL", null);\r
-});\r
+Clazz.declarePackage ("javax.swing");
+Clazz.load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.enabled = true;
+this.arrayTable = null;
+this.changeSupport = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);
+c$.shouldReconfigure = Clazz.defineMethod (c$, "shouldReconfigure", 
+function (e) {
+if (e.getPropertyName () == null) {
+javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);
+}return false;
+}, "java.beans.PropertyChangeEvent");
+c$.setEnabledFromAction = Clazz.defineMethod (c$, "setEnabledFromAction", 
+function (c, a) {
+c.setEnabled ((a != null) ? a.isEnabled () : true);
+}, "javax.swing.JComponent,javax.swing.Action");
+c$.setToolTipTextFromAction = Clazz.defineMethod (c$, "setToolTipTextFromAction", 
+function (c, a) {
+c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);
+}, "javax.swing.JComponent,javax.swing.Action");
+c$.hasSelectedKey = Clazz.defineMethod (c$, "hasSelectedKey", 
+function (a) {
+return (a != null && a.getValue ("SwingSelectedKey") != null);
+}, "javax.swing.Action");
+c$.isSelected = Clazz.defineMethod (c$, "isSelected", 
+function (a) {
+return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));
+}, "javax.swing.Action");
+Clazz.makeConstructor (c$, 
+function () {
+});
+Clazz.makeConstructor (c$, 
+function (name) {
+this.putValue ("Name", name);
+}, "~S");
+Clazz.makeConstructor (c$, 
+function (name, icon) {
+this.construct (name);
+this.putValue ("SmallIcon", icon);
+}, "~S,javax.swing.Icon");
+Clazz.defineMethod (c$, "getValue", 
+function (key) {
+if (key === "enabled") {
+return this.enabled;
+}if (this.arrayTable == null) {
+return null;
+}return this.arrayTable.get (key);
+}, "~S");
+Clazz.overrideMethod (c$, "putValue", 
+function (key, newValue) {
+var oldValue = null;
+if (key === "enabled") {
+if (newValue == null || !(Clazz.instanceOf (newValue, Boolean))) {
+newValue = new Boolean (false);
+}oldValue = new Boolean (this.enabled);
+this.enabled = (newValue).booleanValue ();
+} else {
+if (this.arrayTable == null) {
+this.arrayTable =  new javax.swing.ArrayTable ();
+}if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);
+if (newValue == null) {
+this.arrayTable.remove (key);
+} else {
+this.arrayTable.put (key, newValue);
+}}this.firePropertyChange (key, oldValue, newValue);
+}, "~S,~O");
+Clazz.defineMethod (c$, "isEnabled", 
+function () {
+return this.enabled;
+});
+Clazz.overrideMethod (c$, "setEnabled", 
+function (newValue) {
+var oldValue = this.enabled;
+if (oldValue != newValue) {
+this.enabled = newValue;
+this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
+}}, "~B");
+Clazz.defineMethod (c$, "getKeys", 
+function () {
+if (this.arrayTable == null) {
+return null;
+}var keys =  new Array (this.arrayTable.size ());
+this.arrayTable.getKeys (keys);
+return keys;
+});
+Clazz.defineMethod (c$, "firePropertyChange", 
+function (propertyName, oldValue, newValue) {
+if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
+return;
+}this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
+}, "~S,~O,~O");
+Clazz.overrideMethod (c$, "addPropertyChangeListener", 
+function (listener) {
+if (this.changeSupport == null) {
+this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
+}this.changeSupport.addPropertyChangeListener (listener);
+}, "java.beans.PropertyChangeListener");
+Clazz.overrideMethod (c$, "removePropertyChangeListener", 
+function (listener) {
+if (this.changeSupport == null) {
+return;
+}this.changeSupport.removePropertyChangeListener (listener);
+}, "java.beans.PropertyChangeListener");
+Clazz.defineMethod (c$, "getPropertyChangeListeners", 
+function () {
+if (this.changeSupport == null) {
+return  new Array (0);
+}return this.changeSupport.getPropertyChangeListeners ();
+});
+Clazz.defineMethod (c$, "clone", 
+function () {
+var newAction = Clazz.superCall (this, javax.swing.AbstractAction, "clone", []);
+{
+if (this.arrayTable != null) {
+newAction.arrayTable = this.arrayTable.clone ();
+}}return newAction;
+});
+Clazz.defineStatics (c$,
+"RECONFIGURE_ON_NULL", null);
+});