- Timestamp:
- 2020-08-29T16:54:07+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r16823 r16967 12 12 import java.util.Arrays; 13 13 import java.util.Collection; 14 import java.util. HashMap;14 import java.util.EnumMap; 15 15 import java.util.List; 16 16 import java.util.Locale; … … 251 251 public final HistoryInfoWebAction historyinfoweb = new HistoryInfoWebAction(); 252 252 /** View / "Zoom to"... actions */ 253 public final Map< String, AutoScaleAction> autoScaleActions = newHashMap<>();253 public final Map<AutoScaleMode, AutoScaleAction> autoScaleActions = new EnumMap<>(AutoScaleMode.class); 254 254 /** View / Jump to position */ 255 255 public final JumpToAction jumpToAct = new JumpToAction(); … … 798 798 for (AutoScaleMode mode : AutoScaleMode.values()) { 799 799 AutoScaleAction autoScaleAction = new AutoScaleAction(mode); 800 autoScaleActions.put(mode .getEnglishLabel(), autoScaleAction);800 autoScaleActions.put(mode, autoScaleAction); 801 801 add(viewMenu, autoScaleAction); 802 802 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
r16438 r16967 38 38 39 39 import org.openstreetmap.josm.actions.AbstractSelectAction; 40 import org.openstreetmap.josm.actions.AutoScaleAction; 40 41 import org.openstreetmap.josm.actions.ExpertToggleAction; 41 42 import org.openstreetmap.josm.command.Command; … … 141 142 createLayout(lstConflicts, true, Arrays.asList(btnResolve, btnSelect)); 142 143 143 popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get( "conflict"));144 popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.CONFLICT)); 144 145 145 146 ResolveToMyVersionAction resolveToMyVersionAction = new ResolveToMyVersionAction(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r16438 r16967 140 140 }; 141 141 142 popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get( "problem"));142 popupMenuHandler.addAction(MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.PROBLEM)); 143 143 popupMenuHandler.addAction(new EditRelationAction()); 144 144 popupMenuHandler.addAction(ignoreForNowAction); -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r16913 r16967 74 74 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource; 75 75 import org.openstreetmap.gui.jmapviewer.tilesources.AbstractTMSTileSource; 76 import org.openstreetmap.josm.actions.AutoScaleAction; 76 77 import org.openstreetmap.josm.actions.ExpertToggleAction; 77 78 import org.openstreetmap.josm.actions.ImageryAdjustAction; … … 1752 1753 LayerListDialog.getInstance().createActivateLayerAction(this), 1753 1754 LayerListDialog.getInstance().createShowHideLayerAction(), 1755 MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.LAYER), 1754 1756 LayerListDialog.getInstance().createDeleteLayerAction(), 1755 1757 SeparatorLayerAction.INSTANCE, -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r16941 r16967 25 25 import javax.swing.SwingUtilities; 26 26 27 import org.openstreetmap.josm.actions.AutoScaleAction; 27 28 import org.openstreetmap.josm.actions.ExpertToggleAction; 28 29 import org.openstreetmap.josm.actions.ExpertToggleAction.ExpertModeChangeListener; … … 265 266 LayerListDialog.getInstance().createShowHideLayerAction(), 266 267 LayerListDialog.getInstance().createDeleteLayerAction(), 268 MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.LAYER), 267 269 LayerListDialog.getInstance().createMergeLayerAction(this), 268 270 SeparatorLayerAction.INSTANCE, -
trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
r16548 r16967 16 16 import java.io.IOException; 17 17 import java.text.DateFormat; 18 import java.util.ArrayList;19 18 import java.util.Collection; 20 19 import java.util.Collections; 21 import java.util.List;22 20 import java.util.Objects; 23 21 import java.util.regex.Matcher; … … 35 33 import javax.swing.text.View; 36 34 35 import org.openstreetmap.josm.actions.AutoScaleAction; 37 36 import org.openstreetmap.josm.actions.SaveActionBase; 38 37 import org.openstreetmap.josm.data.Bounds; … … 405 404 @Override 406 405 public Action[] getMenuEntries() { 407 List<Action> actions = new ArrayList<>(); 408 actions.add(LayerListDialog.getInstance().createShowHideLayerAction()); 409 actions.add(LayerListDialog.getInstance().createDeleteLayerAction()); 410 actions.add(new LayerListPopup.InfoAction(this)); 411 actions.add(new LayerSaveAction(this)); 412 actions.add(new LayerSaveAsAction(this)); 413 return actions.toArray(new Action[0]); 406 return new Action[]{ 407 LayerListDialog.getInstance().createShowHideLayerAction(), 408 MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.LAYER), 409 LayerListDialog.getInstance().createDeleteLayerAction(), 410 new LayerListPopup.InfoAction(this), 411 new LayerSaveAction(this), 412 new LayerSaveAsAction(this), 413 }; 414 414 } 415 415 -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r16913 r16967 50 50 import javax.swing.JScrollPane; 51 51 52 import org.openstreetmap.josm.actions.AutoScaleAction; 52 53 import org.openstreetmap.josm.actions.ExpertToggleAction; 53 54 import org.openstreetmap.josm.actions.RenameLayerAction; … … 720 721 @Override 721 722 public Action[] getMenuEntries() { 722 List<Action> actions = new ArrayList<>(); 723 actions.addAll(Arrays.asList( 723 List<Action> actions = new ArrayList<>(Arrays.asList( 724 724 LayerListDialog.getInstance().createActivateLayerAction(this), 725 725 LayerListDialog.getInstance().createShowHideLayerAction(), 726 MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.LAYER), 726 727 LayerListDialog.getInstance().createDeleteLayerAction(), 727 728 SeparatorLayerAction.INSTANCE, -
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r16553 r16967 82 82 @Override 83 83 public Action[] getMenuEntries() { 84 List<Action> ret = new ArrayList<>(); 85 ret.addAll(Arrays.asList(super.getMenuEntries())); 84 List<Action> ret = new ArrayList<>(Arrays.asList(super.getMenuEntries())); 86 85 ret.add(SeparatorLayerAction.INSTANCE); 87 86 ret.add(new LayerSaveAction(this)); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r16913 r16967 36 36 import javax.swing.JOptionPane; 37 37 38 import org.openstreetmap.josm.actions.AutoScaleAction; 38 39 import org.openstreetmap.josm.actions.RenameLayerAction; 39 40 import org.openstreetmap.josm.actions.mapmode.SelectLassoAction; … … 401 402 entries.add(LayerListDialog.getInstance().createShowHideLayerAction()); 402 403 entries.add(LayerListDialog.getInstance().createDeleteLayerAction()); 404 entries.add(MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.LAYER)); 403 405 entries.add(LayerListDialog.getInstance().createMergeLayerAction(this)); 404 406 entries.add(new RenameLayerAction(null, this)); -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r16879 r16967 30 30 import javax.swing.JOptionPane; 31 31 32 import org.openstreetmap.josm.actions.AutoScaleAction; 32 33 import org.openstreetmap.josm.actions.RenameLayerAction; 33 34 import org.openstreetmap.josm.data.Bounds; … … 247 248 components.add(new ShowHideMarkerText(this)); 248 249 components.add(LayerListDialog.getInstance().createDeleteLayerAction()); 250 components.add(MainApplication.getMenu().autoScaleActions.get(AutoScaleAction.AutoScaleMode.LAYER)); 249 251 components.add(LayerListDialog.getInstance().createMergeLayerAction(this)); 250 252 components.add(SeparatorLayerAction.INSTANCE);
Note:
See TracChangeset
for help on using the changeset viewer.