Clazz.declarePackage ("JS");
Clazz.load (["JS.AbstractButton"], "JS.JMenuItem", null, function () {
c$ = Clazz.decorateAsClass (function () {
this.btnType = 0;
Clazz.instantialize (this, arguments);
}, JS, "JMenuItem", JS.AbstractButton);
Clazz.makeConstructor (c$,
function (text) {
Clazz.superConstructor (this, JS.JMenuItem, ["btn"]);
this.setText (text);
this.btnType = (text == null ? 0 : 1);
}, "~S");
Clazz.makeConstructor (c$,
function (type, i) {
Clazz.superConstructor (this, JS.JMenuItem, [type]);
this.btnType = i;
}, "~S,~N");
Clazz.overrideMethod (c$, "toHTML",
function () {
return this.htmlMenuOpener ("li") + (this.text == null ? "" : "" + this.htmlLabel () + "") + "";
});
Clazz.overrideMethod (c$, "getHtmlDisabled",
function () {
return " class=\"ui-state-disabled\"";
});
Clazz.defineMethod (c$, "htmlLabel",
function () {
return (this.btnType == 1 ? this.text : "");
});
Clazz.defineStatics (c$,
"TYPE_SEPARATOR", 0,
"TYPE_BUTTON", 1,
"TYPE_CHECKBOX", 2,
"TYPE_RADIO", 3,
"TYPE_MENU", 4);
});