blob: 598a744de6f147e0cc7a8eff2a0e1e48b1d728e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package org.traccar.web.client.controller;
import java.util.Collection;
import org.traccar.web.client.view.ArchiveView;
import org.traccar.web.shared.model.Device;
import org.traccar.web.shared.model.Position;
import com.sencha.gxt.widget.core.client.ContentPanel;
public class ArchiveController implements ContentController, ArchiveView.ArchiveHandler {
public interface ArchiveHandler {
public void onSelected(Position position);
}
private ArchiveHandler archiveHandler;
private ArchiveView archiveView;
public ArchiveController(ArchiveHandler archiveHandler) {
this.archiveHandler = archiveHandler;
archiveView = new ArchiveView(this);
}
@Override
public ContentPanel getView() {
return archiveView.getView();
}
@Override
public void run() {
}
public void updateDevices(Collection<Device> devices) {
}
@Override
public void onSelected(Position position) {
archiveHandler.onSelected(position);
}
}
|