public static class SessionLoadAction.Loader extends PleaseWaitRunnable
Modifier and Type | Field and Description |
---|---|
private Layer |
active |
private boolean |
canceled |
private java.io.File |
file |
private java.io.InputStream |
is |
private java.util.List<Layer> |
layers |
private java.util.List<java.lang.Runnable> |
postLoadTasks |
private SessionReader.SessionProjectionChoiceData |
projectionChoice |
private java.net.URI |
uri |
private SessionReader.SessionViewportData |
viewport |
private boolean |
zip |
progressMonitor
Constructor and Description |
---|
Loader(java.io.File file,
boolean zip)
Constructs a new
Loader for local session file. |
Loader(java.io.InputStream is,
java.net.URI uri,
boolean zip)
Constructs a new
Loader for session file input stream (may be a remote file). |
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
addLayer(Layer l)
Tries to add a new layer.
|
private void |
addLayers() |
void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
private void |
handleException(java.lang.String dialogTitle,
java.lang.Exception e) |
protected void |
realRun()
Called in the worker thread to do the actual work.
|
private void |
runPostLoadTasks() |
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private boolean canceled
private java.io.File file
private final java.net.URI uri
private final java.io.InputStream is
private final boolean zip
private java.util.List<java.lang.Runnable> postLoadTasks
private SessionReader.SessionViewportData viewport
private SessionReader.SessionProjectionChoiceData projectionChoice
public Loader(java.io.File file, boolean zip)
Loader
for local session file.file
- The JOSM session filezip
- true
if the file is a session archive file (*.joz)public Loader(java.io.InputStream is, java.net.URI uri, boolean zip)
Loader
for session file input stream (may be a remote file).is
- The input stream to session fileuri
- The file URIzip
- true
if the file is a session archive file (*.joz)public void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
private void addLayers()
static boolean addLayer(Layer l)
l
- layer to addtrue
if layer has been added, false
if it wasn't needed or if an error occurredprivate void runPostLoadTasks()
protected void realRun()
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
private void handleException(java.lang.String dialogTitle, java.lang.Exception e)