public static class OpenFileAction.OpenFileTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
private boolean |
canceled |
private FileFilter |
fileFilter |
private List<File> |
files |
private boolean |
recordHistory |
private List<File> |
successfullyOpenedFiles |
progressMonitor| Constructor and Description |
|---|
OpenFileTask(List<File> files,
FileFilter fileFilter) |
OpenFileTask(List<File> files,
FileFilter fileFilter,
String title) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
alertFilesNotMatchingWithImporter(Collection<File> files,
FileImporter importer) |
protected void |
alertFilesWithUnknownImporter(Collection<File> files) |
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
List<File> |
getSuccessfullyOpenedFiles()
Replies the list of files that have been successfully opened.
|
void |
importData(FileImporter importer,
List<File> files) |
boolean |
isRecordHistory() |
protected void |
realRun()
Called in the worker thread to do the actual work.
|
void |
setRecordHistory(boolean recordHistory)
save filename in history (for list of recently opened files)
default: false
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, runprivate List<File> successfullyOpenedFiles
private FileFilter fileFilter
private boolean canceled
private boolean recordHistory
public OpenFileTask(List<File> files, FileFilter fileFilter, String title)
public OpenFileTask(List<File> files, FileFilter fileFilter)
public void setRecordHistory(boolean recordHistory)
public boolean isRecordHistory()
protected void cancel()
PleaseWaitRunnablecancel in class PleaseWaitRunnableprotected void finish()
PleaseWaitRunnablefinish in class PleaseWaitRunnableprotected void alertFilesNotMatchingWithImporter(Collection<File> files, FileImporter importer)
protected void alertFilesWithUnknownImporter(Collection<File> files)
protected void realRun() throws SAXException, IOException, OsmTransferException
PleaseWaitRunnablerealRun in class PleaseWaitRunnableSAXExceptionIOExceptionOsmTransferExceptionpublic void importData(FileImporter importer, List<File> files)
public List<File> getSuccessfullyOpenedFiles()