Changeset 198 in josm for src/org/openstreetmap/josm/actions
- Timestamp:
- 2007-01-14T09:41:24+01:00 (18 years ago)
- Location:
- src/org/openstreetmap/josm/actions/mapmode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/mapmode/AddNodeAction.java
r184 r198 25 25 import org.openstreetmap.josm.data.osm.Way; 26 26 import org.openstreetmap.josm.gui.MapFrame; 27 import org.openstreetmap.josm.tools.ImageProvider;28 27 29 28 /** … … 54 53 55 54 public AddNodeAction(MapFrame mapFrame, String name, Mode mode, String desc) { 56 super(name, "node/"+mode, desc, mapFrame, ImageProvider.getCursor("crosshair", "node"));55 super(name, "node/"+mode, desc, mapFrame, Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); 57 56 this.mode = mode; 58 57 putValue("help", "Action/AddNode/"+Character.toUpperCase(mode.toString().charAt(0))+mode.toString().substring(1)); … … 62 61 super.enterMode(); 63 62 Main.map.mapView.addMouseListener(this); 64 Main.map.mapView.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));65 63 } 66 64 … … 68 66 super.exitMode(); 69 67 Main.map.mapView.removeMouseListener(this); 70 Main.map.mapView.setCursor(Cursor.getDefaultCursor());71 68 } 72 69 -
src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r178 r198 21 21 */ 22 22 abstract public class MapMode extends JosmAction implements MouseListener, MouseMotionListener { 23 //private final Cursor cursor;24 //private Cursor oldCursor;23 private final Cursor cursor; 24 private Cursor oldCursor; 25 25 26 26 /** … … 29 29 public MapMode(String name, String iconName, String tooltip, int keystroke, MapFrame mapFrame, Cursor cursor) { 30 30 super(name, "mapmode/"+iconName, tooltip, keystroke, 0, false); 31 //this.cursor = cursor;31 this.cursor = cursor; 32 32 putValue("active", false); 33 33 } … … 40 40 putValue(SMALL_ICON, ImageProvider.get("mapmode", iconName)); 41 41 putValue(SHORT_DESCRIPTION, tooltip); 42 //this.cursor = cursor;42 this.cursor = cursor; 43 43 } 44 44 45 45 public void enterMode() { 46 46 putValue("active", true); 47 //oldCursor = Main.map.mapView.getCursor();48 //Main.map.mapView.setCursor(cursor);47 oldCursor = Main.map.mapView.getCursor(); 48 Main.map.mapView.setCursor(cursor); 49 49 50 50 } 51 51 public void exitMode() { 52 52 putValue("active", false); 53 //Main.map.mapView.setCursor(oldCursor);53 Main.map.mapView.setCursor(oldCursor); 54 54 } 55 55
Note:
See TracChangeset
for help on using the changeset viewer.