aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/client/Application.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/client/Application.java')
-rw-r--r--src/org/traccar/web/client/Application.java32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/org/traccar/web/client/Application.java b/src/org/traccar/web/client/Application.java
index 046dd734..6b16ca6f 100644
--- a/src/org/traccar/web/client/Application.java
+++ b/src/org/traccar/web/client/Application.java
@@ -1,7 +1,5 @@
package org.traccar.web.client;
-import java.util.List;
-
import org.traccar.web.client.controller.ArchiveController;
import org.traccar.web.client.controller.DeviceController;
import org.traccar.web.client.controller.MapController;
@@ -14,7 +12,9 @@ import org.traccar.web.shared.model.Position;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootPanel;
+import com.sencha.gxt.data.shared.event.StoreAddEvent;
import com.sencha.gxt.data.shared.event.StoreHandlers;
+import com.sencha.gxt.data.shared.event.StoreRemoveEvent;
public class Application {
@@ -51,35 +51,31 @@ public class Application {
private DeviceController.DeviceHandler deviceHandler = new DeviceController.DeviceHandler() {
@Override
- public void onLoad(List<Device> devices) {
- }
-
- @Override
public void onSelected(Device device) {
mapController.selectDevice(device);
}
- @Override
- public void onAdd(Device device) {
- mapController.update();
- }
+ };
- @Override
- public void onUpdate(Device device) {
- }
+ private ArchiveController.ArchiveHandler archiveHanlder = new ArchiveController.ArchiveHandler() {
@Override
- public void onRemove(Device device) {
- mapController.update();
+ public void onSelected(Position position) {
+ mapController.selectArchivePosition(position);
}
};
- private ArchiveController.ArchiveHandler archiveHanlder = new ArchiveController.ArchiveHandler() {
+ private StoreHandlers<Device> deviceStoreHandler = new BaseStoreHandlers<Device>() {
@Override
- public void onSelected(Position position) {
- mapController.selectArchivePosition(position);
+ public void onAdd(StoreAddEvent<Device> event) {
+ mapController.update();
+ }
+
+ @Override
+ public void onRemove(StoreRemoveEvent<Device> event) {
+ mapController.update();
}
};