Adapts the width of the bottom sheet.
764874
private void adaptWidth() {
        adapter.setWidth(width);

        if (rootView != null) {
            rootView.setWidth(width);
            rootView.requestLayout();
        }
    }
642857
def set_bottom_margin(self, bottom_margin):
        
        self.__footer.style.margins.bottom = bottom_margin
        return self
104179
private void resize() {
        width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size   = width < height ? width : height;

        if (aspectRatio * width > height) {
            width = 1 / (aspectRatio / height);
        } else if (1 / (aspectRatio / height) > width) {
            height = aspectRatio * width;
        }

        if (width > 0 && height > 0) {
            pane.setMaxSize(width, height);
            pane.setPrefSize(width, height);
            pane.relocate((getWidth() - width) * 0.5, (getHeight() - height) * 0.5);

            shadow.setRadius(width * 0.012);

            switchBorder.setWidth(width);
            switchBorder.setHeight(height);
            switchBorder.setArcWidth(height);
            switchBorder.setArcHeight(height);
            switchBorder.relocate((width - switchBorder.getWidth()) * 0.5, (height - switchBorder.getHeight()) * 0.5);

            switchBackground.setWidth(width * 0.95505618);
            switchBackground.setHeight(height * 0.90909091);
            switchBackground.setArcWidth(height * 0.90909091);
            switchBackground.setArcHeight(height * 0.90909091);
            switchBackground.relocate((width - switchBackground.getWidth()) * 0.5, (height - switchBackground.getHeight()) * 0.5);

            thumb.setRadius(height * 0.40909091);
            thumb.setCenterX(isActive() ? width - thumb.getRadius() - height * 0.1 : thumb.getRadius() + height * 0.1);
            thumb.setCenterY(height * 0.5);

            redraw();
        }
    }
