JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / javajs / swing / Cell.js
1 Clazz.declarePackage ("javajs.swing");
2 c$ = Clazz.decorateAsClass (function () {
3 this.component = null;
4 this.colspan = 0;
5 this.rowspan = 0;
6 this.textAlign = 0;
7 this.c = null;
8 Clazz.instantialize (this, arguments);
9 }, javajs.swing, "Cell");
10 Clazz.makeConstructor (c$, 
11 function (btn, c) {
12 this.component = btn;
13 this.colspan = c.gridwidth;
14 this.rowspan = c.gridheight;
15 this.c = c;
16 }, "javajs.swing.JComponent,javajs.swing.GridBagConstraints");
17 Clazz.defineMethod (c$, "toHTML", 
18 function (id) {
19 var style = this.c.getStyle (false);
20 return "<td id='" + id + "' " + (this.colspan < 2 ? "" : "colspan='" + this.colspan + "' ") + style + "><span " + this.c.getStyle (true) + ">" + this.component.toHTML () + "</span></td>";
21 }, "~S");