Changeset 12881 in josm for trunk/src/org
- Timestamp:
- 2017-09-21T12:41:32+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 added
- 37 edited
- 7 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PreferenceToggleAction.java
r12846 r12881 7 7 8 8 import org.openstreetmap.josm.Main; 9 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 9 10 import org.openstreetmap.josm.data.Preferences; 10 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;11 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 11 12 import org.openstreetmap.josm.data.preferences.BooleanProperty; 12 13 … … 52 53 53 54 @Override 54 public void preferenceChanged(Preference s.PreferenceChangeEvent e) {55 public void preferenceChanged(PreferenceChangeEvent e) { 55 56 checkbox.setSelected(pref.get()); 56 57 } -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r12856 r12881 27 27 import org.openstreetmap.josm.data.osm.DataSet; 28 28 import org.openstreetmap.josm.data.osm.DatasetConsistencyTest; 29 import org.openstreetmap.josm. data.preferences.Setting;29 import org.openstreetmap.josm.spi.preferences.Setting; 30 30 import org.openstreetmap.josm.data.preferences.sources.MapPaintPrefHelper; 31 31 import org.openstreetmap.josm.data.preferences.sources.PresetPrefHelper; -
trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
r12873 r12881 12 12 13 13 import org.openstreetmap.josm.actions.JosmAction; 14 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;15 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;14 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 15 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; 17 17 import org.openstreetmap.josm.gui.MainApplication; -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r12865 r12881 48 48 import org.openstreetmap.josm.data.preferences.DoubleProperty; 49 49 import org.openstreetmap.josm.data.preferences.IntegerProperty; 50 import org.openstreetmap.josm. data.preferences.ListListSetting;51 import org.openstreetmap.josm. data.preferences.ListSetting;50 import org.openstreetmap.josm.spi.preferences.ListListSetting; 51 import org.openstreetmap.josm.spi.preferences.ListSetting; 52 52 import org.openstreetmap.josm.data.preferences.LongProperty; 53 import org.openstreetmap.josm. data.preferences.MapListSetting;53 import org.openstreetmap.josm.spi.preferences.MapListSetting; 54 54 import org.openstreetmap.josm.data.preferences.PreferencesReader; 55 55 import org.openstreetmap.josm.data.preferences.PreferencesWriter; 56 import org.openstreetmap.josm. data.preferences.Setting;57 import org.openstreetmap.josm. data.preferences.StringSetting;56 import org.openstreetmap.josm.spi.preferences.Setting; 57 import org.openstreetmap.josm.spi.preferences.StringSetting; 58 58 import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry; 59 59 import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper; … … 157 157 /** 158 158 * Event triggered when a preference entry value changes. 159 */ 159 * @deprecated use {@link org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent} 160 */ 161 @Deprecated 160 162 public interface PreferenceChangeEvent { 161 163 /** … … 181 183 * Listener to preference change events. 182 184 * @since 10600 (functional interface) 185 * @deprecated use {@link org.openstreetmap.josm.spi.preferences.PreferenceChangedListener} 183 186 */ 184 187 @FunctionalInterface 188 @Deprecated 185 189 public interface PreferenceChangedListener { 186 190 /** … … 191 195 } 192 196 197 @Deprecated 193 198 private static class DefaultPreferenceChangeEvent implements PreferenceChangeEvent { 194 199 private final String key; … … 218 223 } 219 224 220 private final ListenerList<PreferenceChangedListener> listeners = ListenerList.create(); 221 222 private final HashMap<String, ListenerList<PreferenceChangedListener>> keyListeners = new HashMap<>(); 225 private final ListenerList<org.openstreetmap.josm.spi.preferences.PreferenceChangedListener> listeners = ListenerList.create(); 226 227 private final HashMap<String, ListenerList<org.openstreetmap.josm.spi.preferences.PreferenceChangedListener>> keyListeners = new HashMap<>(); 228 229 @Deprecated 230 private final ListenerList<Preferences.PreferenceChangedListener> listenersDeprecated = ListenerList.create(); 231 232 @Deprecated 233 private final HashMap<String, ListenerList<Preferences.PreferenceChangedListener>> keyListenersDeprecated = new HashMap<>(); 223 234 224 235 /** … … 243 254 * Adds a new preferences listener. 244 255 * @param listener The listener to add 256 * @since xxx 245 257 */ 246 258 @Override 247 public void addPreferenceChangeListener( PreferenceChangedListener listener) {259 public void addPreferenceChangeListener(org.openstreetmap.josm.spi.preferences.PreferenceChangedListener listener) { 248 260 if (listener != null) { 249 261 listeners.addListener(listener); … … 252 264 253 265 /** 266 * Adds a new preferences listener. 267 * @param listener The listener to add 268 * @deprecated use {@link #addPreferenceChangeListener(org.openstreetmap.josm.spi.preferences.PreferenceChangedListener)} 269 */ 270 @Deprecated 271 public void addPreferenceChangeListener(Preferences.PreferenceChangedListener listener) { 272 if (listener != null) { 273 listenersDeprecated.addListener(listener); 274 } 275 } 276 277 /** 254 278 * Removes a preferences listener. 255 279 * @param listener The listener to remove 280 * @since xxx 256 281 */ 257 282 @Override 258 public void removePreferenceChangeListener( PreferenceChangedListener listener) {283 public void removePreferenceChangeListener(org.openstreetmap.josm.spi.preferences.PreferenceChangedListener listener) { 259 284 listeners.removeListener(listener); 285 } 286 287 /** 288 * Removes a preferences listener. 289 * @param listener The listener to remove 290 * @deprecated use {@link #removePreferenceChangeListener(org.openstreetmap.josm.spi.preferences.PreferenceChangedListener)} 291 */ 292 @Deprecated 293 public void removePreferenceChangeListener(Preferences.PreferenceChangedListener listener) { 294 listenersDeprecated.removeListener(listener); 295 } 296 297 /** 298 * Adds a listener that only listens to changes in one preference 299 * @param key The preference key to listen to 300 * @param listener The listener to add. 301 * @since xxx 302 */ 303 @Override 304 public void addKeyPreferenceChangeListener(String key, org.openstreetmap.josm.spi.preferences.PreferenceChangedListener listener) { 305 listenersForKey(key).addListener(listener); 260 306 } 261 307 … … 265 311 * @param listener The listener to add. 266 312 * @since 10824 267 */ 268 @Override 269 public void addKeyPreferenceChangeListener(String key, PreferenceChangedListener listener) { 270 listenersForKey(key).addListener(listener); 313 * @deprecated use {@link #addKeyPreferenceChangeListener(java.lang.String, org.openstreetmap.josm.spi.preferences.PreferenceChangedListener)} 314 */ 315 @Deprecated 316 public void addKeyPreferenceChangeListener(String key, Preferences.PreferenceChangedListener listener) { 317 listenersForKeyDeprecated(key).addListener(listener); 271 318 } 272 319 … … 277 324 * @since 10824 278 325 */ 279 public void addWeakKeyPreferenceChangeListener(String key, PreferenceChangedListener listener) {326 public void addWeakKeyPreferenceChangeListener(String key, org.openstreetmap.josm.spi.preferences.PreferenceChangedListener listener) { 280 327 listenersForKey(key).addWeakListener(listener); 281 328 } 282 329 283 private ListenerList< PreferenceChangedListener> listenersForKey(String key) {330 private ListenerList<org.openstreetmap.josm.spi.preferences.PreferenceChangedListener> listenersForKey(String key) { 284 331 return keyListeners.computeIfAbsent(key, k -> ListenerList.create()); 332 } 333 334 @Deprecated 335 private ListenerList<Preferences.PreferenceChangedListener> listenersForKeyDeprecated(String key) { 336 return keyListenersDeprecated.computeIfAbsent(key, k -> ListenerList.create()); 285 337 } 286 338 … … 289 341 * @param key The preference key to listen to 290 342 * @param listener The listener to add. 343 * @since xxx 291 344 */ 292 345 @Override 293 public void removeKeyPreferenceChangeListener(String key, PreferenceChangedListener listener) {346 public void removeKeyPreferenceChangeListener(String key, org.openstreetmap.josm.spi.preferences.PreferenceChangedListener listener) { 294 347 Optional.ofNullable(keyListeners.get(key)).orElseThrow( 295 348 () -> new IllegalArgumentException("There are no listeners registered for " + key)) … … 297 350 } 298 351 352 /** 353 * Removes a listener that only listens to changes in one preference 354 * @param key The preference key to listen to 355 * @param listener The listener to add. 356 * @deprecated use {@link #removeKeyPreferenceChangeListener(java.lang.String, org.openstreetmap.josm.spi.preferences.PreferenceChangedListener)} 357 */ 358 @Deprecated 359 public void removeKeyPreferenceChangeListener(String key, Preferences.PreferenceChangedListener listener) { 360 Optional.ofNullable(keyListenersDeprecated.get(key)).orElseThrow( 361 () -> new IllegalArgumentException("There are no listeners registered for " + key)) 362 .removeListener(listener); 363 } 364 299 365 protected void firePreferenceChanged(String key, Setting<?> oldValue, Setting<?> newValue) { 300 final PreferenceChangeEvent evt = newDefaultPreferenceChangeEvent(key, oldValue, newValue);366 final org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent evt = new org.openstreetmap.josm.spi.preferences.DefaultPreferenceChangeEvent(key, oldValue, newValue); 301 367 listeners.fireEvent(listener -> listener.preferenceChanged(evt)); 302 368 303 ListenerList< PreferenceChangedListener> forKey = keyListeners.get(key);369 ListenerList<org.openstreetmap.josm.spi.preferences.PreferenceChangedListener> forKey = keyListeners.get(key); 304 370 if (forKey != null) { 305 371 forKey.fireEvent(listener -> listener.preferenceChanged(evt)); 372 } 373 firePreferenceChangedDeprecated(key, oldValue, newValue); 374 } 375 376 @Deprecated 377 private void firePreferenceChangedDeprecated(String key, Setting<?> oldValue, Setting<?> newValue) { 378 final Preferences.PreferenceChangeEvent evtDeprecated = new Preferences.DefaultPreferenceChangeEvent(key, oldValue, newValue); 379 listenersDeprecated.fireEvent(listener -> listener.preferenceChanged(evtDeprecated)); 380 381 ListenerList<Preferences.PreferenceChangedListener> forKeyDeprecated = keyListenersDeprecated.get(key); 382 if (forKeyDeprecated != null) { 383 forKeyDeprecated.fireEvent(listener -> listener.preferenceChanged(evtDeprecated)); 306 384 } 307 385 } -
trunk/src/org/openstreetmap/josm/data/PreferencesUtils.java
r12869 r12881 18 18 19 19 import org.openstreetmap.josm.Main; 20 import org.openstreetmap.josm. data.preferences.ListListSetting;21 import org.openstreetmap.josm. data.preferences.ListSetting;22 import org.openstreetmap.josm. data.preferences.MapListSetting;23 import org.openstreetmap.josm. data.preferences.Setting;24 import org.openstreetmap.josm. data.preferences.StringSetting;20 import org.openstreetmap.josm.spi.preferences.ListListSetting; 21 import org.openstreetmap.josm.spi.preferences.ListSetting; 22 import org.openstreetmap.josm.spi.preferences.MapListSetting; 23 import org.openstreetmap.josm.spi.preferences.Setting; 24 import org.openstreetmap.josm.spi.preferences.StringSetting; 25 25 import org.openstreetmap.josm.tools.Logging; 26 26 import org.openstreetmap.josm.tools.Utils; -
trunk/src/org/openstreetmap/josm/data/UserIdentityManager.java
r12846 r12881 7 7 8 8 import org.openstreetmap.josm.Main; 9 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;10 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;9 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 10 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 11 11 import org.openstreetmap.josm.data.oauth.OAuthAccessTokenHolder; 12 12 import org.openstreetmap.josm.data.osm.User; 13 13 import org.openstreetmap.josm.data.osm.UserInfo; 14 import org.openstreetmap.josm. data.preferences.StringSetting;14 import org.openstreetmap.josm.spi.preferences.StringSetting; 15 15 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 16 16 import org.openstreetmap.josm.io.OnlineResource; -
trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
r12846 r12881 12 12 import java.util.stream.Collectors; 13 13 14 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;15 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;14 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 15 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 16 16 import org.openstreetmap.josm.data.UserIdentityManager; 17 17 import org.openstreetmap.josm.spi.preferences.Config; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java
r12846 r12881 4 4 import java.awt.Color; 5 5 6 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;7 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;6 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 7 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 8 8 import org.openstreetmap.josm.spi.preferences.Config; 9 9 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r12846 r12881 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;18 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;17 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 18 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 19 19 import org.openstreetmap.josm.data.coor.EastNorth; 20 20 import org.openstreetmap.josm.data.osm.DataSet; -
trunk/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java
r12207 r12881 4 4 import org.openstreetmap.josm.Main; 5 5 import org.openstreetmap.josm.data.Preferences; 6 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;7 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;6 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 7 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 8 8 import org.openstreetmap.josm.tools.ListenableWeakReference; 9 9 import org.openstreetmap.josm.tools.bugreport.BugReport; -
trunk/src/org/openstreetmap/josm/data/preferences/AbstractToStringProperty.java
r12620 r12881 2 2 package org.openstreetmap.josm.data.preferences; 3 3 4 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;4 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 5 5 import org.openstreetmap.josm.tools.CheckParameterUtil; 6 6 import org.openstreetmap.josm.tools.Logging; -
trunk/src/org/openstreetmap/josm/data/preferences/CachedProperty.java
r12867 r12881 2 2 package org.openstreetmap.josm.data.preferences; 3 3 4 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;5 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;4 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 5 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 6 6 import org.openstreetmap.josm.spi.preferences.Config; 7 7 -
trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java
r12620 r12881 32 32 import org.openstreetmap.josm.io.CachedFile; 33 33 import org.openstreetmap.josm.io.XmlStreamParsingException; 34 import org.openstreetmap.josm.spi.preferences.Setting; 35 import org.openstreetmap.josm.spi.preferences.ListListSetting; 36 import org.openstreetmap.josm.spi.preferences.ListSetting; 37 import org.openstreetmap.josm.spi.preferences.MapListSetting; 38 import org.openstreetmap.josm.spi.preferences.StringSetting; 34 39 import org.openstreetmap.josm.tools.Logging; 35 40 import org.xml.sax.SAXException; -
trunk/src/org/openstreetmap/josm/data/preferences/PreferencesWriter.java
r11746 r12881 12 12 import org.openstreetmap.josm.data.Version; 13 13 import org.openstreetmap.josm.io.XmlWriter; 14 import org.openstreetmap.josm.spi.preferences.Setting; 15 import org.openstreetmap.josm.spi.preferences.ListListSetting; 16 import org.openstreetmap.josm.spi.preferences.SettingVisitor; 17 import org.openstreetmap.josm.spi.preferences.ListSetting; 18 import org.openstreetmap.josm.spi.preferences.MapListSetting; 19 import org.openstreetmap.josm.spi.preferences.StringSetting; 14 20 15 21 /** -
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r12743 r12881 2 2 package org.openstreetmap.josm.gui; 3 3 4 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;4 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 5 5 import org.openstreetmap.josm.data.UserIdentityManager; 6 6 import org.openstreetmap.josm.data.osm.User; -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r12846 r12881 51 51 import org.openstreetmap.josm.actions.mapmode.SelectAction; 52 52 import org.openstreetmap.josm.actions.mapmode.ZoomAction; 53 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;53 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 54 54 import org.openstreetmap.josm.data.ViewportData; 55 55 import org.openstreetmap.josm.data.preferences.BooleanProperty; -
trunk/src/org/openstreetmap/josm/gui/MapMover.java
r12846 r12881 19 19 import org.openstreetmap.josm.Main; 20 20 import org.openstreetmap.josm.actions.mapmode.SelectAction; 21 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;22 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;21 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 22 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 23 23 import org.openstreetmap.josm.data.coor.EastNorth; 24 24 import org.openstreetmap.josm.data.preferences.BooleanProperty; -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r12866 r12881 56 56 57 57 import org.openstreetmap.josm.Main; 58 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;59 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;58 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 59 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 60 60 import org.openstreetmap.josm.data.SystemOfMeasurement; 61 61 import org.openstreetmap.josm.data.SystemOfMeasurement.SoMChangeListener; -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r12846 r12881 41 41 import org.openstreetmap.josm.actions.mapmode.MapMode; 42 42 import org.openstreetmap.josm.data.Bounds; 43 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;44 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;43 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 44 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 45 45 import org.openstreetmap.josm.data.ProjectionBounds; 46 46 import org.openstreetmap.josm.data.ViewportData; -
trunk/src/org/openstreetmap/josm/gui/autofilter/AutoFilterManager.java
r12846 r12881 22 22 23 23 import org.openstreetmap.josm.actions.mapmode.MapMode; 24 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;25 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;24 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 25 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 26 26 import org.openstreetmap.josm.data.osm.BBox; 27 27 import org.openstreetmap.josm.data.osm.DataSet; -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r12846 r12881 50 50 import org.openstreetmap.josm.Main; 51 51 import org.openstreetmap.josm.actions.JosmAction; 52 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;53 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;52 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 53 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 54 54 import org.openstreetmap.josm.data.preferences.BooleanProperty; 55 55 import org.openstreetmap.josm.data.preferences.ParametrizedEnumProperty; -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r12846 r12881 63 63 import org.openstreetmap.josm.command.ChangePropertyCommand; 64 64 import org.openstreetmap.josm.command.Command; 65 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;65 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 66 66 import org.openstreetmap.josm.data.SelectionChangedListener; 67 67 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; -
trunk/src/org/openstreetmap/josm/gui/io/CustomConfigurator.java
r12856 r12881 45 45 import org.openstreetmap.josm.data.PreferencesUtils; 46 46 import org.openstreetmap.josm.data.Version; 47 import org.openstreetmap.josm. data.preferences.Setting;47 import org.openstreetmap.josm.spi.preferences.Setting; 48 48 import org.openstreetmap.josm.gui.MainApplication; 49 49 import org.openstreetmap.josm.plugins.PluginDownloadTask; -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r12853 r12881 43 43 import org.openstreetmap.josm.Main; 44 44 import org.openstreetmap.josm.data.APIDataSet; 45 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;46 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;45 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 46 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 47 47 import org.openstreetmap.josm.data.Version; 48 48 import org.openstreetmap.josm.data.osm.Changeset; 49 49 import org.openstreetmap.josm.data.osm.DataSet; 50 50 import org.openstreetmap.josm.data.osm.OsmPrimitive; 51 import org.openstreetmap.josm. data.preferences.Setting;51 import org.openstreetmap.josm.spi.preferences.Setting; 52 52 import org.openstreetmap.josm.gui.ExtendedDialog; 53 53 import org.openstreetmap.josm.gui.HelpAwareOptionPane; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r12725 r12881 24 24 25 25 import org.openstreetmap.josm.Main; 26 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;26 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 27 27 import org.openstreetmap.josm.data.coor.CachedLatLon; 28 28 import org.openstreetmap.josm.data.coor.EastNorth; -
trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
r12846 r12881 11 11 import java.util.Map.Entry; 12 12 13 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;14 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;13 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 14 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 15 15 import org.openstreetmap.josm.data.osm.Node; 16 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LabelCompositionStrategy.java
r12854 r12881 8 8 import java.util.Objects; 9 9 10 import org.openstreetmap.josm. data.Preferences.PreferenceChangeEvent;11 import org.openstreetmap.josm. data.Preferences.PreferenceChangedListener;10 import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; 11 import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener; 12 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 13 import org.openstreetmap.josm.spi.preferences.Config; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
r12856 r12881 40 40 import org.openstreetmap.josm.data.Preferences; 41 41 import org.openstreetmap.josm.data.PreferencesUtils; 42 import org.openstreetmap.josm. data.preferences.Setting;43 import org.openstreetmap.josm. data.preferences.StringSetting;42 import org.openstreetmap.josm.spi.preferences.Setting; 43 import org.openstreetmap.josm.spi.preferences.StringSetting; 44 44 import org.openstreetmap.josm.gui.dialogs.LogShowDialog; 45 45 import org.openstreetmap.josm.gui.io.CustomConfigurator; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
r12634 r12881 20 20 import org.openstreetmap.josm.actions.DiskAccessAction; 21 21 import org.openstreetmap.josm.data.Preferences; 22 import org.openstreetmap.josm. data.preferences.Setting;22 import org.openstreetmap.josm.spi.preferences.Setting; 23 23 import org.openstreetmap.josm.gui.io.CustomConfigurator; 24 24 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java
r10657 r12881 16 16 import javax.swing.table.AbstractTableModel; 17 17 18 import org.openstreetmap.josm. data.preferences.ListSetting;18 import org.openstreetmap.josm.spi.preferences.ListSetting; 19 19 import org.openstreetmap.josm.gui.widgets.JosmTextField; 20 20 import org.openstreetmap.josm.tools.GBC; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java
r9759 r12881 12 12 import javax.swing.table.AbstractTableModel; 13 13 14 import org.openstreetmap.josm. data.preferences.ListListSetting;14 import org.openstreetmap.josm.spi.preferences.ListListSetting; 15 15 16 16 /** -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
r9759 r12881 16 16 import javax.swing.table.AbstractTableModel; 17 17 18 import org.openstreetmap.josm. data.preferences.MapListSetting;18 import org.openstreetmap.josm.spi.preferences.MapListSetting; 19 19 20 20 /** -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PrefEntry.java
r11553 r12881 2 2 package org.openstreetmap.josm.gui.preferences.advanced; 3 3 4 import org.openstreetmap.josm. data.preferences.Setting;4 import org.openstreetmap.josm.spi.preferences.Setting; 5 5 import org.openstreetmap.josm.tools.CheckParameterUtil; 6 6 -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
r12280 r12881 30 30 31 31 import org.openstreetmap.josm.data.preferences.ColorProperty; 32 import org.openstreetmap.josm. data.preferences.ListListSetting;33 import org.openstreetmap.josm. data.preferences.ListSetting;34 import org.openstreetmap.josm. data.preferences.MapListSetting;35 import org.openstreetmap.josm. data.preferences.Setting;36 import org.openstreetmap.josm. data.preferences.StringSetting;32 import org.openstreetmap.josm.spi.preferences.ListListSetting; 33 import org.openstreetmap.josm.spi.preferences.ListSetting; 34 import org.openstreetmap.josm.spi.preferences.MapListSetting; 35 import org.openstreetmap.josm.spi.preferences.Setting; 36 import org.openstreetmap.josm.spi.preferences.StringSetting; 37 37 import org.openstreetmap.josm.gui.ExtendedDialog; 38 38 import org.openstreetmap.josm.gui.util.GuiHelper; -
trunk/src/org/openstreetmap/josm/gui/preferences/advanced/StringEditor.java
r12279 r12881 10 10 import javax.swing.JPanel; 11 11 12 import org.openstreetmap.josm. data.preferences.StringSetting;12 import org.openstreetmap.josm.spi.preferences.StringSetting; 13 13 import org.openstreetmap.josm.gui.ExtendedDialog; 14 14 import org.openstreetmap.josm.gui.widgets.JosmTextField; -
trunk/src/org/openstreetmap/josm/spi/preferences/AbstractPreferences.java
r12853 r12881 5 5 import java.util.Map; 6 6 7 import org.openstreetmap.josm.data.preferences.ListListSetting;8 import org.openstreetmap.josm.data.preferences.ListSetting;9 import org.openstreetmap.josm.data.preferences.MapListSetting;10 import org.openstreetmap.josm.data.preferences.Setting;11 import org.openstreetmap.josm.data.preferences.StringSetting;12 7 import org.openstreetmap.josm.tools.Logging; 13 8 -
trunk/src/org/openstreetmap/josm/spi/preferences/AbstractSetting.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data.preferences;2 package org.openstreetmap.josm.spi.preferences; 3 3 4 4 import java.util.Objects; … … 8 8 * 9 9 * @param <T> The setting type 10 * @since 975910 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 11 11 */ 12 12 public abstract class AbstractSetting<T> implements Setting<T> { -
trunk/src/org/openstreetmap/josm/spi/preferences/IPreferences.java
r12853 r12881 5 5 import java.util.List; 6 6 import java.util.Map; 7 8 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;9 7 10 8 /** -
trunk/src/org/openstreetmap/josm/spi/preferences/ListListSetting.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data.preferences;2 package org.openstreetmap.josm.spi.preferences; 3 3 4 4 import java.util.ArrayList; … … 9 9 /** 10 10 * Setting containing a {@link List} of {@code List}s of {@link String} values. 11 * @since 975911 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 12 12 */ 13 13 public class ListListSetting extends AbstractSetting<List<List<String>>> { -
trunk/src/org/openstreetmap/josm/spi/preferences/ListSetting.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data.preferences;2 package org.openstreetmap.josm.spi.preferences; 3 3 4 4 import java.util.ArrayList; … … 9 9 /** 10 10 * Setting containing a {@link List} of {@link String} values. 11 * @since 975911 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 12 12 */ 13 13 public class ListSetting extends AbstractSetting<List<String>> { -
trunk/src/org/openstreetmap/josm/spi/preferences/MapListSetting.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data.preferences;2 package org.openstreetmap.josm.spi.preferences; 3 3 4 4 import java.util.ArrayList; … … 10 10 /** 11 11 * Setting containing a {@link List} of {@link Map}s of {@link String} values. 12 * @since 975912 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 13 13 */ 14 14 public class MapListSetting extends AbstractSetting<List<Map<String, String>>> { -
trunk/src/org/openstreetmap/josm/spi/preferences/Setting.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm.data.preferences; 3 4 import org.openstreetmap.josm.data.Preferences; 2 package org.openstreetmap.josm.spi.preferences; 5 3 6 4 /** … … 10 8 * 11 9 * @param <T> the data type for the value 12 * @since 975910 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 13 11 */ 14 12 public interface Setting<T> { … … 72 70 * For default preferences. A setting is marked as new, if it has been seen 73 71 * in the current session. 74 * Methods like {@link Preferences#get(java.lang.String, java.lang.String)},72 * Methods like {@link IPreferences#get(java.lang.String, java.lang.String)}, 75 73 * can be called from different parts of the code with the same key. In this case, 76 74 * the supplied default value must match. However, this is only an error if the mismatching -
trunk/src/org/openstreetmap/josm/spi/preferences/SettingVisitor.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data.preferences;2 package org.openstreetmap.josm.spi.preferences; 3 3 4 4 /** 5 5 * Visitor interface for {@link Setting} implementations. 6 * @since 97596 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 7 7 */ 8 8 public interface SettingVisitor { -
trunk/src/org/openstreetmap/josm/spi/preferences/StringSetting.java
r12879 r12881 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data.preferences;2 package org.openstreetmap.josm.spi.preferences; 3 3 4 4 /** 5 5 * Setting containing a {@link String} value. 6 * @since 97596 * @since xxx (moved from package {@code org.openstreetmap.josm.data.preferences}) 7 7 */ 8 8 public class StringSetting extends AbstractSetting<String> {
Note:
See TracChangeset
for help on using the changeset viewer.