JAL-1807 Bob
[jalviewjs.git] / site / j2s / swingjs / plaf / JSToggleButtonUI.js
1 Clazz.declarePackage ("swingjs.plaf");
2 Clazz.load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.isDomChecked = false;
5 Clazz.instantialize (this, arguments);
6 }, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI);
7 Clazz.overrideMethod (c$, "verifyButtonClick", 
8 function (isRelease) {
9 var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true);
10 if (isRelease && this.isDomChecked == checked) return false;
11 this.isDomChecked = checked;
12 return true;
13 }, "~B");
14 Clazz.overrideMethod (c$, "getPropertyPrefix", 
15 function () {
16 return "ToggleButton.";
17 });
18 });