if we detect that one of the dialog buttons are greater
than the max horizontal layout width of 124dp then to switch the
orientation to {@link #VERTICAL}
765466
@Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        super.onLayout(changed, l, t, r, b);

        if(getOrientation() == HORIZONTAL) {
            int N = getChildCount();
            for (int i = 0; i < N; i++) {

                View child = getChildAt(i);
                int width = child.getWidth();
                if (width > MAX_BUTTON_WIDTH || (N>=3 && width > MIN_BUTTON_WIDTH)) {

                    // Clear out the children list in preparation for new manipulation
                    children.clear();

                    // Update the children's params
                    for (int j = 0; j < N; j++) {
                        RippleView chd = (RippleView) getChildAt(j);
                        Button btn = (Button) chd.getChildAt(0);
                        btn.setGravity(Gravity.END|Gravity.CENTER_VERTICAL);
                        children.add(chd);
                    }

                    // Clear out the chitlens
                    removeAllViews();

                    // Sort buttons properly
                    Collections.sort(children, mButtonComparator);

                    // Re-Add all the views
                    for(int j=0; j<children.size(); j++){
                        View chd = children.get(j);
                        addView(chd);
                    }

                    // Switch orientation
                    setOrientation(VERTICAL);
                    requestLayout();
                    return;
                }


            }
        }


    }
154993
@Override
	void changeViewPosition(float xAxisDelta, float yAxisDelta) {
		ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) getView().getLayoutParams();
		if (isViewLeftAligned(layoutParams)) {
			layoutParams.leftMargin += xAxisDelta;
		} else {
			layoutParams.rightMargin -= xAxisDelta;
		}
		if (isViewTopAligned(layoutParams)) {
			layoutParams.topMargin += yAxisDelta;
		} else {
			layoutParams.bottomMargin -= yAxisDelta;
		}
		LOGGER.trace("Updated view margins: left = {}, top = {}, right = {}, bottom = {}",
				layoutParams.leftMargin, layoutParams.topMargin, layoutParams.rightMargin, layoutParams.bottomMargin);
		getView().setLayoutParams(layoutParams);
	}
1358619
function changeLayout(cls) {
        $('body').toggleClass(cls)
        $layout.fixSidebar()
        if ($('body').hasClass('fixed') && cls == 'fixed') {
            $pushMenu.expandOnHover()
            $layout.activate()
        }
        $controlSidebar.fix()
    }
990974
public void setUseMinWidth(boolean useMinWidth) {

        if (useMinWidth != m_useMinWidth) {
            if (useMinWidth) {
                addStyleName(I_CmsLayoutBundle.INSTANCE.buttonCss().cmsMinWidth());
            } else {
                removeStyleName(I_CmsLayoutBundle.INSTANCE.buttonCss().cmsMinWidth());
            }
            m_useMinWidth = useMinWidth;
        }
    }
49828
public void setOrientation (int orientation)
    {
        GroupLayout gl = (orientation == HORIZONTAL) ?
            (GroupLayout)new HGroupLayout() : new VGroupLayout();
        gl.setPolicy(GroupLayout.EQUALIZE);
        setLayout(gl);
    }
1110474
public void setPadding(float padding, Layout.Axis axis) {
        OrientedLayout layout = null;
        switch(axis) {
            case X:
                layout = mShiftLayout;
                break;
            case Y:
                layout = mShiftLayout;
                break;
            case Z:
                layout = mStackLayout;
                break;
        }
        if (layout != null) {
            if (!equal(layout.getDividerPadding(axis), padding)) {
                layout.setDividerPadding(padding, axis);

                if (layout.getOrientationAxis() == axis) {
                    requestLayout();
                }
            }
        }

    }
644833
@Override
  public void updatePosition(float verticalDragOffset) {
    int right = getViewRightPosition(verticalDragOffset);
    int left = right - layoutParams.width;
    int top = getView().getTop();
    int bottom = top + layoutParams.height;

    getView().layout(left, top, right, bottom);
  }
