Set the top margin of the view.

@param margin
The top margin, which should be set, in pixels as an {@link Integer} value
6336
private void setTopMargin(final int margin) {
        FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) getLayoutParams();
        layoutParams.topMargin = margin;
        setLayoutParams(layoutParams);
    }
698547
public void setWidth(String width) {

        try {
            m_width = Integer.parseInt(width);
        } catch (NumberFormatException e) {
            m_width = -1;
        }
    }
617481
@Override
    public void setSize(float width, float height)
    {
        if (view != null)
        {
            view.setSize(width, height);
        }
    }
601181
private void setBar(final double VALUE) {
        barCtx.clearRect(0, 0, size, size);
        barCtx.setLineCap(StrokeLineCap.BUTT);
        barCtx.setStroke(barColor);
        barCtx.setLineWidth(barWidth);

        if (sectionsVisible) {
            int listSize = sections.size();
            for (int i = 0 ; i < listSize ;i++) {
                Section section = sections.get(i);
                if (section.contains(VALUE)) {
                    barCtx.setStroke(section.getColor());
                    break;
                }
            }
        }

        if (thresholdVisible && VALUE > gauge.getThreshold()) {
            barCtx.setStroke(thresholdColor);
        }

        double v             = (VALUE - minValue) * angleStep;
        int    minValueAngle = (int) (-minValue * angleStep);
        if (!isStartFromZero) {
            for (int i = 0; i < 280; i++) {
                if (i % 10 == 0 && i < v) {
                    barCtx.strokeArc(barWidth * 0.5 + barWidth * 0.1, barWidth * 0.5 + barWidth * 0.1, size - barWidth - barWidth * 0.2, size - barWidth - barWidth * 0.2, (-i - 139), 9.2, ArcType.OPEN);
                }
            }
        } else {
            if (Double.compare(VALUE, 0) != 0) {
                if (VALUE < 0) {
                    for (int i = Math.min(minValueAngle, 280) - 1; i >= 0; i--) {
                        if (i % 10 == 0 && i > v - 10) {
                            barCtx.strokeArc(barWidth * 0.5 + barWidth * 0.1, barWidth * 0.5 + barWidth * 0.1, size - barWidth - barWidth * 0.2, size - barWidth - barWidth * 0.2, (-i - 139), 9.2, ArcType.OPEN);
                        }
                    }
                } else {
                    for (int i = Math.max(minValueAngle, 0) - 5; i < 280; i++) {
                        if (i % 10 == 0 && i < v) {
                            barCtx.strokeArc(barWidth * 0.5 + barWidth * 0.1, barWidth * 0.5 + barWidth * 0.1, size - barWidth - barWidth * 0.2, size - barWidth - barWidth * 0.2, (-i - 139), 9.2, ArcType.OPEN);
                        }
                    }
                }
            }
        }
        valueText.setText(formatNumber(gauge.getLocale(), gauge.getFormatString(), gauge.getDecimals(), VALUE));
        valueText.setLayoutX(valueBkgText.getLayoutBounds().getMaxX() - valueText.getLayoutBounds().getWidth());
    }
1214890
public void setWidth(int width)
    {
        content.width = width - border.left - padding.left - padding.right - border.right;
        bounds.width = width;
        wset = true;
        updateChildSizes();
    }
394710
def setup_margins(self, linenumbers=True, markers=True):
        
        self._margin = linenumbers
        self._markers_margin = markers
        self.set_enabled(linenumbers or markers)
1029297
public void setOutlineDepthRange(IntegerRange level) {
		if (level == null) {
			this.outlineDepthRange = new IntegerRange(DEFAULT_OUTLINE_TOP_LEVEL, DEFAULT_OUTLINE_TOP_LEVEL);
		} else {
			this.outlineDepthRange = level;
		}
	}
287650
public void setHeaderDivider(Drawable drawable) {
        mHeaderDivider = drawable;
        if (drawable != null) {
            mHeaderDividerHeight = drawable.getIntrinsicHeight();
        } else {
            mHeaderDividerHeight = 0;
        }
        mContentView.setWillNotDraw(drawable == null);
        mContentView.invalidate();
    }
197077
function(margin) {
      if (!this.length) {
        return 0;
      }
      return margin ? this[0].offsetWidth + parseInt(getComputedStyle(this[0]).marginLeft) + parseInt(getComputedStyle(this[0]).marginRight) : this[0].offsetWidth;
    }
