public class JpgImporter extends FileImporter
Modifier and Type | Field and Description |
---|---|
static ExtensionFileFilter |
FILE_FILTER
The default file filter (only *.jpg files).
|
static ExtensionFileFilter |
FILE_FILTER_WITH_FOLDERS
An alternate file filter that also includes folders.
|
private GpxLayer |
gpx |
filter
Constructor and Description |
---|
JpgImporter()
Constructs a new
JpgImporter . |
JpgImporter(boolean includeFolders)
Constructs a new
JpgImporter with folders selection, if wanted. |
JpgImporter(GpxLayer gpx)
Constructs a new
JpgImporter for the given GPX layer. |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFile(File pathname)
Determines if this file importer accepts the given file.
|
private void |
addRecursiveFiles(List<File> files,
Set<String> visitedDirs,
List<File> sel,
ProgressMonitor progressMonitor) |
double |
getPriority()
Needs to be the last, to avoid problems.
|
void |
importData(List<File> sel,
ProgressMonitor progressMonitor)
Needs to be implemented if isBatchImporter() returns true.
|
boolean |
isBatchImporter()
A batch importer is a file importer that prefers to read multiple files at the same time.
|
activeLayerChange, compareTo, importData, importDataHandleExceptions, importDataHandleExceptions, isEnabled, layerAdded, layerRemoved, setEnabled
public static final ExtensionFileFilter FILE_FILTER
public static final ExtensionFileFilter FILE_FILTER_WITH_FOLDERS
public JpgImporter()
JpgImporter
.public JpgImporter(boolean includeFolders)
JpgImporter
with folders selection, if wanted.includeFolders
- If true, includes folders in the file filterpublic JpgImporter(GpxLayer gpx)
JpgImporter
for the given GPX layer. Folders selection is allowed.gpx
- The GPX layerpublic boolean acceptFile(File pathname)
FileImporter
acceptFile
in class FileImporter
pathname
- The file to testtrue
if this file importer accepts the given file, false
otherwisepublic void importData(List<File> sel, ProgressMonitor progressMonitor) throws IOException, IllegalDataException
FileImporter
importData
in class FileImporter
sel
- files to importprogressMonitor
- progress monitorIOException
- if any I/O error occursIllegalDataException
- if invalid data is readprivate void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor) throws IOException
IOException
public boolean isBatchImporter()
FileImporter
isBatchImporter
in class FileImporter
true
if this importer is a batch importerpublic double getPriority()
getPriority
in class FileImporter