Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / swingjs / plaf / JSButtonUI.js
index cabcf15..fa14ce0 100644 (file)
@@ -1,85 +1,85 @@
-Clazz.declarePackage ("swingjs.plaf");\r
-Clazz.load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.domBtn = null;\r
-this.shiftOffset = 0;\r
-this.defaultTextShiftOffset = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);\r
-Clazz.overrideMethod (c$, "getDOMObject", \r
-function () {\r
-if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);\r
-this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());\r
-return this.domNode;\r
-});\r
-Clazz.defineMethod (c$, "verifyButtonClick", \r
-function (isRelease) {\r
-return true;\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "installJSUI", \r
-function () {\r
-this.installDefaults (this.c);\r
-this.installListeners (this.c);\r
-this.installKeyboardActions (this.c);\r
-});\r
-Clazz.overrideMethod (c$, "uninstallJSUI", \r
-function () {\r
-this.uninstallKeyboardActions (this.c);\r
-this.uninstallListeners (this.c);\r
-});\r
-Clazz.defineMethod (c$, "installListeners", \r
-function (b) {\r
-var listener =  new swingjs.plaf.JSButtonListener (b);\r
-if (listener != null) {\r
-b.addMouseListener (listener);\r
-b.addMouseMotionListener (listener);\r
-b.addFocusListener (listener);\r
-b.addPropertyChangeListener (listener);\r
-b.addChangeListener (listener);\r
-}}, "javax.swing.AbstractButton");\r
-Clazz.defineMethod (c$, "uninstallListeners", \r
-function (b) {\r
-var listener = this.getButtonListener (b);\r
-if (listener != null) {\r
-b.removeMouseListener (listener);\r
-b.removeMouseMotionListener (listener);\r
-b.removeFocusListener (listener);\r
-b.removeChangeListener (listener);\r
-b.removePropertyChangeListener (listener);\r
-}}, "javax.swing.AbstractButton");\r
-Clazz.defineMethod (c$, "installKeyboardActions", \r
-function (b) {\r
-var listener = this.getButtonListener (b);\r
-if (listener != null) {\r
-listener.installKeyboardActions (b);\r
-}}, "javax.swing.AbstractButton");\r
-Clazz.defineMethod (c$, "uninstallKeyboardActions", \r
-function (b) {\r
-var listener = this.getButtonListener (b);\r
-if (listener != null) {\r
-listener.uninstallKeyboardActions (b);\r
-}}, "javax.swing.AbstractButton");\r
-Clazz.defineMethod (c$, "getButtonListener", \r
-function (b) {\r
-var listeners = b.getMouseMotionListeners ();\r
-if (listeners != null) {\r
-for (var counter = 0; counter < listeners.length; counter++) {\r
-if (Clazz.instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {\r
-return listeners[counter];\r
-}}\r
-}return null;\r
-}, "javax.swing.AbstractButton");\r
-Clazz.defineMethod (c$, "getPropertyPrefix", \r
-function () {\r
-return "Button.";\r
-});\r
-Clazz.defineMethod (c$, "installDefaults", \r
-function (b) {\r
-var pp = this.getPropertyPrefix ();\r
-this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");\r
-if (b.getMargin () == null || (Clazz.instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {\r
-b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));\r
-}javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");\r
-javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));\r
-}, "javax.swing.AbstractButton");\r
-});\r
+Clazz.declarePackage ("swingjs.plaf");
+Clazz.load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.domBtn = null;
+this.shiftOffset = 0;
+this.defaultTextShiftOffset = 0;
+Clazz.instantialize (this, arguments);
+}, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);
+Clazz.overrideMethod (c$, "getDOMObject", 
+function () {
+if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);
+this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());
+return this.domNode;
+});
+Clazz.defineMethod (c$, "verifyButtonClick", 
+function (isRelease) {
+return true;
+}, "~B");
+Clazz.overrideMethod (c$, "installJSUI", 
+function () {
+this.installDefaults (this.c);
+this.installListeners (this.c);
+this.installKeyboardActions (this.c);
+});
+Clazz.overrideMethod (c$, "uninstallJSUI", 
+function () {
+this.uninstallKeyboardActions (this.c);
+this.uninstallListeners (this.c);
+});
+Clazz.defineMethod (c$, "installListeners", 
+function (b) {
+var listener =  new swingjs.plaf.JSButtonListener (b);
+if (listener != null) {
+b.addMouseListener (listener);
+b.addMouseMotionListener (listener);
+b.addFocusListener (listener);
+b.addPropertyChangeListener (listener);
+b.addChangeListener (listener);
+}}, "javax.swing.AbstractButton");
+Clazz.defineMethod (c$, "uninstallListeners", 
+function (b) {
+var listener = this.getButtonListener (b);
+if (listener != null) {
+b.removeMouseListener (listener);
+b.removeMouseMotionListener (listener);
+b.removeFocusListener (listener);
+b.removeChangeListener (listener);
+b.removePropertyChangeListener (listener);
+}}, "javax.swing.AbstractButton");
+Clazz.defineMethod (c$, "installKeyboardActions", 
+function (b) {
+var listener = this.getButtonListener (b);
+if (listener != null) {
+listener.installKeyboardActions (b);
+}}, "javax.swing.AbstractButton");
+Clazz.defineMethod (c$, "uninstallKeyboardActions", 
+function (b) {
+var listener = this.getButtonListener (b);
+if (listener != null) {
+listener.uninstallKeyboardActions (b);
+}}, "javax.swing.AbstractButton");
+Clazz.defineMethod (c$, "getButtonListener", 
+function (b) {
+var listeners = b.getMouseMotionListeners ();
+if (listeners != null) {
+for (var counter = 0; counter < listeners.length; counter++) {
+if (Clazz.instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {
+return listeners[counter];
+}}
+}return null;
+}, "javax.swing.AbstractButton");
+Clazz.defineMethod (c$, "getPropertyPrefix", 
+function () {
+return "Button.";
+});
+Clazz.defineMethod (c$, "installDefaults", 
+function (b) {
+var pp = this.getPropertyPrefix ();
+this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");
+if (b.getMargin () == null || (Clazz.instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {
+b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));
+}javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");
+javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));
+}, "javax.swing.AbstractButton");
+});