Ignore:
Timestamp:
2006-04-23T00:41:38+02:00 (20 years ago)
Author:
imi
Message:
  • added "insert node into line segment" mapmode
  • added direction hint to line segments
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/actions/mapmode/MapMode.java

    r91 r93  
    1111import org.openstreetmap.josm.gui.MapFrame;
    1212import org.openstreetmap.josm.gui.MapView;
     13import org.openstreetmap.josm.tools.ImageProvider;
    1314
    1415/**
     
    3233
    3334        /**
    34          * Construct a mapMode with the given icon and the given MapFrame
     35         * Constructor for mapmodes without an menu
    3536         */
    3637        public MapMode(String name, String iconName, String tooltip, String keyname, int keystroke, MapFrame mapFrame) {
    3738                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);
    3850                this.mapFrame = mapFrame;
    3951                mv = mapFrame.mapView;
     
    4557         */
    4658        public void registerListener() {
    47                 firePropertyChange("active", false, true);
     59                putValue("active", true);
    4860        }
    49        
     61
    5062        /**
    5163         * Unregister all listener previously registered.
     
    5365         */
    5466        public void unregisterListener() {
    55                 firePropertyChange("active", true, false);
     67                putValue("active", false);
    5668        }
    5769
Note: See TracChangeset for help on using the changeset viewer.