Changeset 31433 in osm for applications/viewer/jmapviewer
- Timestamp:
- 2015-08-02T16:31:54+02:00 (9 years ago)
- Location:
- applications/viewer/jmapviewer
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/.project
r31430 r31433 23 23 </buildSpec> 24 24 <natures> 25 <nature>org.sonar.ide.eclipse.core.sonarNature</nature> 25 26 <nature>org.eclipse.jdt.core.javanature</nature> 26 27 <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> -
applications/viewer/jmapviewer/.settings/org.eclipse.jdt.core.prefs
r30759 r31433 52 52 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled 53 53 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore 54 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation= ignore54 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning 55 55 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled 56 56 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore … … 95 95 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 96 96 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 97 org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore 97 98 org.eclipse.jdt.core.compiler.problem.unusedImport=warning 98 99 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/AbstractLayer.java
r31429 r31433 103 103 } 104 104 105 @Override 105 106 public String toString() { 106 107 return name; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Coordinate.java
r31427 r31433 24 24 } 25 25 26 @Override 26 27 public double getLat() { 27 28 return data.y; 28 29 } 29 30 31 @Override 30 32 public void setLat(double lat) { 31 33 data.y = lat; 32 34 } 33 35 36 @Override 34 37 public double getLon() { 35 38 return data.x; 36 39 } 37 40 41 @Override 38 42 public void setLon(double lon) { 39 43 data.x = lon; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
r31429 r31433 39 39 private boolean doubleClickZoomEnabled = true; 40 40 41 @Override 41 42 public void mouseDragged(MouseEvent e) { 42 43 if (!movementEnabled || !isMoving) … … 55 56 } 56 57 58 @Override 57 59 public void mouseClicked(MouseEvent e) { 58 60 if (doubleClickZoomEnabled && e.getClickCount() == 2 && e.getButton() == MouseEvent.BUTTON1) { … … 61 63 } 62 64 65 @Override 63 66 public void mousePressed(MouseEvent e) { 64 67 if (e.getButton() == movementMouseButton || isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) { … … 68 71 } 69 72 73 @Override 70 74 public void mouseReleased(MouseEvent e) { 71 75 if (e.getButton() == movementMouseButton || isPlatformOsx() && e.getButton() == MouseEvent.BUTTON1) { … … 75 79 } 76 80 81 @Override 77 82 public void mouseWheelMoved(MouseWheelEvent e) { 78 83 if (wheelZoomEnabled) { … … 141 146 } 142 147 148 @Override 143 149 public void mouseEntered(MouseEvent e) { 144 150 } 145 151 152 @Override 146 153 public void mouseExited(MouseEvent e) { 147 154 } 148 155 156 @Override 149 157 public void mouseMoved(MouseEvent e) { 150 158 // Mac OSX simulates with ctrl + mouse 1 the second mouse button hence no dragging events get fired. -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java
r31429 r31433 84 84 JButton button = new JButton("setDisplayToFitMapMarkers"); 85 85 button.addActionListener(new ActionListener() { 86 86 @Override 87 87 public void actionPerformed(ActionEvent e) { 88 88 map().setDisplayToFitMapMarkers(); … … 96 96 new MapQuestOpenAerialTileSource() }); 97 97 tileSourceSelector.addItemListener(new ItemListener() { 98 @Override 98 99 public void itemStateChanged(ItemEvent e) { 99 100 map().setTileSource((TileSource) e.getItem()); … … 103 104 tileLoaderSelector = new JComboBox<>(new TileLoader[] {new OsmTileLoader(map())}); 104 105 tileLoaderSelector.addItemListener(new ItemListener() { 106 @Override 105 107 public void itemStateChanged(ItemEvent e) { 106 108 map().setTileLoader((TileLoader) e.getItem()); … … 113 115 showMapMarker.setSelected(map().getMapMarkersVisible()); 114 116 showMapMarker.addActionListener(new ActionListener() { 117 @Override 115 118 public void actionPerformed(ActionEvent e) { 116 119 map().setMapMarkerVisible(showMapMarker.isSelected()); … … 121 124 final JCheckBox showTreeLayers = new JCheckBox("Tree Layers visible"); 122 125 showTreeLayers.addActionListener(new ActionListener() { 126 @Override 123 127 public void actionPerformed(ActionEvent e) { 124 128 treeMap.setTreeVisible(showTreeLayers.isSelected()); … … 129 133 final JCheckBox showToolTip = new JCheckBox("ToolTip visible"); 130 134 showToolTip.addActionListener(new ActionListener() { 135 @Override 131 136 public void actionPerformed(ActionEvent e) { 132 137 map().setToolTipText(null); … … 138 143 showTileGrid.setSelected(map().isTileGridVisible()); 139 144 showTileGrid.addActionListener(new ActionListener() { 145 @Override 140 146 public void actionPerformed(ActionEvent e) { 141 147 map().setTileGridVisible(showTileGrid.isSelected()); … … 146 152 showZoomControls.setSelected(map().getZoomControlsVisible()); 147 153 showZoomControls.addActionListener(new ActionListener() { 154 @Override 148 155 public void actionPerformed(ActionEvent e) { 149 156 map().setZoomContolsVisible(showZoomControls.isSelected()); … … 153 160 final JCheckBox scrollWrapEnabled = new JCheckBox("Scrollwrap enabled"); 154 161 scrollWrapEnabled.addActionListener(new ActionListener() { 162 @Override 155 163 public void actionPerformed(ActionEvent e) { 156 164 map().setScrollWrapEnabled(scrollWrapEnabled.isSelected()); -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
r31432 r31433 139 139 zoomSlider.setOpaque(false); 140 140 zoomSlider.addChangeListener(new ChangeListener() { 141 @Override 141 142 public void stateChanged(ChangeEvent e) { 142 143 setZoom(zoomSlider.getValue()); … … 157 158 zoomInButton.addActionListener(new ActionListener() { 158 159 160 @Override 159 161 public void actionPerformed(ActionEvent e) { 160 162 zoomIn(); … … 174 176 zoomOutButton.addActionListener(new ActionListener() { 175 177 178 @Override 176 179 public void actionPerformed(ActionEvent e) { 177 180 zoomOut(); … … 1000 1003 } 1001 1004 1005 @Override 1002 1006 public void tileLoadingFinished(Tile tile, boolean success) { 1003 1007 tile.setLoaded(success); -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MapMarkerCircle.java
r31429 r31433 56 56 } 57 57 58 @Override 58 59 public Coordinate getCoordinate() { 59 60 return coord; 60 61 } 61 62 63 @Override 62 64 public double getLat() { 63 65 return coord.getLat(); 64 66 } 65 67 68 @Override 66 69 public double getLon() { 67 70 return coord.getLon(); 68 71 } 69 72 73 @Override 70 74 public double getRadius() { 71 75 return radius; 72 76 } 73 77 78 @Override 74 79 public STYLE getMarkerStyle() { 75 80 return markerStyle; 76 81 } 77 82 83 @Override 78 84 public void paint(Graphics g, Point position, int radius) { 79 85 int size_h = radius; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
r31432 r31433 31 31 } 32 32 33 @Override 33 34 public void run() { 34 35 synchronized (tile) { … … 75 76 } 76 77 78 @Override 77 79 public Tile getTile() { 78 80 return tile; … … 106 108 } 107 109 110 @Override 108 111 public TileJob createTileLoaderJob(final Tile tile) { 109 112 return new OsmTileJob(tile); -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/MapMarker.java
r31429 r31433 27 27 * @return Latitude of the map marker position 28 28 */ 29 @Override 29 30 double getLat(); 30 31 … … 32 33 * @return Longitude of the map marker position 33 34 */ 35 @Override 34 36 double getLon(); 35 37 -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java
r31430 r31433 52 52 * @return default tile size to use, when not set in Imagery Preferences 53 53 */ 54 @Override 54 55 public int getDefaultTileSize() { 55 56 return OsmMercator.DEFAUL_TILE_SIZE; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTileSource.java
r31429 r31433 77 77 } 78 78 79 @Override 79 80 public boolean isNoTileAtZoom(Map<String, List<String>> headers, int statusCode, byte[] content) { 80 81 // default handler - when HTTP 404 is returned, then treat this situation as no tile at this zoom level -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
r31429 r31433 37 37 } 38 38 39 @Override 39 40 public TileUpdate getTileUpdate() { 40 41 return TileUpdate.IfNoneMatch; … … 72 73 } 73 74 75 @Override 74 76 public TileUpdate getTileUpdate() { 75 77 return TileUpdate.LastModified; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
r31430 r31433 80 80 } 81 81 82 @Override 82 83 public Map<String, String> getHeaders() { 83 84 return headers;
Note:
See TracChangeset
for help on using the changeset viewer.