PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/sigmah/src/test/java/org/sigmah/client/page/entry/editor/mock/MockMapView.java

http://sigma-h.googlecode.com/
Java | 72 lines | 49 code | 16 blank | 7 comment | 0 complexity | 66b02152cb5e89a6c5decd26cae9dcdc MD5 | raw file
 1/*
 2 * All Sigmah code is released under the GNU General Public License v3
 3 * See COPYRIGHT.txt and LICENSE.txt.
 4 */
 5
 6package org.sigmah.client.page.entry.editor.mock;
 7
 8import org.sigmah.client.page.entry.editor.MapPresenter;
 9import org.sigmah.shared.dto.BoundingBoxDTO;
10
11/**
12 * @author Alex Bertram (akbertram@gmail.com)
13 */
14public class MockMapView implements MapPresenter.View {
15
16    public String boundsName;
17    public BoundingBoxDTO bounds;
18    public Double lat;
19    public Double lng;
20    public BoundingBoxDTO mapView;
21
22    public Double markerX;
23    public Double markerY;
24
25    @Override
26    public void init(MapPresenter presenter) {
27
28    }
29
30    @Override
31    public void setBounds(String name, BoundingBoxDTO bounds) {
32        this.boundsName = name;
33        this.bounds = bounds;
34    }
35
36    @Override
37    public void setCoords(Double lat, Double lng) {
38        this.lat = lat;
39        this.lng = lng;
40    }
41
42    @Override
43    public Double getX() {
44        return lng;
45    }
46
47    @Override
48    public Double getY() {
49        return lat;
50    }
51
52    @Override
53    public void setMarkerPos(double lat, double lng) {
54        markerY = lat;
55        markerX = lng;
56    }
57
58    @Override
59    public void setMapView(BoundingBoxDTO bounds) {
60        this.mapView = bounds;
61    }
62
63    @Override
64    public BoundingBoxDTO getMapView() {
65        return mapView;
66    }
67
68    @Override
69    public void panTo(double lat, double lng) {
70
71    }
72}