org.openstreetmap.josm.gui.layer.geoimage
Class GeoImageLayer.Loader
java.lang.Object
org.openstreetmap.josm.gui.PleaseWaitRunnable
org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer.Loader
- All Implemented Interfaces:
- java.lang.Runnable, ProgressMonitor.CancelListener
- Enclosing class:
- GeoImageLayer
private static final class GeoImageLayer.Loader
- extends PleaseWaitRunnable
Loads a set of images, while displaying a dialog that indicates what the plugin is currently doing.
In facts, this object is instantiated with a list of files. These files may be JPEG files or
directories. In case of directories, they are scanned to find all the images they contain.
Then all the images that have be found are loaded as ImageEntry instances.
Method Summary |
private void |
addRecursiveFiles(java.util.Collection<java.io.File> files,
java.util.Collection<java.io.File> sel)
|
protected void |
cancel()
User pressed cancel button. |
protected void |
finish()
Finish up the data work. |
protected java.lang.String |
formatErrorMessages()
|
protected void |
realRun()
Called in the worker thread to do the actual work. |
protected void |
rememberError(java.lang.String message)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
canceled
private boolean canceled
layer
private GeoImageLayer layer
selection
private java.util.Collection<java.io.File> selection
loadedDirectories
private java.util.HashSet<java.lang.String> loadedDirectories
errorMessages
private java.util.LinkedHashSet<java.lang.String> errorMessages
gpxLayer
private GpxLayer gpxLayer
GeoImageLayer.Loader
public GeoImageLayer.Loader(java.util.Collection<java.io.File> selection,
GpxLayer gpxLayer)
rememberError
protected void rememberError(java.lang.String message)
realRun
protected void realRun()
throws java.io.IOException
- Description copied from class:
PleaseWaitRunnable
- Called in the worker thread to do the actual work. When any of the
exception is thrown, a message box will be displayed and closeDialog
is called. finish() is called in any case.
- Specified by:
realRun
in class PleaseWaitRunnable
- Throws:
java.io.IOException
addRecursiveFiles
private void addRecursiveFiles(java.util.Collection<java.io.File> files,
java.util.Collection<java.io.File> sel)
formatErrorMessages
protected java.lang.String formatErrorMessages()
finish
protected void finish()
- Description copied from class:
PleaseWaitRunnable
- Finish up the data work. Is guaranteed to be called if realRun is called.
Finish is called in the gui thread just after the dialog disappeared.
- Specified by:
finish
in class PleaseWaitRunnable
cancel
protected void cancel()
- Description copied from class:
PleaseWaitRunnable
- User pressed cancel button.
- Specified by:
cancel
in class PleaseWaitRunnable
JOSM