Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / swingjs / plaf / JSRadioButtonUI.js
index ea16d75..f6a8312 100644 (file)
@@ -1,63 +1,63 @@
-Clazz.declarePackage ("swingjs.plaf");\r
-Clazz.load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.label = null;\r
-Clazz.instantialize (this, arguments);\r
-}, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI);\r
-Clazz.overrideMethod (c$, "getDOMObject", \r
-function () {\r
-return this.getButtonObject ("radio");\r
-});\r
-Clazz.overrideMethod (c$, "getPropertyPrefix", \r
-function () {\r
-return "RadioButton.";\r
-});\r
-Clazz.overrideMethod (c$, "setHTMLSize", \r
-function (obj, addCSS) {\r
-swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);\r
-swingjs.api.DOMNode.setStyles (this.label, ["position", null]);\r
-var d = this.setHTMLSize1 (obj, addCSS, false);\r
-swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);\r
-swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);\r
-return d;\r
-}, "swingjs.api.DOMNode,~B");\r
-Clazz.defineMethod (c$, "getButtonObject", \r
-function (myType) {\r
-var b = this.c;\r
-var isNew = false;\r
-var doAll = false;\r
-if (this.domNode == null) {\r
-doAll = true;\r
-if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();\r
-var bg = null;\r
-var name = this.id;\r
-isNew = true;\r
-if (Clazz.instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {\r
-bg = (b.getModel ()).getGroup ();\r
-name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);\r
-if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);\r
- else isNew = false;\r
-}this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);\r
-this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);\r
-}if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");\r
-this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());\r
-var drad = this.setHTMLSize1 (this.domBtn, false, false);\r
-this.setHTMLSize1 (this.label, false, false);\r
-var obj = this.wrap ("div", "", [this.domBtn, this.label]);\r
-var dobj = this.setHTMLSize1 (obj, true, true);\r
-swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);\r
-swingjs.plaf.JSComponentUI.vCenter (this.label, -50);\r
-swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);\r
-swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);\r
-if (doAll) {\r
-obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);\r
-swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);\r
-} else {\r
-obj = this.domNode;\r
-obj.appendChild (this.domBtn);\r
-obj.appendChild (this.label);\r
-}return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);\r
-}, "~S");\r
-Clazz.defineStatics (c$,\r
-"groupNames", null);\r
-});\r
+Clazz.declarePackage ("swingjs.plaf");
+Clazz.load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.label = null;
+Clazz.instantialize (this, arguments);
+}, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI);
+Clazz.overrideMethod (c$, "getDOMObject", 
+function () {
+return this.getButtonObject ("radio");
+});
+Clazz.overrideMethod (c$, "getPropertyPrefix", 
+function () {
+return "RadioButton.";
+});
+Clazz.overrideMethod (c$, "setHTMLSize", 
+function (obj, addCSS) {
+swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);
+swingjs.api.DOMNode.setStyles (this.label, ["position", null]);
+var d = this.setHTMLSize1 (obj, addCSS, false);
+swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
+swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);
+return d;
+}, "swingjs.api.DOMNode,~B");
+Clazz.defineMethod (c$, "getButtonObject", 
+function (myType) {
+var b = this.c;
+var isNew = false;
+var doAll = false;
+if (this.domNode == null) {
+doAll = true;
+if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();
+var bg = null;
+var name = this.id;
+isNew = true;
+if (Clazz.instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {
+bg = (b.getModel ()).getGroup ();
+name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);
+if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);
+ else isNew = false;
+}this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);
+this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);
+}if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");
+this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());
+var drad = this.setHTMLSize1 (this.domBtn, false, false);
+this.setHTMLSize1 (this.label, false, false);
+var obj = this.wrap ("div", "", [this.domBtn, this.label]);
+var dobj = this.setHTMLSize1 (obj, true, true);
+swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);
+swingjs.plaf.JSComponentUI.vCenter (this.label, -50);
+swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);
+swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
+if (doAll) {
+obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);
+swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);
+} else {
+obj = this.domNode;
+obj.appendChild (this.domBtn);
+obj.appendChild (this.label);
+}return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);
+}, "~S");
+Clazz.defineStatics (c$,
+"groupNames", null);
+});