diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-01-09 23:34:39 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-01-09 23:34:39 +1300 |
commit | 137c89bc9a870c4018f4c000494c89af9ceea67a (patch) | |
tree | ecee16a30a9c2742a97f715427b3b77ab66541aa /src/org/traccar/web/client/Application.java | |
parent | 803ddb7af2d2ad33a5beeded3bc53963b16454d0 (diff) | |
download | trackermap-web-137c89bc9a870c4018f4c000494c89af9ceea67a.tar.gz trackermap-web-137c89bc9a870c4018f4c000494c89af9ceea67a.tar.bz2 trackermap-web-137c89bc9a870c4018f4c000494c89af9ceea67a.zip |
Finished archive panel
Diffstat (limited to 'src/org/traccar/web/client/Application.java')
-rw-r--r-- | src/org/traccar/web/client/Application.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/org/traccar/web/client/Application.java b/src/org/traccar/web/client/Application.java index 9b14d421..22f20d8c 100644 --- a/src/org/traccar/web/client/Application.java +++ b/src/org/traccar/web/client/Application.java @@ -1,8 +1,6 @@ package org.traccar.web.client; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.traccar.web.client.controller.ArchiveController; import org.traccar.web.client.controller.DeviceController; @@ -33,7 +31,7 @@ public class Application { public Application() { deviceController = new DeviceController(deviceHandler); mapController = new MapController(); - archiveController = new ArchiveController(archiveHanlder); + archiveController = new ArchiveController(archiveHanlder, deviceController.getDeviceStore()); view = new ApplicationView( deviceController.getView(), mapController.getView(), archiveController.getView()); @@ -47,16 +45,10 @@ public class Application { archiveController.run(); } - private Map<Long, Device> devices = new HashMap<Long, Device>(); - private DeviceController.DeviceHandler deviceHandler = new DeviceController.DeviceHandler() { @Override public void onLoad(List<Device> devices) { - Application.this.devices.clear(); - for (Device device : devices) { - Application.this.devices.put(device.getId(), device); - } } @Override @@ -66,21 +58,15 @@ public class Application { @Override public void onAdd(Device device) { - devices.put(device.getId(), device); - archiveController.updateDevices(devices.values()); mapController.update(); } @Override public void onUpdate(Device device) { - devices.put(device.getId(), device); - archiveController.updateDevices(devices.values()); } @Override public void onRemove(Device device) { - devices.remove(device.getId()); - archiveController.updateDevices(devices.values()); mapController.update(); } |