Changeset 12339 in josm


Ignore:
Timestamp:
2017-06-08T00:28:33+02:00 (14 months ago)
Author:
michael2402
Message:

Add javadoc to SlippyMapBBoxChooser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java

    r12203 r12339  
    4040import org.openstreetmap.josm.data.imagery.TMSCachedTileLoader;
    4141import org.openstreetmap.josm.data.imagery.TileLoaderFactory;
     42import org.openstreetmap.josm.data.osm.BBox;
    4243import org.openstreetmap.josm.data.preferences.StringProperty;
    4344import org.openstreetmap.josm.gui.layer.AbstractCachedTileSourceLayer;
    4445import org.openstreetmap.josm.gui.layer.TMSLayer;
    4546
     47/**
     48 * This panel displays a map and lets the user chose a {@link BBox}.
     49 */
    4650public class SlippyMapBBoxChooser extends JMapViewer implements BBoxChooser {
    4751
     52    /**
     53     * A list of tile sources that can be used for displaying the map.
     54     */
    4855    @FunctionalInterface
    4956    public interface TileSourceProvider {
     57        /**
     58         * Gets the tile sources that can be displayed
     59         * @return The tile sources
     60         */
    5061        List<TileSource> getTileSources();
    5162    }
     
    102113
    103114    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     */
    104119    public static final String RESIZE_PROP = SlippyMapBBoxChooser.class.getName() + ".resize";
    105120
     
    184199    }
    185200
     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     */
    186207    public boolean handleAttribution(Point p, boolean click) {
    187208        return attribution.handleAttribution(p, click);
     
    208229    }
    209230
     231    /**
     232     * Enables the disk tile cache.
     233     * @param enabled true to enable, false to disable
     234     */
    210235    public final void setFileCacheEnabled(boolean enabled) {
    211236        if (enabled && cachedLoader != null) {
     
    216241    }
    217242
     243    /**
     244     * Sets the maximum number of tiles that may be held in memory
     245     * @param tiles The maximum number of tiles.
     246     */
    218247    public final void setMaxTilesInMemory(int tiles) {
    219248        ((MemoryTileCache) getTileCache()).setCacheSize(tiles);
     
    260289    }
    261290
     291    /**
     292     * Sets the active tile source
     293     * @param tileSource The active tile source
     294     */
    262295    public void toggleMapSource(TileSource tileSource) {
    263296        this.tileController.setTileCache(new MemoryTileCache());
Note: See TracChangeset for help on using the changeset viewer.