The list of methods to do Fraction Format are organized into topic(s).
String
format(double d) decides format for all doubles displayed and uses nice formatting if value is greater than 1e-03.
if (Math.abs(d) > 0.001) {
return getValueFormatter().format(d);
} else {
return "" + d;
String
format(Double d, int digit) Formats a double to string.
if (d == null) {
return "";
StringBuffer sb = new StringBuffer();
sb.append("#");
for (int i = 0; i < digit; i++) {
if (i == 0) {
sb.append(".");
...
String
format(double degrees) Remove decimal point from value and return its string representation
double dVal = degrees;
DecimalFormat form = new DecimalFormat("###0.000000");
return form.format(dVal);
String
format(double input, String format) Formats a number in a specified pattern.
DecimalFormat decimalFormat = new DecimalFormat(format);
return decimalFormat.format(input);
String
format(double n) Formats the given number into a price.
NumberFormat formatter;
String number;
formatter = new DecimalFormat("#,###,###,###.00");
number = formatter.format(n);
if (currency.length() == 1) {
return currency + number;
} else {
return number + " " + currency;
...