Sets the width and height styles of the Stage.

   state.size = [100, 200]
   state.size = ["50%", "100%"] # consuming 50% of the width and 100% of the height of the screen
976540
def size=(*values)
      values = values[0] if values.size == 1 && values[0].is_a?(Array)
      @peer.set_size_styles(values[0], values[1])
    end
1150022
public void setCustomViewSizes(Dimension... sizes) {
		assert customSizes != null;
		if (sizes == null) {
			customSizes.clear();
			return;
		}
		customSizes = Arrays.asList(sizes);
	}
437364
def init_width(self):
        
        self.col_width = self.c.winfo_width()/self.cols
        self.row_height = self.c.winfo_height()/self.rows
962869
private void setPreferredWidth() {
    Element root = component.getDocument().getDefaultRootElement();
    int lines = root.getElementCount();
    int digits = Math.max(String.valueOf(lines).length(), minimumDisplayDigits);

    // Update sizes when number of digits in the line number changes

    if (lastDigits != digits) {
      lastDigits = digits;
      FontMetrics fontMetrics = getFontMetrics(getFont());
      int width = fontMetrics.charWidth('0') * digits;
      Insets insets = getInsets();
      int preferredWidth = insets.left + insets.right + width;

      Dimension d = getPreferredSize();
      d.setSize(preferredWidth, HEIGHT);
      setPreferredSize(d);
      setSize(d);
    }
  }
411793
function(){
    this.width = this.container.width();
    this.height = this.container.height();
    this.resize();
    this.canvas.setSize(this.width, this.height);
    this.applyTransform();
  }
1079547
def set_focus_to_state_model(self, state_m, ratio_requested=0.8):
        
        state_machine_m = self.model
        state_v = self.canvas.get_view_for_model(state_m)
        if state_v is None:
            logger.warning('There is no view for state model {0}'.format(state_m))
        self.move_item_into_viewport(state_v)
        # check_relative size in view and call it again if the state is still very small
        state_v = self.canvas.get_view_for_model(state_machine_m.root_state)
        state_size = self.view.editor.get_matrix_i2v(state_v).transform_distance(state_v.width, state_v.height)
        viewport_size = self.view.editor.get_allocation().width, self.view.editor.get_allocation().height
        if state_size[0] < ratio_requested*viewport_size[0] and state_size[1] < ratio_requested*viewport_size[1]:
            self.set_focus_to_state_model(state_m, ratio_requested)
630822
function( width, height ) {
		if( arguments.length === 2 ) {
			this.width = width;
			this.height = height;
		} else {
			this.width = this.container.width();
			this.height = this.container.height();
		}

		if( this.isInitialised === true ) {
			this.root.callDownwards( 'setSize', [ this.width, this.height ] );

			if( this._maximisedItem ) {
				this._maximisedItem.element.width( this.container.width() );
				this._maximisedItem.element.height( this.container.height() );
				this._maximisedItem.callDownwards( 'setSize' );
			}

			this._adjustColumnsResponsive();
		}
	}
220191
public void setSizes(Collection<Size> sizes) {
        for (Size size : sizes) {
            if (size.getLabel() == Size.SMALL) {
                smallSize = size;
            } else if (size.getLabel() == Size.SQUARE) {
                squareSize = size;
            } else if (size.getLabel() == Size.THUMB) {
                thumbnailSize = size;
            } else if (size.getLabel() == Size.MEDIUM) {
                mediumSize = size;
            } else if (size.getLabel() == Size.LARGE) {
                largeSize = size;
            } else if (size.getLabel() == Size.LARGE_1600) {
                large1600Size = size;
            } else if (size.getLabel() == Size.LARGE_2048) {
                large2048Size = size;
            } else if (size.getLabel() == Size.ORIGINAL) {
                originalSize = size;
            } else if (size.getLabel() == Size.SQUARE_LARGE) {
                squareLargeSize = size;
            } else if (size.getLabel() == Size.SMALL_320) {
                small320Size = size;
            } else if (size.getLabel() == Size.MEDIUM_640) {
                medium640Size = size;
            } else if (size.getLabel() == Size.MEDIUM_800) {
                medium800Size = size;
            } else if (size.getLabel() == Size.VIDEO_PLAYER) {
                videoPlayer = size;
            } else if (size.getLabel() == Size.SITE_MP4) {
                siteMP4 = size;
            } else if (size.getLabel() == Size.VIDEO_ORIGINAL) {
                videoOriginal = size;
            }
            else if (size.getLabel() == Size.MOBILE_MP4) {
            	mobileMP4 = size;
            }
            else if (size.getLabel() == Size.HD_MP4) {
            	hdMP4 = size;
            }
        }
    }
