Applies the column width options. Existing width styles will be overridden.
328399
private function applyColumnWidths()
	{
		$styles = [];
		if (!empty($this->columnWidth)) $styles['width'] = $this->prepareWidthStyleValue($this->columnWidth);
		if (!empty($this->minColumnWidth)) $styles['min-width'] = $this->prepareWidthStyleValue($this->minColumnWidth);
		if (!empty($this->maxColumnWidth)) $styles['max-width'] = $this->prepareWidthStyleValue($this->maxColumnWidth);

		Html::addCssStyle($this->options, $styles, true);
	}
943012
function _applyContainerSize(){

		this._bLayoutDataChangedByMe = true;
		var oForm = this.getAggregation("form");
		var aContainers = oForm.getFormContainers();
		var iLength = aContainers.length;
		for (var i = 0; i < iLength; i++) {
			var oContainer = aContainers[i];
			if ((this.getMaxContainerCols() <= 1) || ((i == iLength - 1) && (iLength % 2 > 0))) {
				oContainer.getLayoutData().setHalfGrid(false);
			} else if (!oContainer.getLayoutData().getHalfGrid()) {
				oContainer.getLayoutData().setHalfGrid(true);
			}
		}
		this._bLayoutDataChangedByMe = false;
	}
400177
function widthChangeFormFun() {
    this.createFromDivs();
    $('#' + this.options.id + '_grid').css('display', 'none');
    $('#' + this.options.id + '_form').css('display', 'block');
    this.showType = 'form';
    if (typeof this.options.afterCreate == 'function') {
        this.options.afterCreate.call(this);
    }
}
304000
def _adjust_width(self):
        """"""
        if self.bar_width > self.max_iter:
            self.bar_width = int(self.max_iter)
1204088
def opt_width(self, width):
        
        if width != "auto":
            width = int(width)
        self.conf["width"] = width
919486
def suggest_column_width col
      #ret = @cw[col] || 2
      ret = get_column(col).width || 2
      ctr = 0
      @list.each_with_index { |r, i|
        #next if i < @toprow # this is also a possibility, it checks visible rows
        break if ctr > 10
        ctr += 1
        next if r == :separator
        c = r[col]
        x = c.to_s.length
        ret = x if x > ret
      }
      ret
    end
704313
function() {

		// If there is no min width set, or not content items, do nothing.
		if( !this._useResponsiveLayout() || this._updatingColumnsResponsive || !this.config.dimensions || !this.config.dimensions.minItemWidth || this.root.contentItems.length === 0 || !this.root.contentItems[ 0 ].isRow ) {
			this._firstLoad = false;
			return;
		}

		this._firstLoad = false;

		// If there is only one column, do nothing.
		var columnCount = this.root.contentItems[ 0 ].contentItems.length;
		if( columnCount <= 1 ) {
			return;
		}

		// If they all still fit, do nothing.
		var minItemWidth = this.config.dimensions.minItemWidth;
		var totalMinWidth = columnCount * minItemWidth;
		if( totalMinWidth <= this.width ) {
			return;
		}

		// Prevent updates while it is already happening.
		this._updatingColumnsResponsive = true;

		// Figure out how many columns to stack, and put them all in the first stack container.
		var finalColumnCount = Math.max( Math.floor( this.width / minItemWidth ), 1 );
		var stackColumnCount = columnCount - finalColumnCount;

		var rootContentItem = this.root.contentItems[ 0 ];
		var firstStackContainer = this._findAllStackContainers()[ 0 ];
		for( var i = 0; i < stackColumnCount; i++ ) {
			// Stack from right.
			var column = rootContentItem.contentItems[ rootContentItem.contentItems.length - 1 ];
			this._addChildContentItemsToContainer( firstStackContainer, column );
		}

		this._updatingColumnsResponsive = false;
	}
925455
private void addSizeColumn() {

        Column<CmsHistoryResourceBean, ?> col = new TextColumn<CmsHistoryResourceBean>() {

            @Override
            public String getValue(CmsHistoryResourceBean historyRes) {

                return "" + historyRes.getSize();
            }
        };
        addColumn(col, CmsHistoryMessages.columnSize());
        setColumnWidth(col, 100, Unit.PX);
    }
1272408
public final void setWidth(final int width) {
        if (style == Style.LIST_COLUMNS && (getDeviceType(context) == DeviceType.TABLET ||
                getOrientation(context) == Orientation.LANDSCAPE)) {
            columnCount = 2;
        } else if (style == Style.GRID) {
            int padding = context.getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_horizontal_padding);
            int itemSize = context.getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_size);
            columnCount = ((getDeviceType(context) != DeviceType.TABLET &&
                    context.getResources().getConfiguration().orientation ==
                            Configuration.ORIENTATION_PORTRAIT ?
                    context.getResources().getDisplayMetrics().widthPixels : width) - 2 * padding) /
                    itemSize;
        } else {
            columnCount = 1;
        }

        rawItems = null;
        notifyDataSetChanged();
    }
