1 Clazz.declarePackage ("javajs.swing");
2 Clazz.load (["javajs.swing.AbstractButton"], "javajs.swing.JMenuItem", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
5 Clazz.instantialize (this, arguments);
6 }, javajs.swing, "JMenuItem", javajs.swing.AbstractButton);
7 Clazz.makeConstructor (c$,
9 Clazz.superConstructor (this, javajs.swing.JMenuItem, ["btn"]);
11 this.btnType = (text == null ? 0 : 1);
13 Clazz.makeConstructor (c$,
15 Clazz.superConstructor (this, javajs.swing.JMenuItem, [type]);
18 Clazz.overrideMethod (c$, "toHTML",
20 return this.htmlMenuOpener ("li") + (this.text == null ? "" : "<a>" + this.htmlLabel () + "</a>") + "</li>";
22 Clazz.overrideMethod (c$, "getHtmlDisabled",
24 return " class=\"ui-state-disabled\"";
26 Clazz.defineMethod (c$, "htmlLabel",
28 return (this.btnType == 1 ? this.text : "<label><input id=\"" + this.id + "-" + (this.btnType == 3 ? "r" : "c") + "b\" type=\"" + (this.btnType == 3 ? "radio\" name=\"" + this.htmlName : "checkbox") + "\" " + (this.selected ? "checked" : "") + " />" + this.text + "</label>");
29 }, $fz.isPrivate = true, $fz));
30 Clazz.defineStatics (c$,