return getDecimalFormat("#.#");
}
public DecimalFormat getDecimalFormat(String pattern)
{
SizedDecimalFormat format = new SizedDecimalFormat(pattern, 2);
if (!editing)
return format;
// Modify the pattern for editing and remove certain symbols
String editPattern = pattern.replaceAll("'\\" + format.getDecimalFormatSymbols().getCurrencySymbol() + "'","");
editPattern = editPattern.replaceAll("\\" + format.getDecimalFormatSymbols().getCurrencySymbol(),"");
return new SizedDecimalFormat(editPattern, 2);
}