1360133
private void addAppLevelCSSExample() {
		String htmlClass = "my_local_class";
		add(new WHeading(HeadingLevel.H2, "Automatic (app defined) widths"));
		add(new ExplanatoryText("This example shows the use of a htmlClass and app-specific CSS (in this case inline) to style the columns.\n"
				+ "In this case the columns are: 20% and left, 50% and center, 30% and right; and the columns break to full width and are forced to "
				+ "left aligned at 1000px."));
		WPanel panel = new WPanel();
		panel.setHtmlClass(htmlClass);
		panel.setLayout(new ColumnLayout(new int[]{0, 0, 0},
				new Alignment[]{Alignment.LEFT, Alignment.CENTER, Alignment.RIGHT}));
		add(panel);
		panel.add(new BoxComponent("Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."));
		panel.add(new BoxComponent("Praesent eu turpis convallis, fringilla elit nec, ullamcorper purus. Proin dictum ac nunc rhoncus fringilla. "
				+ "Pellentesque habitant morbi tristique senectus et netus et malesuada fames."));
		panel.add(new BoxComponent("Vestibulum vehicula a turpis et efficitur. Integer maximus enim a orci posuere, id fermentum magna dignissim. "
				+ "Sed condimentum, dui et condimentum faucibus, quam erat pharetra."));
		panel.add(new BoxComponent("Left"));
		panel.add(new BoxComponent("Center"));
		panel.add(new BoxComponent("Right"));

		// .columnLayout is the local name of ColumnLayout and is guranteed, row is now part of the WComponents CSS API but _may_ change.
		String rowSelector = "." + htmlClass + " > .wc-columnlayout > .wc-row";
		String columnSelector =  rowSelector + " > .wc-column";
		String css = columnSelector
				+ " {width: 20%}"
				+ columnSelector
				+ ":first-child {width: 50%}" // the first column in the layout
				+ columnSelector
				+ ":last-child {width: 30%;}" // the last column in the layout
				+ rowSelector
				+ " + .wc-row {margin-top: 0.5em;}"  // sibling rows in the column layout
				+ "@media only screen and (max-width: 1000px) {"  //when the screen goes below 1000px wide
				+ rowSelector
				+ " {display: block;}"
				+ columnSelector + ", " + columnSelector + ":first-child, " + columnSelector + ":last-child "
				+ " {display: inline-block; box-sizing: border-box; width: 100%; text-align: left;} "
				+ columnSelector
				+ " + .wc-column {margin-top: 0.25em;}}";

		WText cssText = new WText("<style type='text/css'>" + css + "</style>");
		cssText.setEncodeText(false);
		add(cssText);
		add(new WHorizontalRule());
	}
945930
def adjust_column_width(worksheet):
    
    dims = {}
    padding = 1
    for row in worksheet.rows:
        for cell in row:
            if not cell.value:
                continue
            dims[cell.column] = max(
                dims.get(cell.column, 0),
                len(str(cell.value))
            )
    for col, value in list(dims.items()):
        worksheet.column_dimensions[col].width = value + padding
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);
    }
452117
def set_col_min_width(self, x: int, min_width: int):
        """"""
        if x < 0:
            raise IndexError('x < 0')
        self._min_widths[x] = min_width
708564
public void setStyleNames (int row, int column, String... styles)
    {
        int idx = 0;
        for (String style : styles) {
            if (idx++ == 0) {
                getFlexCellFormatter().setStyleName(row, column, style);
            } else {
                getFlexCellFormatter().addStyleName(row, column, style);
            }
        }
    }
684904
def smartResizeColumnsToContents( self ):
        
        self.blockSignals(True)
        self.setUpdatesEnabled(False)
        
        header = self.header()
        header.blockSignals(True)
        
        columns = range(self.columnCount())
        sizes = [self.columnWidth(c) for c in columns]
        header.resizeSections(header.ResizeToContents)
        
        for col in columns:
            width = self.columnWidth(col)
            if ( width < sizes[col] ):
                self.setColumnWidth(col, sizes[col])
        
        header.blockSignals(False)
        
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
288425
private void applyElementSize(Element element, int width, int height, boolean addCoordSize) {
		if (width >= 0 && height >= 0) {
			if (addCoordSize) {
				Dom.setElementAttribute(element, "coordsize", width + " " + height);
			}
			Dom.setStyleAttribute(element, "width", width + "px");
			Dom.setStyleAttribute(element, "height", height + "px");
		}
	}
571694
function() {
    var elementWidth, columnCount, containerWidth, element;

    elementWidth = get(this, 'elementWidth');
    columnCount = get(this, 'columnCount');
    containerWidth = elementWidth * columnCount;
    element = this.$('.ember-list-container');

    if (containerWidth && element) {
      element.css('width', containerWidth);
    }
  }