Class ImagesLoader

  • All Implemented Interfaces:
    java.lang.Runnable, ProgressMonitor.CancelListener

    final class ImagesLoader
    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.
    Since:
    18035 (extracted from GeoImageLayer)
    • Constructor Detail

      • ImagesLoader

        ImagesLoader​(java.util.Collection<java.io.File> selection,
                     GpxLayer gpxLayer)
        Constructs a new ImagesLoader.
        Parameters:
        selection - image files to load
        gpxLayer - associated GPX layer
    • Method Detail

      • rememberError

        private 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 - if an I/O error occurs
      • addRecursiveFiles

        private void addRecursiveFiles​(java.util.Collection<java.io.File> files,
                                       java.util.Collection<java.io.File> sel)
      • 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