/*
Determines the current row and column and updates the hidden description texts of the table accordingly.
961932
function(oExtension) {
			var oTable = oExtension.getTable(),
				oIN = oTable._getItemNavigation(),
				bIsRowChanged = false,
				bIsColChanged = false,
				bIsInitial = false;

			if (oIN) {
				var iColumnNumber = ExtensionHelper.getColumnIndexOfFocusedCell(oExtension) + 1; // +1 -> we want to announce a count and not the
																								 // index, the action column is handled like a normal
																								 // column
				var iRowNumber = TableUtils.getRowIndexOfFocusedCell(oTable) + oTable._getFirstRenderedRowIndex() + 1; // same here + take
																													   // virtualization
																													   // into account
				var iColCount = TableUtils.getVisibleColumnCount(oTable) + (TableUtils.hasRowActions(oTable) ? 1 : 0);
				var iRowCount = TableUtils.isNoDataVisible(oTable) ? 0 : TableUtils.getTotalRowCount(oTable, true);

				bIsRowChanged = oExtension._iLastRowNumber != iRowNumber || (oExtension._iLastRowNumber == iRowNumber
																			 && oExtension._iLastColumnNumber == iColumnNumber);
				bIsColChanged = oExtension._iLastColumnNumber != iColumnNumber;
				bIsInitial = !oExtension._iLastRowNumber && !oExtension._iLastColumnNumber;

				oTable.$("rownumberofrows").text(bIsRowChanged ? TableUtils.getResourceText("TBL_ROW_ROWCOUNT", [iRowNumber, iRowCount]) : " ");
				oTable.$("colnumberofcols").text(bIsColChanged ? TableUtils.getResourceText("TBL_COL_COLCOUNT", [iColumnNumber, iColCount]) : " ");
				oTable.$("ariacount").text(bIsInitial ? TableUtils.getResourceText("TBL_DATA_ROWS_COLS", [iRowCount, iColCount]) : " ");

				oExtension._iLastRowNumber = iRowNumber;
				oExtension._iLastColumnNumber = iColumnNumber;
			}

			return {
				rowChange: bIsRowChanged,
				colChange: bIsColChanged,
				initial: bIsInitial
			};
		}
1031841
public void setColumnsSpanned(final int colIndex, final int n) {
        if (n <= 1) return;

        final TableCell firstCell = this.getOrCreateCell(colIndex);
        if (firstCell.isCovered()) // already spanned
            return;

        firstCell.markColumnsSpanned(n);
        this.coverRightCells(colIndex, n);
    }
978787
def update_row(self, value):
		
		if not self.__history_mode:
			self.__current_row = value
		else:
			self.history().update(value, self.history().position())
143690
function addCol($col_data, $col_id = 0, $row_id = 0) {
        foreach ($col_data as $col_cell) {
            $this->_data[$row_id++][$col_id] = $col_cell;
        }

        $this->_updateRowsCols();
        $this->_max_cols = max($this->_max_cols, $col_id + 1);
    }
253178
private void paintSortDetails(final WTable table, final XmlStringBuilder xml) {

		int col = table.getSortColumnIndex();
		boolean ascending = table.isSortAscending();

		xml.appendTagOpen("ui:sort");
		if (col >= 0) {
			// Allow for column order
			int[] cols = table.getColumnOrder();
			if (cols != null) {
				for (int i = 0; i < cols.length; i++) {
					if (cols[i] == col) {
						col = i;
						break;
					}
				}
			}
			xml.appendAttribute("col", col);
			xml.appendOptionalAttribute("descending", !ascending, "true");
		}

		switch (table.getSortMode()) {
			case DYNAMIC:
				xml.appendAttribute("mode", "dynamic");
				break;
			default:
				throw new SystemException("Unknown sort mode: " + table.getSortMode());
		}

		xml.appendEnd();
	}
1348667
public void getColumnHeading(TableCandidate tc) {
    	int headings  = tc.getHeadingLineNumber();
    	String[][] cells = tc.getCells();
    	String columnHeadings = "";
    	for (int i=0; i<=headings; i++) {
    		int j = cells[i].length;
    		for (int k=0; k<j; k++) {
    			cells[i][k] =  tc.replaceAllSpecialChracters(cells[i][k]);
    			columnHeadings = columnHeadings + cells[i][k] + "; ";
    		}
    		columnHeadings = columnHeadings + "\n";
    	}
    	tc.setColumnHeadings(columnHeadings);
    }
109684
function(table) {
        var data = [];
        var rows = table.rows;
        var index = 0;
        var length = rows.length;
        var columnIndex, colspanRange, rowspanRange;

        // Step 1: Init the data matrix
        for (; index < length; index += 1) {
            data[index] = [];
        }

        // Step 2: Traverse the table
        _.each(rows, function(tr, rowIndex) {
            columnIndex = 0;

            _.each(tr.cells, function(td) {
                var text = td.textContent || td.innerText;

                while (data[rowIndex][columnIndex]) {
                    columnIndex += 1;
                }

                colspanRange = [columnIndex, columnIndex + (td.colSpan || 1)];
                rowspanRange = [rowIndex, rowIndex + (td.rowSpan || 1)];

                // Step 3: Set the value of td element to the data matrix as colspan and rowspan ranges
                setDataInSpanRange(text, data, colspanRange, rowspanRange);

                columnIndex = colspanRange[1];
            });
        });

        return data;
    }
445603
public void setText (int row, int column, String text, String style)
    {
        setText(row, column, text);
        if (style != null) {
            getCellFormatter().setStyleName(row, column, style);
        }
    }
289491
def acceptColumn(self):
        
        self.navigator().hide()
        self.lineEdit().setText(self.navigator().currentSchemaPath())
        self.emitSchemaColumnChanged(self.navigator().currentColumn())
1055322
def process_data(self, text, colsep=u"\t", rowsep=u"\n",
                     transpose=False, skiprows=0, comments='#'):
        """"""
        data = self._shape_text(text, colsep, rowsep, transpose, skiprows,
                                comments)
        self._model = PreviewTableModel(data)
        self.setModel(self._model)
447981
public function handleShowDefaultColumns()
	{
		$this->deleteSessionData('_grid_hidden_columns');
		$this->saveSessionData('_grid_hidden_columns_manipulated', false);

		$this->redrawControl();

		$this->onRedraw();
	}
709744
function() {
			var aVisibleColumnsIds = [],
			aColumns = SelectionUtils.treeTable.getColumns();

			aColumns.forEach(function (oColumn) {
				if (oColumn.getVisible()){
					aVisibleColumnsIds.push(oColumn.sId);
				}
			});

			storage.setVisibleColumns(aVisibleColumnsIds);
		}
715812
function() {
        this._calculateColumns();

        this.fireEvent('rendering');

        var element = this.element,
            items = this.items;

        // No items
        if (!items.length) {
            element.removeAttr('style');

        // Single column
        } else if (this.colCount <= 1) {
            element.removeAttr('style').addClass('no-columns');
            items.removeAttr('style');

        // Multi column
        } else {
            element.removeClass('no-columns');

            this._organizeItems();
            this._positionItems();
        }

        this.fireEvent('rendered');
    }
1145713
private void paintSelectionDetails(final WTable table, final XmlStringBuilder xml) {
		boolean multiple = table.getSelectMode() == SelectMode.MULTIPLE;
		xml.appendTagOpen("ui:rowselection");
		xml.appendOptionalAttribute("multiple", multiple, "true");

		boolean toggleSubRows = multiple && table.isToggleSubRowSelection()
				&& WTable.ExpandMode.NONE != table.getExpandMode();
		xml.appendOptionalAttribute("toggle", toggleSubRows, "true");
		if (multiple) {
			switch (table.getSelectAllMode()) {
				case CONTROL:
					xml.appendAttribute("selectAll", "control");
					break;
				case TEXT:
					xml.appendAttribute("selectAll", "text");
					break;
				case NONE:
					break;
				default:
					throw new SystemException("Unknown select-all mode: " + table.
							getSelectAllMode());
			}
		}
		xml.appendEnd();
	}
767702
public Table update() {
    // [START ]
    Table updatedTable = table.toBuilder().setDescription("new description").build().update();
    // [END ]
    return updatedTable;
  }
236356
function () {
      if (!selection.isSelected()) {
        return;
      }
      var corners = grid.getCornerCoords([priv.selStart, selection.end()]);
      var r, c, changes = [];
      for (r = corners.TL.row; r <= corners.BR.row; r++) {
        for (c = corners.TL.col; c <= corners.BR.col; c++) {
          if (self.getCellMeta(r, c).isWritable) {
            changes.push([r, datamap.colToProp(c), '']);
          }
        }
      }
      self.setDataAtCell(changes);
    }
960655
function _updateColspan(tableData, startColIndex, endColIndex) {
  tableData.forEach(rowData => {
    util.range(startColIndex, endColIndex + 1).forEach(colIndex => {
      const cellData = rowData [colIndex];

      if (util.isExisty(cellData.colMergeWith)) {
        const merger = rowData [cellData.colMergeWith];

        if (merger.colspan) {
          merger.colspan -= 1;
        }
      } else if (cellData.colspan > 1) {
        const lastMergedCellIndex = colIndex + cellData.colspan - 1;

        cellData.colspan -= (endColIndex - colIndex + 1);

        if (lastMergedCellIndex > endColIndex) {
          rowData [endColIndex + 1] = util.extend({}, cellData);
        }
      }
    });
  });
}