Changes between Version 52 and Version 53 of DevelopersGuide/DevelopingPlugins
- Timestamp:
- 2011-09-20T23:38:27+02:00 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/DevelopingPlugins
v52 v53 124 124 * '''layer change events''' 125 125 126 Implement a [source:/trunk/src/org/openstreetmap/josm/gui/MapView.java org.openstreetmap.josm.gui.MapView.LayerChangeListener] and register is using [source:/trunk/src/org/openstreetmap/josm/gui/MapView.java addLayerChangeListener(LayerChangeListener listener)]. JOSM will then notify you about added, removed, and renamed layers. You may only or also register an [source:/trunk/src/org/openstreetmap/josm/gui/MapView.java org.openstreetmap.josm.gui.MapView.EditLayerChangeListener] in which case JOSM will notify the plugin about changes in the current edit layer, in particular whether there is or there isn't a current edit layer. 126 Implement a [source:/trunk/src/org/openstreetmap/josm/gui/MapView.java org.openstreetmap.josm.gui.MapView.LayerChangedListener] and register is using [source:/trunk/src/org/openstreetmap/josm/gui/MapView.java addLayerChangedListener(LayerChangedListener listener)]. JOSM will then notify you about added, removed, and renamed layers. You may only or also register an [source:/trunk/src/org/openstreetmap/josm/gui/MapView.java org.openstreetmap.josm.gui.MapView.EditLayerChangedListener] in which case JOSM will notify the plugin about changes in the current edit layer, in particular whether there is or there isn't a current edit layer. 127 127 128 128 * '''selection change listener''' 129 129 130 If your plugin needs to respond to changes in the currently selected set of OSM objects it can implement a [source:/trunk/src/org/openstreetmap/josm/data/SelectionChangeListener.java org.openstreetmap.josm.data.SelectionChangeListener] and add it to the global list {{{org.openstreetmap.josm.data.osm.DataSet.selListeners}}}. 130 If your plugin needs to respond to changes in the currently selected set of OSM objects it can implement a [source:/trunk/src/org/openstreetmap/josm/data/SelectionChangedListener.java org.openstreetmap.josm.data.SelectionChangedListener] and add it to the global list {{{org.openstreetmap.josm.data.osm.DataSet.selListeners}}}. 131 131 132 132 * '''data change events''' … … 137 137 138 138 * ''' preference change listener''' 139 If your plugin needs to respond to changes in the JOSM preferences it can implement a [source:/trunk/src/org/openstreetmap/josm/data/Preferences.java org.openstreetmap.josm.data.Preferences.PreferenceChangedListener]. Invoke {{{addPreferenceChangeListener(PreferenceChangedListener listener)}}} on {{{Main.pref}}}. 139 If your plugin needs to respond to changes in the JOSM preferences it can implement a [source:/trunk/src/org/openstreetmap/josm/data/Preferences.java org.openstreetmap.josm.data.Preferences.PreferenceChangedListener]. Invoke {{{addPreferenceChangedListener(PreferenceChangedListener listener)}}} on {{{Main.pref}}}. 140 140 141 141 === Accessing the local file system ===