Set the width attribute. A negative (< 0) value for $width means there
is no width indicated.

@param integer $width An integer (pixels) or a string (percentage).
@throws \InvalidArgumentException If $width is not an integer value.
506988
public function setWidth($width)
    {
        if ((is_int($width) && $width === -1) || Format::isXhtmlLength($width) === true) {
            $this->width = $width;
        } else {
            $msg = "The 'width' argument must be a valid XHTML length value, '" . $width . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
769294
public function border($width, $color = null)
    {
        $this->border_width = is_numeric($width) ? intval($width) : 0;
        $this->border_color = is_null($color) ? '#000000' : $color;
    }
363300
public function resetWidth($width = 'auto')
    {
        $width = $width ?: 'auto';
        foreach($this->fields as $field) {
            $field->style('width: ' . $width);
            if ($width === 'auto') {
                $field->style('display: inline');
            }
        }
        return $this;
    }
197063
public function setWidth($width, $adjustHeight = false) {
		if ($adjustHeight && is_numeric($width)) {
			$this->_adjustDimensions('height', 'width', $width);
		}
		return $this->setAttribute('width', $width);
	}
143339
public function setSpan($span)
    {
        if (is_int($span) === true && $span > 0) {
            $this->span = $span;
        } else {
            $msg = "The 'span' attribute must be a strictly positive (> 0) integer, '" . gettype($span) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
734521
public function setShape($shape)
    {
        if (in_array($shape, QtiShape::asArray()) === true) {
            $this->shape = $shape;
        } else {
            $msg = "The 'shape' argument must be a value from the Shape enumeration, '" . $shape . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
637438
public function setWidth($width)
    {
        $this->width = null;
        if ($width && is_numeric($width)) {
            $width = (int) $width;
            if ($width > 0) {
                $this->width = $width;
            }
        }
    }
946843
public function setN($n)
    {
        if (is_int($n) || (gettype($n) === 'string' && Format::isVariableRef($n))) {
            $this->n = $n;
        } else {
            $msg = "The n attribute must be an integer or a variable reference, '" . gettype($n) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
673197
public void setWidth(java.lang.String width) {
        getStateHelper().put(PropertyKeys.width, width);
        handleAttribute("width", width);
    }
790166
public function setSize($size)
    {
        if (!is_int($size)) {
            throw new \InvalidArgumentException('The attribute size on the class Attribute has to be integer (' . gettype($size) . ('object' === gettype($size) ? ' ' . get_class($size) : '') . ' given).');
        }

        $this->size = $size;

        return $this;
    }
965152
public function resizeToWidth($width)
    {
        $height = $this->getPropHeight($width);
        $this->resize($width, $height);

        return $this;
    }
245086
public void setColumnWidth(int width)
    {
        content = new Dimension(0, 0);
        content.width = width;
        bounds.width = content.width;
    }
347218
public function setWidth($width){
		if(\is_int($width)){
			$width=Wide::getConstants()["W".$width];
		}
		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
		if(isset($this->_container)){
			$this->_container->setEqualWidth(false);
		}
		return $this->addToPropertyCtrl("class", "wide",array("wide"));
	}
529451
public function setWidth( int $width ) : ImageSizeReducer
   {

      if ( $width <= 0 )
      {
         throw new ArgumentError( 'width', $width, 'Drawing.Image', 'Can not crop an image with an empty width!' );
      }

      $this->data[ 'width' ] = $width;

      return $this;

   }
510273
public function setWidth($ftTypeWidth)
    {
        $this->ftTypeWidth = null;
        if (is_numeric($ftTypeWidth)) {
            $v = (int) $ftTypeWidth;
            if ($v > 0) {
                $this->ftTypeWidth = $v;
            }
        }
    }
941821
public function resize($width, $height, $x = 0, $y = 0)
    {
        if ( !$this->newImage )
        {
            $this->create($width, $height);
        }

        if ( !is_numeric($width) ) {
            throw new \InvalidArgumentException('$width must be numeric');
        }

        if ( !is_numeric($height) ) {
            throw new \InvalidArgumentException('$height must be numeric');
        }

        $type = $this->source['type'];

        imagecopyresampled(
            $this->newImage,
            $this->sourceImage,
            0, 0,
            $x, $y,
            $width, $height,
            $this->source['width'], $this->source['height']);

        return $this;
    }
194848
public void setBorderWidth(final double WIDTH) {
        if (null == borderWidth) {
            _borderWidth = clamp(0.0, 50.0, WIDTH);
            fireTileEvent(REDRAW_EVENT);
        } else {
            borderWidth.set(WIDTH);
        }
    }