Interface DownloadSource<T>
-
- Type Parameters:
T- The type of the data that a download source uses.
- All Known Implementing Classes:
OSMDownloadSource,OverpassDownloadSource
public interface DownloadSource<T>
Defines an interface for different download sources.Plugins may implement this to provide new download sources to the main download dialog.
- Since:
- 12652
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AbstractDownloadSourcePanel<T>createPanel(DownloadDialog dialog)Creates a panel with GUI specific for the download source.voiddoDownload(T data, DownloadSettings settings)Downloads the data.java.lang.StringgetLabel()Returns a string representation of this download source.booleanonlyExpert()Defines whether this download source should be visible only in the expert mode.
-
-
-
Method Detail
-
createPanel
AbstractDownloadSourcePanel<T> createPanel(DownloadDialog dialog)
Creates a panel with GUI specific for the download source.- Parameters:
dialog- the parent download dialog, asDownloadDialog.getInstance()might not be initialized yet- Returns:
- Returns
AbstractDownloadSourcePanel. - Since:
- 12900
-
doDownload
void doDownload(T data, DownloadSettings settings)
Downloads the data.- Parameters:
data- The required data for the download source.settings- The global settings of the download dialog, seeDownloadDialog.
-
getLabel
java.lang.String getLabel()
Returns a string representation of this download source.- Returns:
- A string representation of this download source.
-
onlyExpert
boolean onlyExpert()
Defines whether this download source should be visible only in the expert mode.- Returns:
- Returns
trueif the download source should be visible only in the expert mode,falseotherwise.
-
-