net/sf/jsm/table/jsmTh.js
Summary
No overview generated for 'net/sf/jsm/table/jsmTh.js'
Class Summary
|
JsmTh |
A table header cell
|
function JsmTh(value, title) {
this.id=new Date().getTime() + "" + Math.random();
logger.info("Created JsmTh with id: " + this.id);
this.value = jsm.noud(value)?"":value;
this.title = jsm.noud(title)?value:title;
this.onClickFunctionName = "jsmOnTableHeaderClick";
}
JsmTh.extendClass(JsmCell);
JsmTh.prototype.className="JsmTh";
JsmTh.prototype.getNode = function() {
var th = document.createElement("th");
th.setAttribute("id", this.id);
th.model=this;
this.addAttributesToViewComponent(th);
th.onclick=_jsmOnClickEventDelegate;
var onMouseDownFunctionDefinition = "";
th.onmousedown=_jsmOnMouseDownEventDelegate;
this.setAttribute("onmousedown", "if (!e) e=window.event; jsm.resizeColumn=" + this.getIndex() + "; jsm.resize=true; jsm.resizeStartX=e.screenX;");
th.onmouseup=_jsmOnMouseUpEventDelegate;
this.setAttribute("onmouseup", "jsm.resize=false; jsm.resizeColumn=-1; jsm.resizeOriginalWidth=-1;");
th.setAttribute("title", this.title);
if (this.idx == this.tr.table.getSortColumn()) {
th.innerHTML = this.value + " <img src='" + (this.tr.table.getSortOrder()=='desc'?jsmSortDescImage:jsmSortAscImage) + "' border='0'></img>";
} else {
th.innerHTML = this.value;
}
return th;
}
Documentation generated by
JSDoc on Tue Sep 26 08:42:57 2006