Adjusts the width and height of the fraem if it's greater than the
screen.

@param screenSize Screen size.
@param frameSize Frame size.
518385
protected final void checkMaxSize(final Dimension screenSize,
            final Dimension frameSize) {
        if (frameSize.height > screenSize.height) {
            frameSize.height = screenSize.height;
        }
        if (frameSize.width > screenSize.width) {
            frameSize.width = screenSize.width;
        }
    }
1050834
protected synchronized void onResized(TerminalSize newSize) {
        if (lastKnownSize == null || !lastKnownSize.equals(newSize)) {
            lastKnownSize = newSize;
            for (TerminalResizeListener resizeListener : resizeListeners) {
                resizeListener.onResized(this, lastKnownSize);
            }
        }
    }
389931
public boolean setPageSize(Rectangle pageSize) {
        this.pageSize = pageSize;
        DocListener listener;
		for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
            listener = (DocListener) iterator.next();
            listener.setPageSize(pageSize);
        }
        return true;
    }
237967
public void setFrameType(final FrameType FRAME_TYPE) {
        getModel().setFrameType(FRAME_TYPE);
        init(getInnerBounds().width, getInnerBounds().height);
        repaint(getInnerBounds());
    }
1189580
public void update(double screenX, double screenY)
    {
        for (final Image current : surfaces.values())
        {
            current.setLocation(screenX + offsetX, screenY + offsetY);
        }
        if (nextSurface != null)
        {
            surface = nextSurface;
            nextSurface = null;
        }
    }
954290
public void setWidth(int width) {

        if (m_isFrame) {
            setParentWidth(width);
        } else {
            m_popup.setWidth(width);
            if (m_popup.isShowing()) {
                m_popup.center();
            }
        }
    }
675741
public void updateSizes(@ProgressDrawableSize int size) {
        final DisplayMetrics metrics = mResources.getDisplayMetrics();
        final float screenDensity = metrics.density;

        if (size == LARGE) {
            setSizeParameters(CIRCLE_DIAMETER_LARGE*screenDensity, CIRCLE_DIAMETER_LARGE*screenDensity, CENTER_RADIUS_LARGE*screenDensity,
                    STROKE_WIDTH_LARGE*screenDensity, ARROW_WIDTH_LARGE*screenDensity, ARROW_HEIGHT_LARGE*screenDensity);
        } else {
            setSizeParameters(CIRCLE_DIAMETER*screenDensity, CIRCLE_DIAMETER*screenDensity, CENTER_RADIUS*screenDensity, STROKE_WIDTH*screenDensity,
                    ARROW_WIDTH*screenDensity, ARROW_HEIGHT*screenDensity);
        }
    }
1165510
def _screen_size_cb(self, w, tf):
        
        self._screen_size = tf
        self.w.width.set_enabled(not tf)
        self.w.height.set_enabled(not tf)
        self.w.lock_aspect.set_enabled(not tf)
        if self._screen_size:
            wd, ht = self.fitsimage.get_window_size()
            self._configure_cb(self.fitsimage, wd, ht)
1046215
public void resize(int newSize) {
    if (newSize > elements.length) {
      reallocate(Math.max(newSize, 2 * elements.length));
    } else {
      for (int i = size; i < newSize; i++) {
        elements[i] = 0;
      }
    }
    size = newSize;
  }
813849
public void setFrame(java.lang.String frame) {
        getStateHelper().put(PropertyKeys.frame, frame);
        handleAttribute("frame", frame);
    }
828677
public synchronized void setSize(int newSize) {

        if (newSize < 0) {
            throw new ArrayIndexOutOfBoundsException(newSize);
        } else if (newSize > buf.length) {
            buf = copyOf(buf, Math.max(buf.length << 1, newSize));
        }

        count = newSize;
    }
467806
private int setViewSize(int mode, int size, int drawableWidth) {
        int viewSize;
        switch (mode) {
            case MeasureSpec.EXACTLY:
                viewSize = size;
                break;

            case MeasureSpec.AT_MOST:
                viewSize = Math.min(drawableWidth, size);
                break;

            case MeasureSpec.UNSPECIFIED:
                viewSize = drawableWidth;
                break;

            default:
                viewSize = size;
                break;
        }
        return viewSize;
    }
1356855
public void setRewindPositionOnce(@NonNull String frameName, int position) {
        if (getRewindPosition(frameName) >= 0)
            return;

        frames.get(frameName).setRewindPosition(position);
    }
527678
@Override
    public void setPixelSize(final int wide, final int high)
    {
        super.setPixelSize(wide, high);

        getViewport().setPixelSize(wide, high);

        getViewport().draw();
    }
1230023
public void setRewindPosition(@NonNull String frameName, int position) {
        frames.get(frameName).setRewindPosition(position);
    }
369114
public void setTextureSize(int width, int height) {
		setPreferredSize(new Dimension(width, height));
		setSize(new Dimension(width, height));
		this.width = width;
		this.height = height;
	}
1235235
private void resize() {
        double width  = getWidth() - getInsets().getLeft() - getInsets().getRight();
        double height = getHeight() - getInsets().getTop() - getInsets().getBottom();
        size          = width < height ? width : height;

        if (size > 0) {
            pane.setMaxSize(size, size);
            pane.relocate((getWidth() - size) * 0.5, (getHeight() - size) * 0.5);
            pane.setBackground(new Background(new BackgroundFill(getChartBackgroundColor(), new CornerRadii(1024), Insets.EMPTY)));

            chartCanvas.setWidth(size);
            chartCanvas.setHeight(size);

            overlayCanvas.setWidth(size);
            overlayCanvas.setHeight(size);

            redraw();
        }
    }