Reset colum size

@param columnWidth
486422
public void setItemSize(int columnWidth, int columnHeight) {

		if (itemWidth == columnWidth) {
			return;
		}

		itemWidth = columnWidth;
		itemHeight = columnHeight;

		itemLayoutParams = new GridView.LayoutParams(itemWidth, itemHeight);

		notifyDataSetChanged();
	}
100812
public function setColumnWidthLimits($minWidth = null, $maxWidth = null)
    {
        $this->sheet->setColumnWidthLimits($minWidth, $maxWidth);
    }
395692
private function executeColumnWidths(): void
  {
    $this->loadOldColumns();

    $this->loadColumns();

    $this->enhanceColumns();

    $this->mergeColumns();

    $this->writeColumns();
  }
581476
function removeProcessedColumns(columnsToResize, columnsProcessed) {
    for (var _i = 0, columnsProcessed_1 = columnsProcessed; _i < columnsProcessed_1.length; _i++) {
        var column = columnsProcessed_1[_i];
        var index = columnsToResize.indexOf(column);
        columnsToResize.splice(index, 1);
    }
}
3453
def _resizeCurrentColumnToContents(self, new_index, old_index):
        """"""
        if new_index.column() not in self._autosized_cols:
            # Ensure the requested column is fully into view after resizing
            self._resizeVisibleColumnsToContents()
            self.dataTable.scrollTo(new_index)
648897
private void restoreColumnSettings(IDialogSettings settings) {
		this.sresList.getTable().layout(true);
		restoreColumnWidths(settings);
		this.sortColumn = Column.NAME;
		try {
			final String columnName = settings.get(ID + ".sortColumn"); //$NON-NLS-1$
			if (!Strings.isNullOrEmpty(columnName)) {
				this.sortColumn = Column.valueOf(columnName);
				if (this.sortColumn == null) {
					this.sortColumn = Column.NAME;
				}
			}
		} catch (Throwable exception) {
			//
		}
		switch (this.sortColumn) {
		case NAME:
			sortByName();
			break;
		case LOCATION:
			sortByLocation();
			break;
		default:
		}
	}
1359335
private void setSelectWidth(int width) {

        m_markerStyle.setWidth(width, Unit.PX);

        m_overlayTopStyle.setWidth(width, Unit.PX);
        m_overlayBottomStyle.setWidth(width, Unit.PX);
        m_overlayRightStyle.setWidth(m_elementWidth - m_currentSelection.getLeft() - width, Unit.PX);

        m_currentSelection.setWidth(width);
    }
122854
def set_col_width(self, col, tab, width):
        """"""

        try:
            old_width = self.col_widths.pop((col, tab))

        except KeyError:
            old_width = None

        if width is not None:
            self.col_widths[(col, tab)] = float(width)
282321
public function setColumnWidth($columnIndex, $width)
    {
        $this->columnWidths[(int) $columnIndex] = (int) $width;

        return $this;
    }
1244489
def _update_header_size(self):
        """"""
        column_count = self.table_header.model().columnCount()
        for index in range(0, column_count):
            if index < column_count:
                column_width = self.dataTable.columnWidth(index)
                self.table_header.setColumnWidth(index, column_width)
            else:
                break
421898
public void resetRow(int rowsize) {

        if (out != null) {
            out.reset(rowsize);

            buf = out.getBuffer();
        }

        super.reset();
    }
938581
function setColumnDefaults(columns) {
    if (!columns)
        return;
    // Only one column should hold the tree view
    // Thus if multiple columns are provided with
    // isTreeColumn as true we take only the first one
    var treeColumnFound = false;
    for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
        var column = columns_1[_i];
        if (!column.$$id) {
            column.$$id = id_1.id();
        }
        // prop can be numeric; zero is valid not a missing prop
        // translate name => prop
        if (isNullOrUndefined(column.prop) && column.name) {
            column.prop = camel_case_1.camelCase(column.name);
        }
        if (!column.$$valueGetter) {
            column.$$valueGetter = column_prop_getters_1.getterForProp(column.prop);
        }
        // format props if no name passed
        if (!isNullOrUndefined(column.prop) && isNullOrUndefined(column.name)) {
            column.name = camel_case_1.deCamelCase(String(column.prop));
        }
        if (isNullOrUndefined(column.prop) && isNullOrUndefined(column.name)) {
            column.name = ''; // Fixes IE and Edge displaying `null`
        }
        if (!column.hasOwnProperty('resizeable')) {
            column.resizeable = true;
        }
        if (!column.hasOwnProperty('sortable')) {
            column.sortable = true;
        }
        if (!column.hasOwnProperty('draggable')) {
            column.draggable = true;
        }
        if (!column.hasOwnProperty('canAutoResize')) {
            column.canAutoResize = true;
        }
        if (!column.hasOwnProperty('width')) {
            column.width = 150;
        }
        if (!column.hasOwnProperty('isTreeColumn')) {
            column.isTreeColumn = false;
        }
        else {
            if (column.isTreeColumn && !treeColumnFound) {
                // If the first column with isTreeColumn is true found
                // we mark that treeCoulmn is found
                treeColumnFound = true;
            }
            else {
                // After that isTreeColumn property for any other column
                // will be set as false
                column.isTreeColumn = false;
            }
        }
    }
}
12405
public void deleteColumn(int column) throws BadElementException {
        float newWidths[] = new float[--columns];
        System.arraycopy(widths, 0, newWidths, 0, column);
        System.arraycopy(widths, column + 1, newWidths, column, columns - column);
        setWidths(newWidths);
        System.arraycopy(widths, 0, newWidths, 0, columns);
        widths = newWidths;
        Row row;
        int size = rows.size();
        for (int i = 0; i < size; i++) {
            row = (Row) rows.get(i);
            row.deleteColumn(column);
            rows.set(i, row);
        }
        if (column == columns) {
            curPosition.setLocation(curPosition.x+1, 0);
        }
    }