897242
function setCanvasSize (width, height) {
            canvas.setAttribute('width', width);
            canvas.setAttribute('height', height);
            canvas.style.width = width + 'px';
            canvas.style.height = height + 'px';
        }
1347582
private void setWidth(int width) {
        contentParams.width = options.fullScreenPeek() ? screenWidth : width;
        content.setLayoutParams(contentParams);
    }
947086
def resize(self, width, height):
        
        self._width = width
        self._height = height
        if width != "fill":
            self._set_tk_config("width", width)
        if height != "fill":
            self._set_tk_config("height", height)
        if width == "fill" or height == "fill":
            self.master.display_widgets()
637078
public final void setScreenSize(int width, int height)
    {
        screenWidth = width;
        screenHeight = height;
        final double scaleH = width / (double) Scene.NATIVE.getWidth();
        final double scaleV = height / (double) Scene.NATIVE.getHeight();
        this.scaleH = scaleH;
        this.scaleV = scaleV;
        primary.updateMainY();
        secondary.updateMainY();
    }
304535
function (width, height) {
            var cfg = this._cfg;
            cfg.width = width;
            cfg.height = height;
        }
881469
function (state) {
        var self = this, documentElement = document.documentElement, slowRendering, prefix = self.classPrefix, layoutRect;

        if (state != self._fullscreen) {
          $(window).on('resize', function () {
            var time;

            if (self._fullscreen) {
              // Time the layout time if it's to slow use a timeout to not hog the CPU
              if (!slowRendering) {
                time = new Date().getTime();

                var rect = DomUtils.getWindowSize();
                self.moveTo(0, 0).resizeTo(rect.w, rect.h);

                if ((new Date().getTime()) - time > 50) {
                  slowRendering = true;
                }
              } else {
                if (!self._timer) {
                  self._timer = Delay.setTimeout(function () {
                    var rect = DomUtils.getWindowSize();
                    self.moveTo(0, 0).resizeTo(rect.w, rect.h);

                    self._timer = 0;
                  }, 50);
                }
              }
            }
          });

          layoutRect = self.layoutRect();
          self._fullscreen = state;

          if (!state) {
            self.borderBox = BoxUtils.parseBox(self.settings.border);
            self.getEl('head').style.display = '';
            layoutRect.deltaH += layoutRect.headerH;
            $([documentElement, document.body]).removeClass(prefix + 'fullscreen');
            self.classes.remove('fullscreen');
            self.moveTo(self._initial.x, self._initial.y).resizeTo(self._initial.w, self._initial.h);
          } else {
            self._initial = { x: layoutRect.x, y: layoutRect.y, w: layoutRect.w, h: layoutRect.h };

            self.borderBox = BoxUtils.parseBox('0');
            self.getEl('head').style.display = 'none';
            layoutRect.deltaH -= layoutRect.headerH + 2;
            $([documentElement, document.body]).addClass(prefix + 'fullscreen');
            self.classes.add('fullscreen');

            var rect = DomUtils.getWindowSize();
            self.moveTo(0, 0).resizeTo(rect.w, rect.h);
          }
        }

        return self.reflow();
      }
536324
void setDimens(int width, int height) {
        mAreDimensOverridden = true;
        mDesiredWidth = width;
        mDesiredHeight = height;
        requestLayout();
    }
767283
public void setStages(java.util.Collection<StageDeclaration> stages) {
        if (stages == null) {
            this.stages = null;
            return;
        }

        this.stages = new java.util.ArrayList<StageDeclaration>(stages);
    }
418457
function(width, height){
            if(width !== void 0){
                this.width = width;
            }
            if(height !== void 0){
                this.height = height;
            }

            width = this.width * this.tileSize;
            height = this.height * this.tileSize;

            var devicePixelRatio = window.devicePixelRatio || 1;

            if(devicePixelRatio !== 1){

                this.canvas.style.width = width + 'px';
                this.canvas.style.height = height + 'px';

                this.buffer.style.width = width + 'px';
                this.buffer.style.height = height + 'px';

                width = Math.round(width * devicePixelRatio);
                height = Math.round(height * devicePixelRatio);
            }

            this.devicePixelRatio = devicePixelRatio;
            this.canvas.width = width;
            this.canvas.height = height;

            this.buffer.width = width;
            this.buffer.height = height;
            this.bufferCtx.scale(devicePixelRatio, devicePixelRatio);
            this.offsetX = Math.floor(this.width * 0.5);
            this.offsetY = Math.floor(this.height * 0.5);

        }