source: josm/trunk/src/org/openstreetmap/josm/gui/download/DownloadSettings.java@ 12652

Last change on this file since 12652 was 12652, checked in by michael2402, 7 years ago

Apply #15167: Merge OSM and overpass download dialog. Patch by bafonins

File size: 1.3 KB
RevLine 
[12652]1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.download;
3
4/**
5 * The global settings of {@link DownloadDialog}.
6 */
7public final class DownloadSettings {
8
9 private boolean downloadAsNewLayer;
10 private boolean zoomToDownloadedData;
11
12 /**
13 * Initializes a new instance of {@code DownloadSettings}.
14 * @param downloadAsNewLayer The flag defining if a new layer must be created for the downloaded data.
15 * @param zoomToDownloadedData The flag defining if the map view, see {@link SlippyMapChooser},
16 * must zoom to the downloaded data.
17 */
18 public DownloadSettings(boolean downloadAsNewLayer, boolean zoomToDownloadedData) {
19 this.downloadAsNewLayer = downloadAsNewLayer;
20 this.zoomToDownloadedData = zoomToDownloadedData;
21 }
22
23 /**
24 * Gets the flag defining if a new layer must be created for the downloaded data.
25 * @return {@code true} if a new layer must be created, {@code false} otherwise.
26 */
27 public boolean asNewLayer() {
28 return this.downloadAsNewLayer;
29 }
30
31 /**
32 * Gets the flag defining if the map view must zoom to the downloaded data.
33 * @return {@code true} if the view must zoom, {@code false} otherwise.
34 */
35 public boolean zoomToData() {
36 return this.zoomToDownloadedData;
37 }
38}
Note: See TracBrowser for help on using the repository browser.