Package org.openstreetmap.josm.gui.io
Class SaveLayerTask
java.lang.Object
org.openstreetmap.josm.gui.io.AbstractIOTask
org.openstreetmap.josm.gui.io.SaveLayerTask
- All Implemented Interfaces:
Runnable
SaveLayerTask saves the data managed by an
AbstractModifiableLayer to the
Layer.getAssociatedFile().
ExecutorService executorService = ...
SaveLayerTask task = new SaveLayerTask(layer, monitor);
Future<?> taskFuture = executorService.submit(task)
try {
// wait for the task to complete
taskFuture.get();
} catch (Exception e) {
e.printStackTrace();
}
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSaveLayerTask(SaveLayerInfo layerInfo, ProgressMonitor monitor) -
Method Summary
Methods inherited from class org.openstreetmap.josm.gui.io.AbstractIOTask
getLastException, isCanceled, isFailed, isSuccessful, setCanceled, setFailed, setLastException
-
Field Details
-
layerInfo
-
parentMonitor
-
-
Constructor Details
-
SaveLayerTask
- Parameters:
layerInfo- information about the layer to be saved to save. Must not be null.monitor- the monitor. Set toNullProgressMonitor.INSTANCEif null- Throws:
IllegalArgumentException- if layer is null
-
-
Method Details
-
run
-
cancel
Description copied from class:AbstractIOTaskCancel the task- Specified by:
cancelin classAbstractIOTask
-