Changeset 8855 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
- Timestamp:
- 2015-10-10T21:01:42+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r8510 r8855 21 21 * is another. 22 22 * 23 * MapModes should register/deregister all necessary listeners on the map's view 24 * control. 23 * MapModes should register/deregister all necessary listeners on the map's view control. 25 24 */ 26 25 public abstract class MapMode extends JosmAction implements MouseListener, MouseMotionListener { … … 32 31 /** 33 32 * Constructor for mapmodes without an menu 33 * @param mapFrame unused but kept for plugin compatibility. Can be {@code null} 34 34 */ 35 35 public MapMode(String name, String iconName, String tooltip, Shortcut shortcut, MapFrame mapFrame, Cursor cursor) { … … 41 41 /** 42 42 * Constructor for mapmodes with an menu (no shortcut will be registered) 43 * @param mapFrame unused but kept for plugin compatibility. Can be {@code null} 43 44 */ 44 45 public MapMode(String name, String iconName, String tooltip, MapFrame mapFrame, Cursor cursor) { … … 84 85 } 85 86 86 // By default, all tools will work with all layers. Can be overwritten to require 87 // a special type of layer 87 /** 88 * Determines if layer {@code l} is supported by this map mode. 89 * By default, all tools will work with all layers. 90 * Can be overwritten to require a special type of layer 91 * @param l layer 92 * @return {@code true} if the layer is supported by this map mode 93 */ 88 94 public boolean layerIsSupported(Layer l) { 89 return true;95 return l != null; 90 96 } 91 97
Note:
See TracChangeset
for help on using the changeset viewer.