Class WMSLayerExporter
- java.lang.Object
-
- org.openstreetmap.josm.gui.io.importexport.FileExporter
-
- org.openstreetmap.josm.gui.io.importexport.WMSLayerExporter
-
- All Implemented Interfaces:
MainLayerManager.ActiveLayerChangeListener
public class WMSLayerExporter extends FileExporter
Export a WMS layer to a serialized binary file that can be imported later viaWMSLayerImporter
.- Since:
- 5457
-
-
Field Summary
Fields Modifier and Type Field Description static int
CURRENT_FILE_VERSION
Which version of the file we export-
Fields inherited from class org.openstreetmap.josm.gui.io.importexport.FileExporter
filter
-
-
Constructor Summary
Constructors Constructor Description WMSLayerExporter()
Constructs a newWMSLayerExporter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer changed.void
exportData(File file, Layer layer)
Execute the data export.-
Methods inherited from class org.openstreetmap.josm.gui.io.importexport.FileExporter
acceptFile, exportDataQuiet, isCanceled, isEnabled, setCanceled, setEnabled
-
-
-
-
Field Detail
-
CURRENT_FILE_VERSION
public static final int CURRENT_FILE_VERSION
Which version of the file we export- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WMSLayerExporter
public WMSLayerExporter()
Constructs a newWMSLayerExporter
-
-
Method Detail
-
exportData
public void exportData(File file, Layer layer) throws IOException
Description copied from class:FileExporter
Execute the data export. (To be overridden by subclasses.)- Overrides:
exportData
in classFileExporter
- Parameters:
file
- target filelayer
- the layer to export- Throws:
IOException
- in case of an IO error
-
activeOrEditLayerChanged
public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Description copied from interface:MainLayerManager.ActiveLayerChangeListener
Called whenever the active or edit layer changed.You can be sure that this layer is still contained in this set.
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
- Specified by:
activeOrEditLayerChanged
in interfaceMainLayerManager.ActiveLayerChangeListener
- Overrides:
activeOrEditLayerChanged
in classFileExporter
- Parameters:
e
- The change event.
-
-