diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-26 20:36:47 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-26 20:36:47 +1300 |
commit | cda6c01a2abc7f60a191d97e8b070218879f7f92 (patch) | |
tree | edf8a5a9be5d07249d86ca6e924d8925966042fc /src/org/traccar/web/client/view/ArchiveView.java | |
parent | ebcedc38812405ba1cd03c518317bcf0cd52f925 (diff) | |
download | trackermap-web-cda6c01a2abc7f60a191d97e8b070218879f7f92.tar.gz trackermap-web-cda6c01a2abc7f60a191d97e8b070218879f7f92.tar.bz2 trackermap-web-cda6c01a2abc7f60a191d97e8b070218879f7f92.zip |
Add units preference (fix #7)
Diffstat (limited to 'src/org/traccar/web/client/view/ArchiveView.java')
-rw-r--r-- | src/org/traccar/web/client/view/ArchiveView.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/org/traccar/web/client/view/ArchiveView.java b/src/org/traccar/web/client/view/ArchiveView.java index 04ece4af..28291d0d 100644 --- a/src/org/traccar/web/client/view/ArchiveView.java +++ b/src/org/traccar/web/client/view/ArchiveView.java @@ -32,6 +32,7 @@ import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.ui.Widget; +import com.sencha.gxt.cell.core.client.NumberCell; import com.sencha.gxt.core.client.Style.SelectionMode; import com.sencha.gxt.data.shared.ListStore; import com.sencha.gxt.data.shared.event.StoreHandlers; @@ -108,14 +109,18 @@ public class ArchiveView implements SelectionChangedEvent.SelectionChangedHandle columnConfigList.add(new ColumnConfig<Position, Boolean>(positionProperties.valid(), 0, "Valid")); - ColumnConfig<Position, Date> columnConfig = new ColumnConfig<Position, Date>(positionProperties.time(), 0, "Time"); - columnConfig.setCell(new DateCell(ApplicationContext.getInstance().getFormatterUtil().getTimeFormat())); - columnConfigList.add(columnConfig); + ColumnConfig<Position, Date> columnConfigDate = new ColumnConfig<Position, Date>(positionProperties.time(), 0, "Time"); + columnConfigDate.setCell(new DateCell(ApplicationContext.getInstance().getFormatterUtil().getTimeFormat())); + columnConfigList.add(columnConfigDate); columnConfigList.add(new ColumnConfig<Position, Double>(positionProperties.latitude(), 0, "Latitude")); columnConfigList.add(new ColumnConfig<Position, Double>(positionProperties.longitude(), 0, "Longitude")); columnConfigList.add(new ColumnConfig<Position, Double>(positionProperties.altitude(), 0, "Altitude")); - columnConfigList.add(new ColumnConfig<Position, Double>(positionProperties.speed(), 0, "Speed")); + + ColumnConfig<Position, Double> columnConfigDouble = new ColumnConfig<Position, Double>(positionProperties.speed(), 0, "Speed"); + columnConfigDouble.setCell(new NumberCell<Double>(ApplicationContext.getInstance().getFormatterUtil().getSpeedFormat())); + columnConfigList.add(columnConfigDouble); + columnConfigList.add(new ColumnConfig<Position, Double>(positionProperties.course(), 0, "Course")); columnConfigList.add(new ColumnConfig<Position, Double>(positionProperties.power(), 0, "Power")); |