Changeset 10279 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-05-25T08:52:14+02:00 (8 years ago)
Author:
Don-vip
Message:

GSOC core rework - LayerManager, see #12863, rename LayerManagerWithActive to MainLayerManager

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r10271 r10279  
    9292import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
    9393import org.openstreetmap.josm.gui.layer.Layer;
    94 import org.openstreetmap.josm.gui.layer.LayerManagerWithActive;
     94import org.openstreetmap.josm.gui.layer.MainLayerManager;
    9595import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    9696import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener;
     
    199199     * @since 10271
    200200     */
    201     private static final LayerManagerWithActive layerManager = new LayerManagerWithActive();
     201    private static final MainLayerManager layerManager = new MainLayerManager();
    202202
    203203    /**
     
    740740     * Returns the main layer manager that is used by the map view.
    741741     * @return The layer manager. The value returned will never change.
    742      * @since 10271
    743      */
    744     public static LayerManagerWithActive getLayerManager() {
     742     * @since 10279
     743     */
     744    public static MainLayerManager getLayerManager() {
    745745        return layerManager;
    746746    }
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r10277 r10279  
    6161import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
    6262import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
    63 import org.openstreetmap.josm.gui.layer.LayerManagerWithActive;
    64 import org.openstreetmap.josm.gui.layer.LayerManagerWithActive.ActiveLayerChangeEvent;
    65 import org.openstreetmap.josm.gui.layer.LayerManagerWithActive.ActiveLayerChangeListener;
     63import org.openstreetmap.josm.gui.layer.MainLayerManager;
     64import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
     65import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
    6666import org.openstreetmap.josm.gui.layer.MapViewPaintable;
    6767import org.openstreetmap.josm.gui.layer.MapViewPaintable.PaintableInvalidationEvent;
     
    9191public class MapView extends NavigatableComponent
    9292implements PropertyChangeListener, PreferenceChangedListener, OsmDataLayer.LayerStateChangeListener,
    93 LayerManager.LayerChangeListener, LayerManagerWithActive.ActiveLayerChangeListener {
     93LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener {
    9494    /**
    9595     * Interface to notify listeners of a layer change.
     
    265265     * This class is an adapter for the old layer change interface.
    266266     * <p>
    267      * New implementations should use {@link org.openstreetmap.josm.gui.layer.LayerManagerWithActive.ActiveLayerChangeListener}
     267     * New implementations should use {@link org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener}
    268268     * @author Michael Zangl
    269269     * @since 10271
     
    438438     * A list of all layers currently loaded. If we support multiple map views, this list may be different for each of them.
    439439     */
    440     private final LayerManagerWithActive layerManager;
     440    private final MainLayerManager layerManager;
    441441
    442442    /**
     
    479479     * @param viewportData the initial viewport of the map. Can be null, then
    480480     * the viewport is derived from the layer data.
    481      */
    482     public MapView(LayerManagerWithActive layerManager, final JPanel contentPane, final ViewportData viewportData) {
     481     * @since 10279
     482     */
     483    public MapView(MainLayerManager layerManager, final JPanel contentPane, final ViewportData viewportData) {
    483484        this.layerManager = layerManager;
    484485        initialViewport = viewportData;
     
    632633     *
    633634     * @return the next active data layer
    634      * @deprecated now handled by {@link LayerManagerWithActive}
     635     * @deprecated now handled by {@link MainLayerManager}
    635636     */
    636637    @Deprecated
  • trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java

    r10277 r10279  
    1717 * The edit layer is an data layer that we currently work with.
    1818 * @author Michael Zangl
    19  * @since 10271
     19 * @since 10279
    2020 */
    21 public class LayerManagerWithActive extends LayerManager {
     21public class MainLayerManager extends LayerManager {
    2222    /**
    2323     * This listener listens to changes of the active or the edit layer.
     
    5353         * @param previousActiveLayer the previous active layer
    5454         */
    55         ActiveLayerChangeEvent(LayerManagerWithActive source, OsmDataLayer previousEditLayer,
     55        ActiveLayerChangeEvent(MainLayerManager source, OsmDataLayer previousEditLayer,
    5656                Layer previousActiveLayer) {
    5757            super(source);
     
    7777
    7878        @Override
    79         public LayerManagerWithActive getSource() {
    80             return (LayerManagerWithActive) super.getSource();
     79        public MainLayerManager getSource() {
     80            return (MainLayerManager) super.getSource();
    8181        }
    8282    }
Note: See TracChangeset for help on using the changeset viewer.