source: josm/trunk/src/org/openstreetmap/josm/gui/download/DownloadSource.java@ 12878

Last change on this file since 12878 was 12684, checked in by bastiK, 7 years ago

see #15167 - moved the info label in non expert mode (patch by bafonins)

File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.download;
3
4/**
5 * Defines an interface for different download sources.
6 * <p>
7 * Plugins may implement this to provide new download sources to the main download dialog.
8 * @param <T> The type of the data that a download source uses.
9 * @since 12652
10 */
11public interface DownloadSource<T> {
12
13 /**
14 * Creates a panel with GUI specific for the download source.
15 * @return Returns {@link AbstractDownloadSourcePanel}.
16 */
17 AbstractDownloadSourcePanel<T> createPanel();
18
19 /**
20 * Downloads the data.
21 * @param data The required data for the download source.
22 * @param settings The global settings of the download dialog, see {@link DownloadDialog}.
23 */
24 void doDownload(T data, DownloadSettings settings);
25
26 /**
27 * Returns a string representation of this download source.
28 * @return A string representation of this download source.
29 */
30 String getLabel();
31
32 /**
33 * Defines whether this download source should be visible only in the expert mode.
34 * @return Returns {@code true} if the download source should be visible only in the
35 * expert mode, {@code false} otherwise.
36 */
37 boolean onlyExpert();
38}
Note: See TracBrowser for help on using the repository browser.