Ignore:
Timestamp:
2017-08-24T22:53:50+02:00 (3 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.getLayerManager(). Replacement: gui.MainApplication.getLayerManager()

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/FilterModel.java

    r12630 r12636  
    9696     */
    9797    public void executeFilters() {
    98         DataSet ds = Main.getLayerManager().getEditDataSet();
     98        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    9999        changed = false;
    100100        if (ds == null) {
     
    145145     */
    146146    public void executeFilters(Collection<? extends OsmPrimitive> primitives) {
    147         DataSet ds = Main.getLayerManager().getEditDataSet();
     147        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    148148        if (ds == null)
    149149            return;
     
    197197
    198198    private static void updateMap() {
    199         OsmDataLayer editLayer = Main.getLayerManager().getEditLayer();
     199        OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
    200200        if (editLayer != null) {
    201201            editLayer.invalidate();
     
    207207     */
    208208    public void clearFilterFlags() {
    209         DataSet ds = Main.getLayerManager().getEditDataSet();
     209        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    210210        if (ds != null) {
    211211            FilterWorker.clearFilterFlags(ds.allPrimitives());
  • trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java

    r12537 r12636  
    1212import javax.swing.SwingUtilities;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.data.osm.DataSet;
    1615import org.openstreetmap.josm.data.osm.event.DataSetListenerAdapter.Listener;
     16import org.openstreetmap.josm.gui.MainApplication;
    1717import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
    1818import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
     
    152152     */
    153153    public DatasetEventManager() {
    154         Main.getLayerManager().addActiveLayerChangeListener(this);
     154        MainApplication.getLayerManager().addActiveLayerChangeListener(this);
    155155    }
    156156
  • trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java

    r12537 r12636  
    1111import javax.swing.SwingUtilities;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.data.SelectionChangedListener;
    1514import org.openstreetmap.josm.data.osm.DataSelectionListener;
    1615import org.openstreetmap.josm.data.osm.DataSet;
    1716import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
     17import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.gui.layer.MainLayerManager;
    1919import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
     
    105105     */
    106106    protected SelectionEventManager() {
    107         MainLayerManager layerManager = Main.getLayerManager();
     107        MainLayerManager layerManager = MainApplication.getLayerManager();
    108108        // We do not allow for destructing this object.
    109109        // Currently, this is a singleton class, so this is not required.
     
    212212        inEDTListeners.clear();
    213213        immedatelyListeners.clear();
    214         Main.getLayerManager().addAndFireActiveLayerChangeListener(this);
     214        MainApplication.getLayerManager().addAndFireActiveLayerChangeListener(this);
    215215    }
    216216}
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java

    r12630 r12636  
    1212import java.util.concurrent.CopyOnWriteArrayList;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.data.osm.Changeset;
    1615import org.openstreetmap.josm.data.osm.IPrimitive;
     
    4241        if (historyDataSet == null) {
    4342            historyDataSet = new HistoryDataSet();
    44             Main.getLayerManager().addLayerChangeListener(historyDataSet);
     43            MainApplication.getLayerManager().addLayerChangeListener(historyDataSet);
    4544        }
    4645        return historyDataSet;
     
    228227    public void layerRemoving(LayerRemoveEvent e) {
    229228        if (!MainApplication.isDisplayingMapView()) return;
    230         if (Main.getLayerManager().getLayers().isEmpty()) {
     229        if (MainApplication.getLayerManager().getLayers().isEmpty()) {
    231230            data.clear();
    232231            fireCacheCleared();
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java

    r11779 r12636  
    2828import org.openstreetmap.josm.data.projection.Projection;
    2929import org.openstreetmap.josm.data.projection.ProjectionChangeListener;
     30import org.openstreetmap.josm.gui.MainApplication;
    3031import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
    3132import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
     
    5152        Main.addProjectionChangeListener(this);
    5253        DataSet.addSelectionListener(this);
    53         Main.getLayerManager().addLayerChangeListener(this);
     54        MainApplication.getLayerManager().addLayerChangeListener(this);
    5455    }
    5556
Note: See TracChangeset for help on using the changeset viewer.