Package org.openstreetmap.josm.actions
Class SessionLoadAction.Loader
java.lang.Object
org.openstreetmap.josm.gui.PleaseWaitRunnable
org.openstreetmap.josm.actions.SessionLoadAction.Loader
- All Implemented Interfaces:
Runnable,ProgressMonitor.CancelListener
- Enclosing class:
- SessionLoadAction
JOSM session loader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Layerprivate booleanprivate Fileprivate final InputStreamprivate final URIprivate final booleanFields inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable
progressMonitor -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newLoaderfor local session file.Loader(InputStream is, URI uri, boolean zip) Constructs a newLoaderfor session file input stream (may be a remote file). -
Method Summary
Modifier and TypeMethodDescription(package private) static booleanTries to add a new layer.private voidvoidcancel()User pressed cancel button.protected voidfinish()Finish up the data work.private voidhandleException(String dialogTitle, Exception e) protected voidrealRun()Called in the worker thread to do the actual work.private voidMethods inherited from class org.openstreetmap.josm.gui.PleaseWaitRunnable
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
-
Field Details
-
canceled
-
file
-
uri
-
is
-
zip
-
layers
-
active
-
postLoadTasks
-
viewport
-
projectionChoice
-
-
Constructor Details
-
Loader
Constructs a newLoaderfor local session file.- Parameters:
file- The JOSM session filezip-trueif the file is a session archive file (*.joz)
-
Loader
Constructs a newLoaderfor session file input stream (may be a remote file).- Parameters:
is- The input stream to session fileuri- The file URIzip-trueif the file is a session archive file (*.joz)- Since:
- 6245
-
-
Method Details
-
cancel
Description copied from class:PleaseWaitRunnableUser pressed cancel button.- Specified by:
cancelin classPleaseWaitRunnable
-
finish
Description copied from class:PleaseWaitRunnableFinish 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:
finishin classPleaseWaitRunnable
-
addLayers
-
addLayer
Tries to add a new layer.- Parameters:
l- layer to add- Returns:
trueif layer has been added,falseif it wasn't needed or if an error occurred
-
runPostLoadTasks
-
realRun
Description copied from class:PleaseWaitRunnableCalled 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:
realRunin classPleaseWaitRunnable
-
handleException
-