9694
public void setHeader(@NonNull View view, boolean padding, boolean divider, DimenHolder height) {
        mDrawerBuilder.getHeaderAdapter().clear();
        if (padding) {
            mDrawerBuilder.getHeaderAdapter().add(new ContainerDrawerItem().withView(view).withDivider(divider).withHeight(height).withViewPosition(ContainerDrawerItem.Position.TOP));
        } else {
            mDrawerBuilder.getHeaderAdapter().add(new ContainerDrawerItem().withView(view).withDivider(divider).withHeight(height).withViewPosition(ContainerDrawerItem.Position.NONE));
        }
        //we need to set the padding so the header starts on top
        mDrawerBuilder.mRecyclerView.setPadding(mDrawerBuilder.mRecyclerView.getPaddingLeft(), 0, mDrawerBuilder.mRecyclerView.getPaddingRight(), mDrawerBuilder.mRecyclerView.getPaddingBottom());
    }
978026
public function setMargin($margin = 0) {
		$margin = $this->parseSizes($margin);

		foreach ($margin as $side => $value) {
			if (! is_int($value) || $value < 0) {
				throw new InvalidArgumentException(sprintf(
					'Invalid %s margin: "%s". Must be a positive integer value.',
					$side, $value
				));
			}

			$this->margin[$side] = $value;
		}
	}
575708
public void setMargin(@Nullable String marginString) {
        if (!TextUtils.isEmpty(marginString)) {
            // remove leading and ending '[' ']'
            try {
                marginString = marginString.trim().substring(1, marginString.length() - 1);
                String marginStringArray[] = marginString.split(",");
                int size = marginStringArray.length > 4 ? 4 : marginStringArray.length;
                for (int i = 0; i < size; i++) {
                    String marginStr = marginStringArray[i];
                    if (!TextUtils.isEmpty(marginStr)) {
                        margin[i] = parseSize(marginStr.trim().replace("\"", ""), 0);
                    } else {
                        margin[i] = 0;
                    }
                }
                Arrays.fill(margin, size, margin.length, margin[size - 1]);
            } catch (Exception e) {
                Arrays.fill(margin, 0);
            }
        }
    }
1085773
def margin(self, value):
        

        if value is not None:
            assert type(value) is int, "'{0}' attribute: '{1}' type is not 'int'!".format("margin", value)
            assert value > 0, "'{0}' attribute: '{1}' need to be exactly positive!".format("margin", value)
        self.__margin = value
1134520
protected void setImagePreview(String realPath, String imagePath) {

        if ((m_croppingParam == null) || !getFormValueAsString().contains(m_croppingParam.toString())) {
            m_croppingParam = CmsCroppingParamBean.parseImagePath(getFormValueAsString());
        }
        CmsCroppingParamBean restricted;
        int marginTop = 0;
        if (m_croppingParam.getScaleParam().isEmpty()) {
            imagePath += "?__scale=w:165,h:114,t:1,c:white,r:0";
        } else {
            restricted = m_croppingParam.getRestrictedSizeParam(114, 165);
            imagePath += "?" + restricted.toString();
            marginTop = (114 - restricted.getResultingHeight()) / 2;
        }
        Element image = DOM.createImg();
        image.setAttribute("src", imagePath);
        image.getStyle().setMarginTop(marginTop, Unit.PX);
        if (CmsClientStringUtil.checkIsPathOrLinkToSvg(realPath)) {
            image.getStyle().setWidth(100, Unit.PCT);
            image.getStyle().setHeight(100, Unit.PCT);
        }
        m_imagePreview.setInnerHTML("");
        m_imagePreview.appendChild(image);
    }
708074
protected void setWidth(View view, int width) {
        ViewGroup.LayoutParams lp = view.getLayoutParams();
        lp.width = width;
        view.setLayoutParams(lp);
    }
796052
public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) {
        if (writer != null && writer.isPaused()) {
            return false;
        }
        nextMarginLeft = marginLeft;
        nextMarginRight = marginRight;
        nextMarginTop = marginTop;
        nextMarginBottom = marginBottom;
        return true;
    }
903091
def _set_view(self):
        """"""
        if self.logarithmic:
            view_class = PolarThetaLogView
        else:
            view_class = PolarThetaView

        self.view = view_class(
            self.width - self.margin_box.x, self.height - self.margin_box.y,
            self._box
        )