Index: /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java
===================================================================
--- /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java	(revision 35015)
+++ /applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/FeatureAdapter.java	(revision 35016)
@@ -9,9 +9,14 @@
 import java.net.URL;
 import java.text.MessageFormat;
+import java.util.Map;
 import java.util.Objects;
+import java.util.TreeMap;
 import java.util.logging.Logger;
 
 import javax.imageio.ImageIO;
 
+/**
+ * Feature adapter allows to override JMapViewer behaviours from a client application such as JOSM.
+ */
 public final class FeatureAdapter {
 
@@ -20,4 +25,5 @@
     private static TranslationAdapter translationAdapter = new DefaultTranslationAdapter();
     private static LoggingAdapter loggingAdapter = new DefaultLoggingAdapter();
+    private static SettingsAdapter settingsAdapter = new DefaultSettingsAdapter();
 
     private FeatureAdapter() {
@@ -42,4 +48,26 @@
     }
 
+    /**
+     * Basic settings system allowing to store/retrieve String key/value pairs.
+     */
+    public interface SettingsAdapter {
+        /**
+         * Get settings value for a certain key and provide a default value.
+         * @param key the identifier for the setting
+         * @param def the default value. For each call of get() with a given key, the
+         * default value must be the same. {@code def} may be null.
+         * @return the corresponding value if the property has been set before, {@code def} otherwise
+         */
+        String get(String key, String def);
+
+        /**
+         * Set a value for a certain setting.
+         * @param key the unique identifier for the setting
+         * @param value the value of the setting. Can be null or "" which both removes the key-value entry.
+         * @return {@code true}, if something has changed (i.e. value is different than before)
+         */
+        boolean put(String key, String value);
+    }
+
     public static void registerBrowserAdapter(BrowserAdapter browserAdapter) {
         FeatureAdapter.browserAdapter = Objects.requireNonNull(browserAdapter);
@@ -58,4 +86,13 @@
     }
 
+    /**
+     * Registers settings adapter.
+     * @param settingsAdapter settings adapter, must not be null
+     * @throws NullPointerException if settingsAdapter is null
+     */
+    public static void registerSettingsAdapter(SettingsAdapter settingsAdapter) {
+        FeatureAdapter.settingsAdapter = Objects.requireNonNull(settingsAdapter);
+    }
+
     public static void openLink(String url) {
         browserAdapter.openLink(url);
@@ -72,4 +109,36 @@
     public static Logger getLogger(String name) {
         return loggingAdapter.getLogger(name);
+    }
+
+    /**
+     * Get settings value for a certain key and provide a default value.
+     * @param key the identifier for the setting
+     * @param def the default value. For each call of get() with a given key, the
+     * default value must be the same. {@code def} may be null.
+     * @return the corresponding value if the property has been set before, {@code def} otherwise
+     */
+    public static String getSetting(String key, String def) {
+        return settingsAdapter.get(key, def);
+    }
+
+    /**
+     * Get settings value for a certain key and provide a default value.
+     * @param key the identifier for the setting
+     * @param def the default value. For each call of get() with a given key, the
+     * default value must be the same. {@code def} may be null.
+     * @return the corresponding value if the property has been set before, {@code def} otherwise
+     */
+    public static int getIntSetting(String key, int def) {
+        return Integer.parseInt(settingsAdapter.get(key, Integer.toString(def)));
+    }
+
+    /**
+     * Set a value for a certain setting.
+     * @param key the unique identifier for the setting
+     * @param value the value of the setting. Can be null or "" which both removes the key-value entry.
+     * @return {@code true}, if something has changed (i.e. value is different than before)
+     */
+    public static boolean putSetting(String key, String value) {
+        return settingsAdapter.put(key, value);
     }
 
@@ -111,3 +180,20 @@
         }
     }
+
+    /**
+     * Default settings adapter keeping settings in memory only.
+     */
+    public static class DefaultSettingsAdapter implements SettingsAdapter {
+        private final Map<String, String> settings = new TreeMap<>();
+
+        @Override
+        public String get(String key, String def) {
+            return settings.getOrDefault(key, def);
+        }
+
+        @Override
+        public boolean put(String key, String value) {
+            return !Objects.equals(value == null || value.isEmpty() ? settings.remove(key) : settings.put(key, value), value);
+        }
+    }
 }
