Returns the scaling factor necessary to allow all of the traces to fit vertically
into the specified space.

@param height - required height in pixels
@return - scaling factor
553422
private double calculateScale(int height) {
		double newScale = 0.0;
		double max = (double) getMaximum();
		double ht = (double) height;
		newScale = ((ht - 50.0)) / max;
		return newScale;
	}
645626
private void setHeaderHeight(int height) {
        if (mAccountHeaderContainer != null) {
            ViewGroup.LayoutParams params = mAccountHeaderContainer.getLayoutParams();
            if (params != null) {
                params.height = height;
                mAccountHeaderContainer.setLayoutParams(params);
            }

            View accountHeader = mAccountHeaderContainer.findViewById(R.id.material_drawer_account_header);
            if (accountHeader != null) {
                // TODO why is this null?
                params = accountHeader.getLayoutParams();
                if(params != null) {
                    params.height = height;
                    accountHeader.setLayoutParams(params);
                }
            }

            View accountHeaderBackground = mAccountHeaderContainer.findViewById(R.id.material_drawer_account_header_background);
            if (accountHeaderBackground != null) {
                params = accountHeaderBackground.getLayoutParams();
                params.height = height;
                accountHeaderBackground.setLayoutParams(params);
            }
        }
    }
1223742
public int getDisplayHeight() {
    Display display = getWindowManager().getDefaultDisplay();
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB_MR2) {
      return display.getHeight();
    } else {
      final Point size = new Point();
      display.getSize(size);
      return size.y;
    }
  }
546815
private void setHeight(int height) {
        contentParams.height = options.fullScreenPeek() ? screenHeight : height;
        content.setLayoutParams(contentParams);
    }
309084
public static int pixelYToTileYWithScaleFactor(double pixelY, double scaleFactor, int tileSize) {
        return (int) Math.min(Math.max(pixelY / tileSize, 0), scaleFactor - 1);
    }
1261693
private static @Nullable Dimension toDimension(long width, long height) {
    if (width > 0L && height > 0L) {
      return new Dimension(width, height);
    }
    return null;
  }
804898
public static Point getSize (float scale, Mirage image)
    {
        int width  = Math.max(0, Math.round(image.getWidth()  * scale));
        int height = Math.max(0, Math.round(image.getHeight() * scale));
        return new Point(width, height);
    }
286065
public void setHeight(int height)
	{
		if (1 > height)
		{
			String _message = "The specified height ({0}) is incorrect, it must be greater or equal than 1.";
			Object[] _parameters =
			{
				new Integer(height)
			};
			throw new IllegalArgumentException(MessageFormat.format(_message, _parameters));
		}
		myHeight = height;
	}
417652
public int scaleToPixel(double reach) {
    return (Double.isInfinite(reach) || Double.isNaN(reach)) ? 0 : //
    (int) Math.round(scale.getScaled(reach, height - .5, .5));
  }
656171
public static int getScreenHeight(final GraphicsDevice graphicsDevice)
	{
		final GraphicsConfiguration[] graphicsConfigurations = graphicsDevice.getConfigurations();
		final GraphicsConfiguration graphicsConfiguration = ArrayExtensions
			.getFirst(graphicsConfigurations);
		if (graphicsConfiguration != null)
		{
			final Rectangle bounds = graphicsConfiguration.getBounds();
			final double height = bounds.getHeight();
			return (int)height;
		}
		return getScreenHeight();
	}
1049532
public static Image getScaledInstance(Image img, int targetWidth, int targetHeight) {
		final int type = BufferedImage.TYPE_INT_ARGB;
		Image ret = img;
		final int width = ret.getWidth(null);
		final int height = ret.getHeight(null);
		if (width != targetWidth && height != targetHeight) {
			// a priori plus performant que Image.getScaledInstance
			final BufferedImage scratchImage = new BufferedImage(targetWidth, targetHeight, type);
			final Graphics2D g2 = scratchImage.createGraphics();
			g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
					RenderingHints.VALUE_INTERPOLATION_BILINEAR);
			g2.drawImage(ret, 0, 0, targetWidth, targetHeight, 0, 0, width, height, null);
			g2.dispose();
			ret = scratchImage;
		}
		return ret;
	}
650424
public Cell<C,T> size (float width, float height) {
		size(new FixedValue<C, T>(layout.toolkit, width), new FixedValue<C, T>(layout.toolkit, height));
		return this;
	}
700164
public Cell<C,T> height (Value<C,T> height) {
		minHeight = height;
		prefHeight = height;
		maxHeight = height;
		return this;
	}
923746
@Pure
	public IntegerProperty heightProperty() {
		if (this.height == null) {
			this.height = new ReadOnlyIntegerWrapper(this, MathFXAttributeNames.HEIGHT);
			this.height.bind(Bindings.subtract(maxYProperty(), minYProperty()));
		}
		return this.height;
	}
544060
public static double getLatitudeFromPixel(long height,
			BoundingBox boundingBox, float pixel) {
		return getLatitudeFromPixel(height, boundingBox, boundingBox, pixel);
	}
598920
public ExcelWriter setRowHeight(int rownum, int height) {
		if (rownum < 0) {
			this.sheet.setDefaultRowHeightInPoints(height);
		} else {
			this.sheet.getRow(rownum).setHeightInPoints(height);
		}
		return this;
	}
608225
public static int getFirstScreenHeight()
	{
		final GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment
			.getLocalGraphicsEnvironment();
		final GraphicsDevice[] graphicsDevices = graphicsEnvironment.getScreenDevices();
		int height = getScreenHeight();
		for (final GraphicsDevice graphicsDevice : graphicsDevices)
		{
			final GraphicsConfiguration[] graphicsConfigurations = graphicsDevice
				.getConfigurations();
			final GraphicsConfiguration graphicsConfiguration = ArrayExtensions
				.getFirst(graphicsConfigurations);
			if (graphicsConfiguration != null)
			{
				final Rectangle bounds = graphicsConfiguration.getBounds();
				final double h = bounds.getHeight();
				height = (int)h;
				break;
			}
		}
		return height;
	}