/** * Creates a new number property editor with the default number type (Double). */ public NumberPropertyEditor() { numbers = LocaleInfo.getCurrentLocale().getNumberConstants(); groupSeparator = numbers.groupingSeparator(); }
private JsCoordinateNumberFormatter() { dddFormat = NumberFormat.getFormat("+0.000000;-0.000000"); shortFracFormat = NumberFormat.getFormat("0.00"); intFormat = NumberFormat.getFormat("0"); String decimalSeparatorString = LocaleInfo.getCurrentLocale().getNumberConstants().decimalSeparator(); if(decimalSeparatorString.length() != 1) { throw new AssertionError("Decimal separator is longer than expected"); } String zeroDigitString = LocaleInfo.getCurrentLocale().getNumberConstants().zeroDigit(); localizedZeroDigit = zeroDigitString.charAt(0); decimalSeparator = decimalSeparatorString.charAt(0); }
/** * Creates a new number field. */ public SpinnerField() { messages = new SpinnerFieldMessages(); propertyEditor = new NumberPropertyEditor(); constants = LocaleInfo.getCurrentLocale().getNumberConstants(); decimalSeparator = constants.decimalSeparator(); }