public class OpenLocationAction extends JosmAction
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Class<? extends DownloadTask>> |
downloadTasks |
sc
Constructor and Description |
---|
OpenLocationAction()
Create an open action.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
boolean |
addDownloadTaskClass(java.lang.Class<? extends DownloadTask> taskClass)
Adds a new download task to the supported ones.
|
java.util.Collection<DownloadTask> |
findDownloadTasks(java.lang.String url,
boolean isRemotecontrol)
Replies the list of download tasks accepting the given url.
|
java.lang.String |
findSummaryDocumentation()
Summarizes acceptable urls for error message purposes.
|
void |
openUrl(boolean newLayer,
java.lang.String url)
Open the given URL.
|
protected void |
remindUploadAddressHistory(HistoryComboBox cbHistory)
Remind the current history in the preferences
|
protected void |
restoreUploadAddressHistory(HistoryComboBox cbHistory)
Restore the current history from the preferences
|
destroy, getCurrentDataSet, getEditLayer, getShortcut, initEnabledState, installAdapters, setTooltip, updateEnabledState, updateEnabledState
protected final java.util.List<java.lang.Class<? extends DownloadTask>> downloadTasks
public OpenLocationAction()
protected void restoreUploadAddressHistory(HistoryComboBox cbHistory)
cbHistory
- protected void remindUploadAddressHistory(HistoryComboBox cbHistory)
cbHistory
- public void actionPerformed(java.awt.event.ActionEvent e)
public java.util.Collection<DownloadTask> findDownloadTasks(java.lang.String url, boolean isRemotecontrol)
url
- The URL to openisRemotecontrol
- True if download request comes from remotecontrol.public java.lang.String findSummaryDocumentation()
public void openUrl(boolean newLayer, java.lang.String url)
newLayer
- true if the URL needs to be opened in a new layer, false otherwiseurl
- The URL to openpublic final boolean addDownloadTaskClass(java.lang.Class<? extends DownloadTask> taskClass)
taskClass
- The new download task to addCollection.add(E)
)