Commit 6ddaf274 authored by Nico Mack's avatar Nico Mack

format method now explicitly uses a dot (.) character as decimal

separator, irrespective of set locales
parent b6a4fc3d
......@@ -3,6 +3,7 @@ package lu.list.itis.dkd.tui.utility;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
public class Bounds2D {
......@@ -13,12 +14,16 @@ public class Bounds2D {
public static DecimalFormat format = new DecimalFormat();
public static final char DOT = '.';
public static final Bounds2D ZERO_BOUNDS = new Bounds2D(0, 0, 0, 0);
static {
format.setDecimalSeparatorAlwaysShown(false);
format.setMaximumFractionDigits(2);
format.setGroupingUsed(false);
DecimalFormatSymbols decimalSymbols = format.getDecimalFormatSymbols();
decimalSymbols.setDecimalSeparator(DOT);
format.setDecimalFormatSymbols(decimalSymbols);
}
public Bounds2D(double x1, double y1, double x2, double y2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment