|
jsm | |||||||
PREV NEXT | FRAMES NO FRAMES |
No overview generated for 'net/sf/jsm/table/+jsmCell.js'
Class Summary | |
JsmCell | Base for cells; consider as abstract; |
/** * Base for cells; consider as abstract; * @extends JsmObject * @class Base for cells; consider as abstract; * @constructor */ function JsmCell() { throw new Error("JsmCell is an abstract class and can not be instantiated"); } JsmCell.extendClass(JsmObject); /** @ignore */ JsmCell.prototype.className="JsmCell"; /** The value of the cell */ JsmCell.prototype.value = ""; /** The title of the cell */ JsmCell.prototype.title = ""; /** The index of the column; the column index is zero based */ JsmCell.prototype.idx = -1; /** The name of the function to call on click on a row; defaults to 'jsmOnTableCellClick' * @type String */ JsmCell.prototype.onClickFunctionName = "jsmOnTableCellClick"; /** The row this cell is attached to; null if not yet assigned * @type JsmTr */ JsmCell.prototype.tr=null; /** @ignore */ JsmCell.prototype.toString = function() { return "[" + this.value + "]"; } /** * @return {JsmTr} The row this cell is attached to */ JsmCell.prototype.getRow = function() { return this.tr; } /** Return the column index * @return {int} The column index of this cell; -1 if not attached to a row */ JsmCell.prototype.getIndex = function() { return this.idx; } /** Get the value of the cell * @return {String} */ JsmCell.prototype.getValue = function() { return this.value; } /** Set the value of the cell * @param value Can be a string which can contain HTML tags; * can be an object with a getNode() method; * can be a JavaScript expression which will be eval()ed. The expression has to be put in %{}, eg. %{'The cells index: ' + this.getIndex()} * @return this */ JsmCell.prototype.setValue = function(value) { this.value = value; return this; } /** Get the title of the cell * @return {String} */ JsmCell.prototype.getTitle = function() { return this.title; } /** Set the title of the cell * @param {String} title * @return this */ JsmCell.prototype.setTitle = function(title) { this.title = title; return this; } /** Sets the name of the function to call on click on a cell. * Will be called instead of default function: jsmOnTableCellClick(table, rowIdx, columnIdx). * The parameters table, rowIdx, columnIdx will be the arguments of the function. * @param {String} functionName * @return this */ JsmCell.prototype.setOnClick = function(functionName) { this.onClickFunctionName = functionName; return this; } /** * @return {String} The name of the function to call on click */ JsmCell.prototype.getOnClick = function() { return this.onClickFunctionName; }
|
jsm | |||||||
PREV NEXT | FRAMES NO FRAMES |