- Timestamp:
- 2019-10-08T23:08:20+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectLassoAction.java
r15444 r15445 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm.actions ;2 package org.openstreetmap.josm.actions.mapmode; 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import org.openstreetmap.josm.actions.mapmode.MapMode; 6 import java.awt.event.KeyEvent; 7 7 8 import org.openstreetmap.josm.gui.MainApplication; 8 9 import org.openstreetmap.josm.gui.MapFrame; 9 10 import org.openstreetmap.josm.gui.layer.Layer; 10 11 import org.openstreetmap.josm.tools.ImageProvider; 12 import org.openstreetmap.josm.tools.Shortcut; 11 13 12 14 /** … … 14 16 * @since 5152 15 17 */ 16 public class LassoModeAction extends MapMode {18 public class SelectLassoAction extends MapMode { 17 19 18 20 /** 19 * Constructs a new {@code LassoModeAction}.21 * Constructs a new {@code SelectLassoAction}. 20 22 */ 21 public LassoModeAction() {23 public SelectLassoAction() { 22 24 super(tr("Lasso Mode"), 23 25 /* ICON(mapmode/) */ "rope", 24 26 tr("Lasso selection mode: select objects within a hand-drawn region"), 27 Shortcut.registerShortcut("mapmode:lasso", tr("Mode: {0}", tr("Lasso Mode")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), 25 28 ImageProvider.getCursor("normal", "rope")); 26 29 } -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r15438 r15445 344 344 * modeMenu contains map modes 345 345 */ 346 public final JMenu modeMenu = addMenu( "Mode", /* I18N: mnemonic: M */ trc("menu", "Mode"), KeyEvent.VK_M, 3, ht("/Menu/Mode"));346 public final JMenu modeMenu = addMenu(new ModeMenu(), /* I18N: mnemonic: M */ trc("menu", "Mode"), KeyEvent.VK_M, 3, ht("/Menu/Mode")); 347 347 /** 348 348 * toolsMenu contains different geometry manipulation actions from JOSM core (most used) -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r15438 r15445 44 44 import javax.swing.plaf.basic.BasicSplitPaneUI; 45 45 46 import org.openstreetmap.josm.actions.LassoModeAction;47 46 import org.openstreetmap.josm.actions.mapmode.DeleteAction; 48 47 import org.openstreetmap.josm.actions.mapmode.DrawAction; … … 52 51 import org.openstreetmap.josm.actions.mapmode.ParallelWayAction; 53 52 import org.openstreetmap.josm.actions.mapmode.SelectAction; 53 import org.openstreetmap.josm.actions.mapmode.SelectLassoAction; 54 54 import org.openstreetmap.josm.actions.mapmode.ZoomAction; 55 55 import org.openstreetmap.josm.data.ViewportData; … … 176 176 public final DeleteAction mapModeDelete; 177 177 /** Select Lasso mode */ 178 public LassoModeAction mapModeSelectLasso;178 public final SelectLassoAction mapModeSelectLasso; 179 179 180 180 private final transient Map<Layer, MapMode> lastMapMode = new HashMap<>(); … … 241 241 // toolBarActions, map mode buttons 242 242 mapModeSelect = new SelectAction(this); 243 mapModeSelectLasso = new LassoModeAction();243 mapModeSelectLasso = new SelectLassoAction(); 244 244 mapModeDraw = new DrawAction(); 245 245 mapModeZoom = new ZoomAction(this); … … 439 439 if (!(b.getAction() instanceof MapMode)) 440 440 throw new IllegalArgumentException("MapMode action must be subclass of MapMode"); 441 Main Application.getMenu().modeMenu.add(new JCheckBoxMenuItem(b.getAction()));441 MainMenu.add(MainApplication.getMenu().modeMenu, (MapMode) b.getAction()); 442 442 allMapModeButtons.add(b); 443 443 toolBarActionsGroup.add(b); -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r15371 r15445 36 36 import javax.swing.JOptionPane; 37 37 38 import org.openstreetmap.josm.actions.LassoModeAction;39 38 import org.openstreetmap.josm.actions.RenameLayerAction; 39 import org.openstreetmap.josm.actions.mapmode.SelectLassoAction; 40 40 import org.openstreetmap.josm.actions.mapmode.MapMode; 41 41 import org.openstreetmap.josm.actions.mapmode.SelectAction; … … 787 787 /** 788 788 * Determines if the functionality of this layer is available in 789 * the specified map mode. {@link SelectAction} and {@link LassoModeAction} are supported by default,789 * the specified map mode. {@link SelectAction} and {@link SelectLassoAction} are supported by default, 790 790 * other map modes can be registered. 791 791 * @param mapMode Map mode to be checked … … 794 794 */ 795 795 private static boolean isSupportedMapMode(MapMode mapMode) { 796 if (mapMode instanceof SelectAction || mapMode instanceof LassoModeAction) {796 if (mapMode instanceof SelectAction || mapMode instanceof SelectLassoAction) { 797 797 return true; 798 798 }
Note:
See TracChangeset
for help on using the changeset viewer.