Changeset 12339 in josm
- Timestamp:
- 2017-06-08T00:28:33+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r12203 r12339 40 40 import org.openstreetmap.josm.data.imagery.TMSCachedTileLoader; 41 41 import org.openstreetmap.josm.data.imagery.TileLoaderFactory; 42 import org.openstreetmap.josm.data.osm.BBox; 42 43 import org.openstreetmap.josm.data.preferences.StringProperty; 43 44 import org.openstreetmap.josm.gui.layer.AbstractCachedTileSourceLayer; 44 45 import org.openstreetmap.josm.gui.layer.TMSLayer; 45 46 47 /** 48 * This panel displays a map and lets the user chose a {@link BBox}. 49 */ 46 50 public class SlippyMapBBoxChooser extends JMapViewer implements BBoxChooser { 47 51 52 /** 53 * A list of tile sources that can be used for displaying the map. 54 */ 48 55 @FunctionalInterface 49 56 public interface TileSourceProvider { 57 /** 58 * Gets the tile sources that can be displayed 59 * @return The tile sources 60 */ 50 61 List<TileSource> getTileSources(); 51 62 } … … 102 113 103 114 private static final StringProperty PROP_MAPSTYLE = new StringProperty("slippy_map_chooser.mapstyle", "Mapnik"); 115 /** 116 * The property name used for the resize button. 117 * @see #addPropertyChangeListener(java.beans.PropertyChangeListener) 118 */ 104 119 public static final String RESIZE_PROP = SlippyMapBBoxChooser.class.getName() + ".resize"; 105 120 … … 184 199 } 185 200 201 /** 202 * Handles a click/move on the attribution 203 * @param p The point in the view 204 * @param click true if it was a click, false for hover 205 * @return if the attribution handled the event 206 */ 186 207 public boolean handleAttribution(Point p, boolean click) { 187 208 return attribution.handleAttribution(p, click); … … 208 229 } 209 230 231 /** 232 * Enables the disk tile cache. 233 * @param enabled true to enable, false to disable 234 */ 210 235 public final void setFileCacheEnabled(boolean enabled) { 211 236 if (enabled && cachedLoader != null) { … … 216 241 } 217 242 243 /** 244 * Sets the maximum number of tiles that may be held in memory 245 * @param tiles The maximum number of tiles. 246 */ 218 247 public final void setMaxTilesInMemory(int tiles) { 219 248 ((MemoryTileCache) getTileCache()).setCacheSize(tiles); … … 260 289 } 261 290 291 /** 292 * Sets the active tile source 293 * @param tileSource The active tile source 294 */ 262 295 public void toggleMapSource(TileSource tileSource) { 263 296 this.tileController.setTileCache(new MemoryTileCache());
Note:
See TracChangeset
for help on using the changeset viewer.