final Amount<?> amount = (Amount<?>) obj;
final Element amountSpan = renderTo.appendElement("span");
final double estimatedValue = amount.getEstimatedValue();
if (amount.getUnit() instanceof Currency) {
final Element currencySpan = amountSpan.appendElement("span").addClass("currency");
final Currency currency = (Currency) amount.getUnit();
if (currency.getCode().equalsIgnoreCase("USD")) {
currencySpan.html("US$" + currencyFormat.format(estimatedValue));
} else if (currency.getCode().equalsIgnoreCase("GBP")) {
currencySpan.html("£" + currencyFormat.format(estimatedValue));
} else if (currency.getCode().equalsIgnoreCase("EUR")) {
currencySpan.html("€" + currencyFormat.format(estimatedValue));
} else if (currency.getCode().equalsIgnoreCase("JPY")) {
currencySpan.html("¥" + currencyFormat.format(estimatedValue));
} else {
currencySpan.text(currencyFormat.format(estimatedValue) + currency.getCode());
}
} else {
final String numStr = Misc.numberFormat.format(estimatedValue);
amountSpan.appendElement("span").addClass("number").text(numStr);
amountSpan.appendText(" ");