Package org.openstreetmap.josm.gui.layer
Class MainLayerManager.ActiveLayerChangeEvent
- java.lang.Object
-
- org.openstreetmap.josm.gui.layer.LayerManager.LayerManagerEvent
-
- org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent
-
- Enclosing class:
- MainLayerManager
public static class MainLayerManager.ActiveLayerChangeEvent extends LayerManager.LayerManagerEvent
This event is fired whenever the active or the data layer changes.
-
-
Field Summary
Fields Modifier and Type Field Description private Layer
previousActiveLayer
private OsmDataLayer
previousDataLayer
-
Constructor Summary
Constructors Constructor Description ActiveLayerChangeEvent(MainLayerManager source, OsmDataLayer previousDataLayer, Layer previousActiveLayer)
Create a newMainLayerManager.ActiveLayerChangeEvent
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Layer
getPreviousActiveLayer()
Gets the active layer that was previously used.OsmDataLayer
getPreviousDataLayer()
Gets the data layer that was previously used.DataSet
getPreviousDataSet()
Gets the data set that was previously used.MainLayerManager
getSource()
Returns theLayerManager
at the origin of this event.
-
-
-
Field Detail
-
previousDataLayer
private final OsmDataLayer previousDataLayer
-
previousActiveLayer
private final Layer previousActiveLayer
-
-
Constructor Detail
-
ActiveLayerChangeEvent
ActiveLayerChangeEvent(MainLayerManager source, OsmDataLayer previousDataLayer, Layer previousActiveLayer)
Create a newMainLayerManager.ActiveLayerChangeEvent
- Parameters:
source
- The sourcepreviousDataLayer
- the previous data layerpreviousActiveLayer
- the previous active layer
-
-
Method Detail
-
getPreviousDataLayer
public OsmDataLayer getPreviousDataLayer()
Gets the data layer that was previously used.- Returns:
- The old data layer,
null
if there is none. - Since:
- 13434
-
getPreviousActiveLayer
public Layer getPreviousActiveLayer()
Gets the active layer that was previously used.- Returns:
- The old active layer,
null
if there is none.
-
getPreviousDataSet
public DataSet getPreviousDataSet()
Gets the data set that was previously used.- Returns:
- The data set of
getPreviousDataLayer()
. - Since:
- 13434
-
getSource
public MainLayerManager getSource()
Description copied from class:LayerManager.LayerManagerEvent
Returns theLayerManager
at the origin of this event.- Overrides:
getSource
in classLayerManager.LayerManagerEvent
- Returns:
- the
LayerManager
at the origin of this event
-
-