1353851
protected void setColumnsFinalWidth() {
        log.debug("Setting columns final width.");
        float factor;
        int printableArea = report.getOptions().getColumnWidth();

        //Create a list with only the visible columns.
        List visibleColums = getVisibleColumns();


        if (report.getOptions().isUseFullPageWidth()) {
            int columnsWidth = 0;
            int notRezisableWidth = 0;

            //Store in a variable the total with of all visible columns
            for (Object visibleColum : visibleColums) {
                AbstractColumn col = (AbstractColumn) visibleColum;
                columnsWidth += col.getWidth();
                if (col.isFixedWidth())
                    notRezisableWidth += col.getWidth();
            }


            factor = (float) (printableArea - notRezisableWidth) / (float) (columnsWidth - notRezisableWidth);

            log.debug("printableArea = " + printableArea
                    + ", columnsWidth = " + columnsWidth
                    + ", columnsWidth = " + columnsWidth
                    + ", notRezisableWidth = " + notRezisableWidth
                    + ", factor = " + factor);

            int acumulated = 0;
            int colFinalWidth;

            //Select the non-resizable columns
            Collection resizableColumns = CollectionUtils.select(visibleColums, new Predicate() {
                public boolean evaluate(Object arg0) {
                    return !((AbstractColumn) arg0).isFixedWidth();
                }

            });

            //Finally, set the new width to the resizable columns
            for (Iterator iter = resizableColumns.iterator(); iter.hasNext(); ) {
                AbstractColumn col = (AbstractColumn) iter.next();

                if (!iter.hasNext()) {
                    col.setWidth(printableArea - notRezisableWidth - acumulated);
                } else {
                    colFinalWidth = (new Float(col.getWidth() * factor)).intValue();
                    acumulated += colFinalWidth;
                    col.setWidth(colFinalWidth);
                }
            }
        }

        // If the columns width changed, the X position must be setted again.
        int posx = 0;
        for (Object visibleColum : visibleColums) {
            AbstractColumn col = (AbstractColumn) visibleColum;
            col.setPosX(posx);
            posx += col.getWidth();
        }
    }
1070674
def OnColSize(self, event):
        """"""

        col = event.GetRowOrCol()
        tab = self.grid.current_table
        colsize = self.grid.GetColSize(col) / self.grid.grid_renderer.zoom

        # Detect for resizing group of cols
        cols = self.grid.GetSelectedCols()
        if len(cols) == 0:
            cols = [col, ]

        # Detect for selection of rows spanning all columns
        selection = self.grid.selection
        num_rows = self.grid.code_array.shape[0]-1
        for box in zip(selection.block_tl, selection.block_br):
            top_row = box[0][0]
            bottom_row = box[1][0]
            if top_row == 0 and bottom_row == num_rows:
                cols += range(box[0][1], box[1][1]+1)

        # All column resizing is undone in one click
        with undo.group(_("Resize Columns")):
            for col in cols:
                self.grid.code_array.set_col_width(col, tab, colsize)
                zoomed_colsize = colsize * self.grid.grid_renderer.zoom
                self.grid.SetColSize(col, zoomed_colsize)

        # Mark content as changed
        post_command_event(self.grid.main_window, self.grid.ContentChangedMsg)

        event.Skip()
        self.grid.ForceRefresh()
274129
public void adjustBeginLineColumn (final int nNewLine, final int newCol)
  {
    int start = m_nTokenBegin;
    int newLine = nNewLine;
    int len;

    if (m_nBufpos >= m_nTokenBegin)
    {
      len = m_nBufpos - m_nTokenBegin + m_nInBuf + 1;
    }
    else
    {
      len = m_nBufsize - m_nTokenBegin + m_nBufpos + 1 + m_nInBuf;
    }

    int nIdx = 0;
    int j = 0;
    int nextColDiff = 0;
    int columnDiff = 0;

    while (true)
    {
      if (nIdx >= len)
        break;
      j = start % m_nBufsize;
      ++start;
      final int k = start % m_nBufsize;
      if (m_aBufLine[j] != m_aBufLine[k])
        break;

      m_aBufLine[j] = newLine;
      nextColDiff = columnDiff + m_aBufColumn[k] - m_aBufColumn[j];
      m_aBufColumn[j] = newCol + columnDiff;
      columnDiff = nextColDiff;
      nIdx++;
    }

    if (nIdx < len)
    {
      m_aBufLine[j] = newLine++;
      m_aBufColumn[j] = newCol + columnDiff;

      while (nIdx++ < len)
      {
        j = start % m_nBufsize;
        ++start;
        final int k = start % m_nBufsize;
        if (m_aBufLine[j] != m_aBufLine[k])
          m_aBufLine[j] = newLine++;
        else
          m_aBufLine[j] = newLine;
      }
    }

    m_nLine = m_aBufLine[j];
    m_nColumn = m_aBufColumn[j];
  }
878112
def resizeColumnToContents(self, column):
        
        self.header().blockSignals(True)
        self.setUpdatesEnabled(False)
        
        super(XTreeWidget, self).resizeColumnToContents(column)
        
        min_w = self._columnMinimums.get(column, 0)
        cur_w = self.columnWidth(column)
        if cur_w < min_w:
            self.setColumnWidth(column, min_w)
        
        self.setUpdatesEnabled(True)
        self.header().blockSignals(False)