992278
public function enableAreaLayoutCustomColumnWidths()
    {
        $db = Loader::db();
        $db->Execute('update AreaLayouts set arLayoutIsCustom = ? where arLayoutID = ?', array(1, $this->arLayoutID));
        $this->arLayoutIsCustom = true;
    }
991968
private void obtainDialogMaxHeight(@NonNull final TypedArray typedArray) {
        try {
            int maxHeight = typedArray
                    .getDimensionPixelSize(R.styleable.DialogPreference_dialogMaxHeight, -1);

            if (maxHeight != -1) {
                setDialogMaxHeight(maxHeight);
            }
        } catch (Resources.NotFoundException | UnsupportedOperationException e) {
            // No need to handle
        }
    }
276507
public void centerDialogInFrame(Dialog dialog, Frame frame)
    {
        dialog.setLocation(frame.getX() + (frame.getWidth() - dialog.getWidth()) / 2, frame.getY() + (frame.getHeight() - dialog.getHeight()) / 2);
    }
174973
public void setVerticalLayout(VerticalLayout layout, boolean addAll) {

        if (m_results.size() > 0) {
            if (addAll) {
                for (CmsResourceTypeStatResult result : m_results) {
                    layout.addComponent(getLayoutFromResult(result), 0);
                }
            } else {
                CmsResourceTypeStatResult statResult = m_results.get(m_results.size() - 1);

                if (m_updated) {
                    removeRow(layout, statResult);
                }
                layout.addComponent(getLayoutFromResult(statResult), 0);
            }
        }
    }
931219
private void adjustBannerTextVerticalBias(float percentBias) {
    if (!isLandscape()) {
      ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) instructionLayoutText.getLayoutParams();
      params.verticalBias = percentBias;
      instructionLayoutText.setLayoutParams(params);
    }
  }
123747
public void setMaxViewport(Viewport maxViewport) {
        setMaxViewport(maxViewport.left, maxViewport.top, maxViewport.right, maxViewport.bottom);
    }
1154596
private void adaptLayoutParams() {
        DialogRootView rootView = getRootView();

        if (getWindow() != null && rootView != null) {
            rootView.setLayoutParams(createLayoutParams());
            rootView.setFullscreen(isFullscreen());
            rootView.setMaxWidth(getMaxWidth());
            rootView.setMaxHeight(getMaxHeight());
        }
    }
745111
public final void setMaxWidth(final int maxWidth) {
        if (maxWidth != -1) {
            Condition.INSTANCE.ensureAtLeast(maxWidth, 1, "The maximum width must be at least 1");
        }

        this.maxWidth = maxWidth;
        requestLayout();
    }
628612
public final void setOrientation(int orientation) {
        mOrientation = orientation;
        mOrientationState = getOrientationStateFromParam(mOrientation);
        invalidate();
        if (mOuterAdapter != null) {
            mOuterAdapter.setOrientation(mOrientation);
        }

    }
1323015
function () {
        var self = this, statusbar = self.statusbar, layoutRect, width, x, needsRecalc;

        if (self._fullscreen) {
          self.layoutRect(DomUtils.getWindowSize());
          self.layoutRect().contentH = self.layoutRect().innerH;
        }

        self._super();

        layoutRect = self.layoutRect();

        // Resize window based on title width
        if (self.settings.title && !self._fullscreen) {
          width = layoutRect.headerW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width / 2);
            self.layoutRect({ w: width, x: x });
            needsRecalc = true;
          }
        }

        // Resize window based on statusbar width
        if (statusbar) {
          statusbar.layoutRect({ w: self.layoutRect().innerW }).recalc();

          width = statusbar.layoutRect().minW + layoutRect.deltaW;
          if (width > layoutRect.w) {
            x = layoutRect.x - Math.max(0, width - layoutRect.w);
            self.layoutRect({ w: width, x: x });
            needsRecalc = true;
          }
        }

        // Recalc body and disable auto resize
        if (needsRecalc) {
          self.recalc();
        }
      }