3535import java .io .StringWriter ;
3636import java .nio .charset .Charset ;
3737import java .nio .charset .StandardCharsets ;
38+ import java .text .DecimalFormatSymbols ;
3839import java .util .List ;
40+ import java .util .Locale ;
3941import java .util .Map ;
4042import java .util .Optional ;
4143
@@ -710,7 +712,7 @@ private void testInput() {
710712 maxJD .setValue (2457505.0 );
711713 points .setValue (501 );
712714 jDflavour .setSelectedIndex (dateTypeToSelectedIndex ("HJD" ));
713- codeArea . setText (
715+ String test_model =
714716 "# test model\n \n " +
715717 "zeroPoint is 2457504.93 # time zero point\n " +
716718 "magZeroPoint is 13.69\n " +
@@ -723,7 +725,12 @@ private void testInput() {
723725 " + 0.006091217702922 * cos(2*PI*(4/period)*(t-zeroPoint)) + 0.001654399074451 * sin(2*PI*(4/period)*(t-zeroPoint))\n " +
724726 " - 0.004698206584795 * cos(2*PI*(5/period)*(t-zeroPoint)) - 0.000039671630067 * sin(2*PI*(4/period)*(t-zeroPoint))\n " +
725727 " + 0.003549883073703 * cos(2*PI*(6/period)*(t-zeroPoint)) + 0.000022578051393 * sin(2*PI*(6/period)*(t-zeroPoint))\n " +
726- "}\n " );
728+ "}\n " ;
729+ DecimalFormatSymbols symbols = new DecimalFormatSymbols (Locale .getDefault ());
730+ char decimalSeparator = symbols .getDecimalSeparator ();
731+ if (decimalSeparator != '.' )
732+ test_model = test_model .replace ('.' , decimalSeparator );
733+ codeArea .setText (test_model );
727734 titleXfield .setValue ("" );
728735 titleYfield .setValue ("" );
729736 objectNameField .setValue ("" );
0 commit comments