rem: if (this._calcDimensions) {  return; } var data = this.getSelection(); var cols = this.getColumnHeaders(), nCols = cols.length; var columnWidths = []; this._neededTextFieldWidth = 0; columnWidths.length = cols.length; for (var col = 0; col < cols.length; col++) { columnWidths[col] = this._getTextWidth(cols[col]); } for (var row = 0, rows = Math.min(data.length, 50); row < rows; row++) { var r = data[row], wi0, wi1; for (col = 0; col < nCols; col++) { var wi = this._getTextWidth(r[col]); if (col == 0) { wi0 = wi; } else if (col == 1) { wi1 = wi; } columnWidths[col] = Math.max(wi, columnWidths[col]); } this._neededTextFieldWidth = Math.max(this._neededTextFieldWidth, wi1+(this.getShowOnTextField() == 'idAndDescription' ? wi0:0)); } if (this.getShowOnTextField() == 'idAndDescription') { this._neededTextFieldWidth += this._getTextWidth(this.getIdDescriptionSeparator()); } this._neededTextFieldWidth += 8;	/*Extra margins*/ var width = 12/*vertical scroll bar width*/; var colModel = this._list.getTableColumnModel(); var countVisible = 0; for (col = 0; col < nCols; col++) { if (colModel.isColumnVisible(col)) { var w = 6+columnWidths[col]; this._list.setColumnWidth(col, w); width += w; countVisible++; } }  this._list.getPaneScroller(0).getHeader().setHeight(countVisible > 1 ? 'auto' : 1); this._list.set({ width: width, height: this._list.getRowHeight()* Math.min(10, (countVisible > 1 ? 1:0)/*Header row*/+data.length)+2 });  this._calcDimensions = true; 
add: if (this._calcDimensions) {  return; } var data = this.getSelection(); var cols = this.getColumnHeaders(), nCols = cols.length; var columnWidths = []; this._neededTextFieldWidth = 0; columnWidths.length = cols.length; for (var col = 0; col < cols.length; col++) { columnWidths[col] = this._getTextWidth(cols[col]); } for (var row = 0, rows = Math.min(data.length, 50); row < rows; row++) { var r = data[row], wi0, wi1; for (col = 0; col < nCols; col++) { var wi = this._getTextWidth(r[col]); if (col == 0) { wi0 = wi; } else if (col == 1) { wi1 = wi; } columnWidths[col] = Math.max(wi, columnWidths[col]); } this._neededTextFieldWidth = Math.max(this._neededTextFieldWidth, wi1+(this.getShowOnTextField() == 'idAndDescription' ? wi0:0)); } if (this.getShowOnTextField() == 'idAndDescription') { this._neededTextFieldWidth += this._getTextWidth(this.getIdDescriptionSeparator()); } this._neededTextFieldWidth += 8;  /*Extra margins*/ var width = 12/*vertical scroll bar width*/; var colModel = this._list.getTableColumnModel(); var countVisible = 0; for (col = 0; col < nCols; col++) { if (colModel.isColumnVisible(col)) { var w = 6+columnWidths[col]; this._list.setColumnWidth(col, w); width += w; countVisible++; } }  this._list.getPaneScroller(0).getHeader().setHeight(countVisible > 1 ? 'auto' : 1); this._list.set({ width: width, height: this._list.getRowHeight()* Math.min(10, (countVisible > 1 ? 1:0)/*Header row*/+data.length)+2 });  this._calcDimensions = true; 
context: qx.Proto._calculateDimensions = function() {	if (this._calcDimensions) {		// Already calculated		return;	}	var data = this.getSelection();	var cols = this.getColumnHeaders(), nCols = cols.length;	var columnWidths = [];	this._neededTextFieldWidth = 0;	columnWidths.length = cols.length;	for (var col = 0; col < cols.length; col++) {		columnWidths[col] = this._getTextWidth(cols[col]);	}	for (var row = 0, rows = Math.min(data.length, 50); row < rows; row++) {		var r = data[row], wi0, wi1;		for (col = 0; col < nCols; col++) {			var wi = this._getTextWidth(r[col]); 			if (col == 0) {				wi0 = wi;			} else if (col == 1) {				wi1 = wi;			}			columnWidths[col] = Math.max(wi, columnWidths[col]);		}		this._neededTextFieldWidth = Math.max(this._neededTextFieldWidth, 			wi1+(this.getShowOnTextField() == 'idAndDescription' ? wi0:0));	}	if (this.getShowOnTextField() == 'idAndDescription') {		this._neededTextFieldWidth += this._getTextWidth(this.getIdDescriptionSeparator());	}	this._neededTextFieldWidth += 8;	/*Extra margins*/	var width = 12/*vertical scroll bar width*/;	var colModel = this._list.getTableColumnModel();	var countVisible = 0;	for (col = 0; col < nCols; col++) {		if (colModel.isColumnVisible(col)) {			var w = 6+columnWidths[col];			this._list.setColumnWidth(col, w);			width += w;			countVisible++;		}	}	// Only show headers if we have more than 1 column visible	this._list.getPaneScroller(0).getHeader().setHeight(countVisible > 1 ? 'auto' : 1);	this._list.set({		width: width,		height: this._list.getRowHeight()*			Math.min(10, (countVisible > 1 ? 1:0)/*Header row*/+data.length)+2	});	// This denotes dimensions already calculated	this._calcDimensions = true;}
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/aa99373da2ae4358696891ddee30caccc4df6619/ComboBoxEx.js/clean/qooxdoo/frontend/framework/source/class/qx/ui/form/ComboBoxEx.js