/*
Updates the Layout and corresponding layoutData of the SimpleForm.
973934
function _updateLayout() {

		this._bChangedByMe = true;
		this._changedFormContainers = [];

		var sLayout = this.getLayout();
		var oLayout = this.getAggregation("form").getLayout();

		oLayout.setBackgroundDesign(this.getBackgroundDesign());

		switch (sLayout) {
		case SimpleFormLayout.ResponsiveLayout:
			// set the default values for linebreakes to avoid flickering for default case
			this._applyLinebreaks();

			for ( var i = 0; i < this._changedFormElements.length; i++) {
				var oFormElement = this._changedFormElements[i];
				_applyFieldWeight.call(this, oFormElement);
			}
			break;
		case SimpleFormLayout.GridLayout:
			_applyContainerSize.call(this);
			break;
		case SimpleFormLayout.ResponsiveGridLayout:
			oLayout.setLabelSpanXL(this.getLabelSpanXL());
			oLayout.setLabelSpanL(this.getLabelSpanL());
			oLayout.setLabelSpanM(this.getLabelSpanM());
			oLayout.setLabelSpanS(this.getLabelSpanS());
			oLayout.setAdjustLabelSpan(this.getAdjustLabelSpan());
			oLayout.setEmptySpanXL(this.getEmptySpanXL());
			oLayout.setEmptySpanL(this.getEmptySpanL());
			oLayout.setEmptySpanM(this.getEmptySpanM());
			oLayout.setEmptySpanS(this.getEmptySpanS());
			oLayout.setColumnsXL(this.getColumnsXL());
			oLayout.setColumnsL(this.getColumnsL());
			oLayout.setColumnsM(this.getColumnsM());
			oLayout.setSingleContainerFullSize(this.getSingleContainerFullSize());
			oLayout.setBreakpointXL(this.getBreakpointXL());
			oLayout.setBreakpointL(this.getBreakpointL());
			oLayout.setBreakpointM(this.getBreakpointM());
			break;
		case SimpleFormLayout.ColumnLayout:
			oLayout.setColumnsXL(this.getColumnsXL() > 0 ? this.getColumnsXL() : this.getColumnsL());
			oLayout.setColumnsL(this.getColumnsL());
			oLayout.setColumnsM(this.getColumnsM());
			oLayout.setLabelCellsLarge(this.getLabelSpanL());
			oLayout.setEmptyCellsLarge(this.getEmptySpanL());
			break;
			// no default
		}

		this._changedFormElements = [];
		this._bChangedByMe = false;

	}
733046
def setLayout(self, value):
        
        new_layout = sorted(value, key=lambda k: k['position'])
        self.getField('Layout').set(self, new_layout)
59576
function layoutChanged(oldpage, newpage) {
      if (oldpage && oldpage.fixlayout) return true;
      if (lang(oldpage) !== lang(newpage)) return true;
      var currentlayout = $layout.attr('data-render-layout') || 'main-layout';
      var newlayout = generator.layoutTemplate(newpage);
      return (newlayout !== currentlayout);
    }
266966
function _updateLayoutDataOfContentResponsiveFlowLayout( oRFLayout, aFields ) {

		var oLD;
		var iWeight = 0;
		for ( var i = 0; i < aFields.length; i++) {
			var oField = aFields[i];
			oLD = this.getLayoutDataForElement(oField, "sap.ui.layout.ResponsiveFlowLayoutData");
			if (oLD) {
				iWeight = iWeight + oLD.getWeight();
			} else {
				iWeight++;
			}
		}

		oLD = oRFLayout.getLayoutData();
		if (oLD) {
			oLD.setWeight(iWeight);
		} else {
			oRFLayout.setLayoutData(
					new ResponsiveFlowLayoutData({weight: iWeight})
			);
		}

	}
289612
void updateModel() {
        for (int i = 0; i < expressions.size(); ++i) {
            String expr = expressions.get(i);
            String result = "";
            if (expr.length() > 0) {
                result = debugGui.dim.eval(expr);
                if (result == null) result = "";
            } else {
                result = "";
            }
            result = result.replace('\n', ' ');
            values.set(i, result);
        }
        fireTableDataChanged();
    }
1130605
private function updateLayoutModifiedDate(Layout $layout): void
    {
        $updatedLayout = clone $layout;
        $updatedLayout->modified = time();
        $this->queryHandler->updateLayout($updatedLayout);
    }
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;
                }


            }
        }


    }
1141289
private void updateValue() {
        if (list != null) {
            int oldCount = this.count;
            this.count = list.getSelectedIndices().length;
            maybeNotifyListeners(oldCount, count);
        }
    }
100198
public void setButtonLayout(final Layout layout) {
		RadioButtonSelectModel model = getOrCreateComponentModel();
		model.layout = layout;
		model.numColumns = 0;
	}
221809
private void updateButtonBars() {

        List<I_CmsEditableGroupRow> rows = getRows();
        int i = 0;
        for (I_CmsEditableGroupRow row : rows) {
            boolean first = i == 0;
            boolean last = i == (rows.size() - 1);
            row.getButtonBar().setFirstLast(first, last, m_hideAdd);
            i += 1;
        }
    }
1252359
@Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);

        // See if the image needs redrawing
        refreshImage(false);
    }
232502
public void updateInternals()
	{
		if (null == getContainer())
		{
			return;
		}
		super.updateInternals();

		UnitConverter _uc = UnitConverter.getCachedInstance(getContainer().getSheetOfPaper().getPixelPerInch());
		double _zoom = getContainer().convertMillimeterToUnit(_uc.convertPointToMillimiter(1));

		myInternalFont = getFont().deriveFont(AffineTransform.getScaleInstance(_zoom, _zoom));

		// update textformat
		myTextFormat.clear();
		myTextFormat.put(TextAttribute.FONT, myInternalFont);

		myLineBreakMeasurer = new LineBreakMeasurer(new AttributedString(getText(), myTextFormat).getIterator(),
				new FontRenderContext(null, true, true));

		try
		{
			float _wrappingWidth = (float) getFullBounds().getWidth();
			myTextLayout = myLineBreakMeasurer.nextLayout(_wrappingWidth);
			myTextLayouts.clear();
			myTextLayouts.add(myTextLayout);
			while (myLineBreakMeasurer.getPosition() > 0 && myLineBreakMeasurer.getPosition() < getText().length())
			{
				myTextLayouts.add(myLineBreakMeasurer.nextLayout(_wrappingWidth));
			}
		}
		catch (PaperContentIsUnattachedException _exception)
		{
			// Should not arrive
			throw new RuntimeException("Impossible error");
		}
		myBaseLineOffset = myTextLayout.getAscent();
		myTextHeight = myBaseLineOffset + myTextLayout.getDescent();
		myLineHeight = myTextHeight + myTextLayout.getLeading();

		// adjust the height
		double _realHeight = myTextHeight; // at least one line
		if (myTextLayouts.size() > 1)
		{
			_realHeight += ((myTextLayouts.size() - 1) * myLineHeight);
		}
		setCoreHeight(getContainer().convertUnitToMillimeter(_realHeight));
		super.updateInternals();
	}
1007086
@Override
	public void updateComponent(final Object data) {
		MyData myData = (MyData) data;
		name.setText("<B>" + myData.getName() + "</B>");
		count.setText(String.valueOf(myData.getCount()));
	}
1161987
function formDataFromLayout(locals, uri) {
  return function (result) {
    const _layoutRef = result.layout,
      pageData = references.omitPageConfiguration(result);

    return components.get(_layoutRef, locals)
      .then(layout => mapLayoutToPageData(pageData, layout))
      .then(mappedData => module.exports.formDataForRenderer(mappedData, { _layoutRef, _ref: uri }, locals));
  };
}
106908
@Override
    public void cloneLayout(LayoutIdentifier layout, LayoutIdentifier layout2) {
        String text = getLayoutContent(layout);
        saveLayout(layout2, text);
    }
581175
def set_layout(self, value):
        """"""
        # Can't do this with changes_squashed as it will call update_modified
        # from another thread and deadlock. Need RLock.is_owned() from update_*
        part_info = self.run_hooks(
            LayoutHook(p, c, self.port_info, value)
            for p, c in self.create_part_contexts(only_visible=False).items())
        with self.changes_squashed:
            layout_parts = LayoutInfo.filter_parts(part_info)
            name, mri, x, y, visible = [], [], [], [], []
            for part_name, layout_infos in layout_parts.items():
                for layout_info in layout_infos:
                    name.append(part_name)
                    mri.append(layout_info.mri)
                    x.append(layout_info.x)
                    y.append(layout_info.y)
                    visible.append(layout_info.visible)
            layout_table = LayoutTable(name, mri, x, y, visible)
            try:
                # Compare the Array seq to get at the numpy array
                np.testing.assert_equal(
                    layout_table.visible.seq, self.layout.value.visible.seq)
            except AssertionError:
                visibility_changed = True
            else:
                visibility_changed = False
            self.layout.set_value(layout_table)
            if self.saved_visibility is None:
                # First write of table, set layout and exports saves
                self.saved_visibility = layout_table.visible
                self.saved_exports = self.exports.value.to_dict()
                # Force visibility changed so we update_block_endpoints
                # even if there weren't any visible
                visibility_changed = True
            if visibility_changed:
                self.update_modified()
                self.update_exportable()
                # Part visibility changed, might have attributes or methods
                # that we need to hide or show
                self.update_block_endpoints()
1190714
private void updateFields() {
		if (featureInfo != null) {
			// Create a header field for each attribute definition:
			List<ListGridField> fields = new ArrayList<ListGridField>();
			if (idInTable) {
				ListGridField gridField = new ListGridField(ID_NAME, "ID");
				gridField.setAlign(Alignment.LEFT);
				gridField.setCanEdit(false);
				fields.add(gridField);
			}

			for (AttributeInfo attributeInfo : featureInfo.getAttributes()) {
				if (!attributeInfo.isHidden() && (attributeInfo.isIdentifying() || allAttributesDisplayed)) {
					fields.add(createAttributeGridField(attributeInfo));
				}
			}
			setFields(fields.toArray(new ListGridField[fields.size()]));
			setCanResizeFields(true);
		}
	}