Changeset 93 in josm for src/org/openstreetmap/josm/actions/mapmode/MapMode.java
- Timestamp:
- 2006-04-23T00:41:38+02:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r91 r93 11 11 import org.openstreetmap.josm.gui.MapFrame; 12 12 import org.openstreetmap.josm.gui.MapView; 13 import org.openstreetmap.josm.tools.ImageProvider; 13 14 14 15 /** … … 32 33 33 34 /** 34 * Construct a mapMode with the given icon and the given MapFrame35 * Constructor for mapmodes without an menu 35 36 */ 36 37 public MapMode(String name, String iconName, String tooltip, String keyname, int keystroke, MapFrame mapFrame) { 37 38 super(name, "mapmode/"+iconName, tooltip, keyname, KeyStroke.getKeyStroke(keystroke, 0)); 39 this.mapFrame = mapFrame; 40 mv = mapFrame.mapView; 41 } 42 43 /** 44 * Constructor for mapmodes with an menu (no shortcut will be registered) 45 */ 46 public MapMode(String name, String iconName, String tooltip, MapFrame mapFrame) { 47 putValue(NAME, name); 48 putValue(SMALL_ICON, ImageProvider.get("mapmode", iconName)); 49 putValue(SHORT_DESCRIPTION, tooltip); 38 50 this.mapFrame = mapFrame; 39 51 mv = mapFrame.mapView; … … 45 57 */ 46 58 public void registerListener() { 47 firePropertyChange("active", false, true);59 putValue("active", true); 48 60 } 49 61 50 62 /** 51 63 * Unregister all listener previously registered. … … 53 65 */ 54 66 public void unregisterListener() { 55 firePropertyChange("active", true, false);67 putValue("active", false); 56 68 } 57 69
Note:
See TracChangeset
for help on using the changeset viewer.