285029
def p_width(self, p):
        ''
        p[0] = Width(p[2], p[4], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
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
415900
void adjustLeft(float newValue) {
    	Object[] o = (Object[])attributes.get(Chunk.TAB);
    	if (o != null) {
    		attributes.put(Chunk.TAB, new Object[]{o[0], o[1], o[2], new Float(newValue)});
    	}
    }
568047
private void adaptTabLayoutEnableState() {
        if (tabLayout != null) {
            LinearLayout tabStrip = ((LinearLayout) tabLayout.getChildAt(0));
            tabStrip.setEnabled(tabLayoutEnabled);

            for (int i = 0; i < tabStrip.getChildCount(); i++) {
                tabStrip.getChildAt(i).setEnabled(tabLayoutEnabled);
            }
        }
    }
409041
def auto_adjust_widths
      column_widths = []

      rows.each do |row|
        row.columns.each_with_index do |col, i|
          column_widths[i] = [col.required_width, (column_widths[i] || 0)].max
        end
      end

      rows.each do |row|
        row.columns.each_with_index do |col, i|
          col.width = column_widths[i]
        end
      end
    end
778797
def _row_resized(self, row, old_height, new_height):
        """"""
        self.dataTable.setRowHeight(row, new_height)
        self._update_layout()
1258771
private void adaptTabLayoutVisibility() {
        if (tabLayout != null) {
            tabLayout.setVisibility(tabLayoutShown ? View.VISIBLE : View.GONE);
        }
    }
428385
private void adjustToCurrentFormat() {

        // in case of a locked or fixed image ratio height and width need to be reset
        int height = m_croppingParam.getOrgHeight();
        int width = m_croppingParam.getOrgWidth();
        if (m_croppingParam.isScaled()) {
            if (m_croppingParam.getTargetHeight() == -1) {
                height = (int)Math.floor(
                    ((1.00 * m_croppingParam.getOrgHeight()) / m_croppingParam.getOrgWidth())
                        * m_croppingParam.getTargetWidth());
            } else {
                height = m_croppingParam.getTargetHeight();
            }
            if (m_croppingParam.getTargetWidth() == -1) {
                width = (int)Math.floor(
                    ((1.00 * m_croppingParam.getOrgWidth()) / m_croppingParam.getOrgHeight())
                        * m_croppingParam.getTargetHeight());
            } else {
                width = m_croppingParam.getTargetWidth();
            }

        } else {
            m_croppingParam.setTargetHeight(height);
            m_croppingParam.setTargetWidth(width);
        }
        m_formatForm.setHeightInput(height);
        m_formatForm.setWidthInput(width);
        // enabling/disabling ratio lock button
        if (m_currentFormat.isFixedRatio()) {
            m_formatForm.setRatioButton(false, false, Messages.get().key(Messages.GUI_PRIVIEW_BUTTON_RATIO_FIXED_0));
            m_ratioLocked = true;
        } else {
            if (!m_currentFormat.isHeightEditable() && !m_currentFormat.isWidthEditable()) {
                // neither height nor width are editable, disable ratio lock button
                m_formatForm.setRatioButton(
                    false,
                    false,
                    Messages.get().key(Messages.GUI_PRIVIEW_BUTTON_NOT_EDITABLE_0));
            } else {
                m_formatForm.setRatioButton(false, true, null);
            }
            m_ratioLocked = true;
        }
        // enabling/disabling height and width input
        m_formatForm.setHeightInputEnabled(m_currentFormat.isHeightEditable() || hasUserFormatRestriction());
        m_formatForm.setWidthInputEnabled(m_currentFormat.isWidthEditable() || hasUserFormatRestriction());
    }
1154596
private void adaptLayoutParams() {
        DialogRootView rootView = getRootView();

        if (getWindow() != null && rootView != null) {
            rootView.setLayoutParams(createLayoutParams());
            rootView.setFullscreen(isFullscreen());
            rootView.setMaxWidth(getMaxWidth());
            rootView.setMaxHeight(getMaxHeight());
        }
    }
229945
protected function adaptRows()
    {
        // Go through all headers and rows, wrapping their cells until each
        // column meets the max column width.
        $maxColumnWidths = $this->getMaxColumnWidths();
        $this->setRows($this->adaptCells($this->rowsCopy, $maxColumnWidths));
    }
701941
final void resize(int newWidth, int newHeight)
    {
        final int oldWidth = widthInTile;
        final int oldheight = heightInTile;

        // Adjust height
        for (int v = 0; v < newHeight - oldheight; v++)
        {
            tiles.add(new ArrayList<Tile>(newWidth));
        }
        // Adjust width
        for (int v = 0; v < newHeight; v++)
        {
            final int width;
            if (v < oldheight)
            {
                width = newWidth - oldWidth;
            }
            else
            {
                width = newWidth;
            }
            for (int h = 0; h < width; h++)
            {
                tiles.get(v).add(null);
            }
        }

        widthInTile = newWidth;
        heightInTile = newHeight;
        radius = (int) Math.ceil(StrictMath.sqrt(newWidth * (double) newWidth + newHeight * (double) newHeight));
    }
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;
	}
992278
public function enableAreaLayoutCustomColumnWidths()
    {
        $db = Loader::db();
        $db->Execute('update AreaLayouts set arLayoutIsCustom = ? where arLayoutID = ?', array(1, $this->arLayoutID));
        $this->arLayoutIsCustom = true;
    }
962869
private void setPreferredWidth() {
    Element root = component.getDocument().getDefaultRootElement();
    int lines = root.getElementCount();
    int digits = Math.max(String.valueOf(lines).length(), minimumDisplayDigits);

    // Update sizes when number of digits in the line number changes

    if (lastDigits != digits) {
      lastDigits = digits;
      FontMetrics fontMetrics = getFontMetrics(getFont());
      int width = fontMetrics.charWidth('0') * digits;
      Insets insets = getInsets();
      int preferredWidth = insets.left + insets.right + width;

      Dimension d = getPreferredSize();
      d.setSize(preferredWidth, HEIGHT);
      setPreferredSize(d);
      setSize(d);
    }
  }