Sets the border position.<p>

@param height the height
@param width the width
@param positionLeft the absolute left position
@param positionTop the absolute top position
960960
public void setPosition(int height, int width, int positionLeft, int positionTop) {

        positionLeft -= m_borderOffset;

        // make sure highlighting does not introduce additional horizontal scroll-bars
        if ((m_positioningParent == null) && (positionLeft < 0)) {
            // position left should not be negative
            width += positionLeft;
            positionLeft = 0;
        }
        width += (2 * m_borderOffset) - BORDER_WIDTH;
        if ((m_positioningParent == null)
            && (Window.getClientWidth() < (width + positionLeft))
            && (Window.getScrollLeft() == 0)) {
            // highlighting should not extend over the right hand
            width = Window.getClientWidth() - (positionLeft + BORDER_WIDTH);
        }
        Style style = getElement().getStyle();
        style.setLeft(positionLeft, Unit.PX);
        style.setTop(positionTop - m_borderOffset, Unit.PX);
        setHeight((height + (2 * m_borderOffset)) - BORDER_WIDTH);
        setWidth(width);
    }
1279157
private void setHeight(int height) {

        m_borderRight.getStyle().setHeight(height, Unit.PX);
        m_borderLeft.getStyle().setHeight(height, Unit.PX);
        m_borderBottom.getStyle().setTop(height, Unit.PX);
    }
597845
public final void setBorderWidth(int unit,
                                     int size) {
        if (size < 0) {
            throw new IllegalArgumentException("Border width cannot be less than zero.");
        }

        int scaledSize = (int) TypedValue.applyDimension(unit, size, getResources().getDisplayMetrics());
        setBorderInternal(scaledSize, mBorderColor, true);
    }
790098
public void setHeight(int height) {

        m_defaultHeight = height;
        m_scrollPanel.setHeight(m_defaultHeight + "px");
        m_scrollPanel.setDefaultHeight(m_defaultHeight);
        m_scrollPanel.onResizeDescendant();
    }
631046
@Override
    public void position(long pos) {
        log.debug("position: {}", pos);
        currentFrame = getFrame(pos);
        log.debug("Setting current sample: {}", currentFrame);
    }
8301
public void setSplitterPosition(int position) {
        mSplitterPosition = clamp(position, 0, Integer.MAX_VALUE);
        mSplitterPositionPercent = -1;
        remeasure();
        notifySplitterPositionChanged(false);
    }
1045141
public void setContentRect(int width, int height, int paddingLeft, int paddingTop, int paddingRight,
                               int paddingBottom) {
        chartWidth = width;
        chartHeight = height;
        maxContentRect.set(paddingLeft, paddingTop, width - paddingRight, height - paddingBottom);
        contentRectMinusAxesMargins.set(maxContentRect);
        contentRectMinusAllMargins.set(maxContentRect);
    }
604678
public void setBorderWidth(int borderWidth) {
		this.borderWidth = borderWidth;
		if(paintBorder != null)
			paintBorder.setStrokeWidth(borderWidth);
		requestLayout();
		invalidate();
	}
1317714
private void setSelectHeight(int height) {

        m_markerStyle.setHeight(height, Unit.PX);

        m_overlayBottomStyle.setHeight(m_elementHeight - m_currentSelection.getTop() - height, Unit.PX);

        m_currentSelection.setHeight(height);
    }
330570
@Override
    public void setCursorPosition(TerminalPosition position) {
        if(position == null) {
            //Skip any validation checks if we just want to hide the cursor
            this.cursorPosition = null;
            return;
        }
        if(position.getColumn() < 0) {
            position = position.withColumn(0);
        }
        if(position.getRow() < 0) {
            position = position.withRow(0);
        }
        if(position.getColumn() >= terminalSize.getColumns()) {
            position = position.withColumn(terminalSize.getColumns() - 1);
        }
        if(position.getRow() >= terminalSize.getRows()) {
            position = position.withRow(terminalSize.getRows() - 1);
        }
        this.cursorPosition = position;
    }
