Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 12830)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 12831)
@@ -68,4 +68,5 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
 import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference;
+import org.openstreetmap.josm.gui.mappaint.StyleSettingGuiFactory;
 import org.openstreetmap.josm.gui.util.FileFilterAllFiles;
 import org.openstreetmap.josm.gui.util.GuiHelper;
@@ -700,5 +701,5 @@
             } else {
                 for (StyleSetting s : style.settings) {
-                    s.addMenuEntry(setMenu);
+                    StyleSettingGuiFactory.getStyleSettingGui(s).addMenuEntry(setMenu);
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/BooleanStyleSettingGui.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/BooleanStyleSettingGui.java	(revision 12831)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/BooleanStyleSettingGui.java	(revision 12831)
@@ -0,0 +1,41 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.mappaint;
+
+import java.awt.event.ActionEvent;
+import java.util.Arrays;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JMenu;
+
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.mappaint.loader.MapPaintStyleLoader;
+
+/**
+ * GUI elements for a {@link StyleSetting.BooleanStyleSetting} class.
+ * @since 12831
+ */
+public class BooleanStyleSettingGui implements StyleSettingGui {
+
+    final StyleSetting.BooleanStyleSetting setting;
+
+    public BooleanStyleSettingGui(StyleSetting.BooleanStyleSetting setting) {
+        this.setting = setting;
+    }
+
+    @Override
+    public void addMenuEntry(JMenu menu) {
+        final JCheckBoxMenuItem item = new JCheckBoxMenuItem();
+        Action a = new AbstractAction(setting.label) {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                setting.setValue(item.isSelected());
+                MainApplication.worker.submit(new MapPaintStyleLoader(Arrays.asList(setting.parentStyle)));
+            }
+        };
+        item.setAction(a);
+        item.setSelected((boolean) setting.getValue());
+        menu.add(item);
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java	(revision 12830)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java	(revision 12831)
@@ -2,15 +2,5 @@
 package org.openstreetmap.josm.gui.mappaint;
 
-import java.awt.event.ActionEvent;
-import java.util.Arrays;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JCheckBoxMenuItem;
-import javax.swing.JMenu;
-
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.gui.mappaint.loader.MapPaintStyleLoader;
 import org.openstreetmap.josm.tools.Logging;
 
@@ -38,10 +28,4 @@
 
     /**
-     * Adds the menu entry for this style setting to the menu
-     * @param menu The menu to add the setting to
-     */
-    void addMenuEntry(JMenu menu);
-
-    /**
      * gets the value for this setting
      * @return The value the user selected
@@ -63,19 +47,4 @@
             this.label = label;
             this.def = def;
-        }
-
-        @Override
-        public void addMenuEntry(JMenu menu) {
-            final JCheckBoxMenuItem item = new JCheckBoxMenuItem();
-            Action a = new AbstractAction(label) {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    setValue(item.isSelected());
-                    MainApplication.worker.submit(new MapPaintStyleLoader(Arrays.asList(parentStyle)));
-                }
-            };
-            item.setAction(a);
-            item.setSelected((boolean) getValue());
-            menu.add(item);
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSettingGui.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSettingGui.java	(revision 12831)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSettingGui.java	(revision 12831)
@@ -0,0 +1,18 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.mappaint;
+
+import javax.swing.JMenu;
+
+/**
+ * GUI elements for a {@link StyleSetting} class.
+ * @since 12831
+ */
+public interface StyleSettingGui {
+
+    /**
+     * Adds the menu entry for the corresponding style setting to the menu
+     * @param menu The menu to add the setting to
+     */
+    void addMenuEntry(JMenu menu);
+
+}
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSettingGuiFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSettingGuiFactory.java	(revision 12831)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSettingGuiFactory.java	(revision 12831)
@@ -0,0 +1,28 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.mappaint;
+
+import org.openstreetmap.josm.gui.mappaint.StyleSetting.BooleanStyleSetting;
+
+/**
+ * Factory to create matching {@link StyleSettingGui} instances for given
+ * {@link StyleSetting} objects.
+ * @since 12831
+ */
+public class StyleSettingGuiFactory {
+
+    /**
+     * Create a matching {@link StyleSettingGui} instances for a given
+     * {@link StyleSetting} object.
+     * @param setting the {@code StyleSetting} object
+     * @return matching {@code StyleSettingGui}
+     * @throws UnsupportedOperationException when class of {@link StyleSetting}
+     * is not supported
+     */
+    public static StyleSettingGui getStyleSettingGui(StyleSetting setting) {
+        if (setting instanceof BooleanStyleSetting) {
+            return new BooleanStyleSettingGui((BooleanStyleSetting) setting);
+        }
+        throw new UnsupportedOperationException("class " + setting.getClass() + " not supported");
+    }
+
+}
