diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-03 15:13:14 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-08-03 15:13:14 +1200 |
commit | fcaf637431fee2cdd5ccab79b6de1edf44bac777 (patch) | |
tree | 28b12e76700f4ac03d4d10e0d0944762d30621a0 /src/org/traccar/web/client/FormatterUtil.java | |
parent | 207e4f459d1e91c66376916f2a99cf66f7d04bd0 (diff) | |
download | trackermap-web-fcaf637431fee2cdd5ccab79b6de1edf44bac777.tar.gz trackermap-web-fcaf637431fee2cdd5ccab79b6de1edf44bac777.tar.bz2 trackermap-web-fcaf637431fee2cdd5ccab79b6de1edf44bac777.zip |
Remove files and update readme
Diffstat (limited to 'src/org/traccar/web/client/FormatterUtil.java')
-rw-r--r-- | src/org/traccar/web/client/FormatterUtil.java | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/org/traccar/web/client/FormatterUtil.java b/src/org/traccar/web/client/FormatterUtil.java deleted file mode 100644 index 36c24dcb..00000000 --- a/src/org/traccar/web/client/FormatterUtil.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.traccar.web.client; - -import com.google.gwt.i18n.client.CurrencyList; -import com.google.gwt.i18n.client.DateTimeFormat; -import com.google.gwt.i18n.client.NumberFormat; - -public class FormatterUtil { - - public DateTimeFormat getTimeFormat() { - return DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss"); - } - - private class SpeedNumberFormat extends NumberFormat { - - private final String unit; - private final double factor; - - public SpeedNumberFormat(String unit, double factor) { - super("0.##", CurrencyList.get().getDefault(), true); - this.unit = unit; - this.factor = factor; - } - - @Override - public String format(double number) { - return super.format(number * factor) + " " + unit; - } - - } - - public NumberFormat getSpeedFormat() { - switch (ApplicationContext.getInstance().getUserSettings().getSpeedUnit()) { - case kilometersPerHour: - return new SpeedNumberFormat("km/h", 1.852); - case milesPerHour: - return new SpeedNumberFormat("mph", 1.150779); - default: - return new SpeedNumberFormat("kn", 1); - } - } - -} |