685509
public void setAreaPosition(boolean relative, CmsPositionBean pos) {

        if (pos == null) {
            return;
        }
        m_state = State.SELECTED;
        showSelect(true);
        m_currentSelection = new CmsPositionBean();
        m_firstX = pos.getLeft();
        m_firstY = pos.getTop();
        if (!relative) {
            m_firstX -= getElement().getAbsoluteLeft();
            m_firstY -= getElement().getAbsoluteTop();
        }
        //        setSelectPosition(m_firstX, m_firstY, 0, 0);
        setSelectPosition(m_firstX, m_firstY, pos.getHeight(), pos.getWidth());
    }
1259279
public function setRegion(int $left, int $top, int $width, int $height) : void
    {
        if ($top < 0 || $left < 0) {
            throw new InvalidArgumentException('Left and top must be non-negative');
        }

        if ($height < 1 || $width < 1) {
            throw new InvalidArgumentException('Width and height must be at least 1');
        }

        $right = $left + $width;
        $bottom = $top + $height;

        if ($bottom > $this->height || $right > $this->width) {
            throw new InvalidArgumentException('The region must fit inside the matrix');
        }

        for ($y = $top; $y < $bottom; ++$y) {
            $offset = $y * $this->rowSize;

            for ($x = $left; $x < $right; ++$x) {
                $index = $offset + ($x >> 5);
                $this->bits[$index] = $this->bits[$index] | (1 << ($x & 0x1f));
            }
        }
    }
711594
public void setSelectedItem(PositionableInCharStream elmnt) {
  		CharStreamPosition pos = null;
  		if (elmnt != null)
  			pos = elmnt.getCharStreamPosition();
  		if (pos != null) {
	  		int begin = pos.getStartIndex();
	  		int end = pos.getEndIndex();
	  		try	{
	  			setCaretPosition(end);
				moveCaretPosition(begin);
				getCaret().setSelectionVisible(true);
				repaint();
	  		}
	  		catch (IllegalArgumentException ignored)
	  		{}
  		}
  	}
823496
public static void borderTable(XWPFTable table, int size) {
        CTTblPr tblPr = getTblPr(table);
        CTTblBorders tblBorders = tblPr.getTblBorders();
        BigInteger borderSize = BigInteger.valueOf(size);
        tblBorders.getBottom().setSz(borderSize);
        tblBorders.getLeft().setSz(borderSize);
        tblBorders.getTop().setSz(borderSize);
        tblBorders.getRight().setSz(borderSize);
        tblBorders.getInsideH().setSz(borderSize);
        tblBorders.getInsideV().setSz(borderSize);
    }
641339
public void set(Viewport src) {
        this.left = src.left;
        this.top = src.top;
        this.right = src.right;
        this.bottom = src.bottom;
    }
562650
public void setViewportTopLeft(float left, float top) {
        /**
         * Constrains within the scroll range. The scroll range is simply the viewport extremes (AXIS_X_MAX,
         * etc.) minus
         * the viewport size. For example, if the extrema were 0 and 10, and the viewport size was 2, the scroll range
         * would be 0 to 8.
         */

        final float curWidth = currentViewport.width();
        final float curHeight = currentViewport.height();

        left = Math.max(maxViewport.left, Math.min(left, maxViewport.right - curWidth));
        top = Math.max(maxViewport.bottom + curHeight, Math.min(top, maxViewport.top));
        constrainViewport(left, top, left + curWidth, top - curHeight);
    }
470371
private void setBorder(int borderPosition, int borderStyle, float borderWidth, Color borderColor) {
        RtfBorder border = new RtfBorder(this.document, this.borderType, borderPosition, borderStyle, borderWidth, borderColor);
        this.borders.put(Integer.valueOf(borderPosition), border);
    }