Here you can find the source of lengthToString(double value, boolean proportional)
public static String lengthToString(double value, boolean proportional)
//package com.java2s; /*//from w w w . j av a 2 s . c o m * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ public class Main { public static String lengthToString(double value, boolean proportional) { if (proportional) { return (value * 100) + "%"; } else { return value + "px"; } } }