Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 6763)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 6764)
@@ -49,4 +49,7 @@
 import org.openstreetmap.josm.tools.GBC;
 
+/**
+ * Color preferences.
+ */
 public class ColorPreference implements SubPreferenceSetting {
 
@@ -65,7 +68,7 @@
     private List<String> del = new ArrayList<String>();
 
-    JButton colorEdit;
-    JButton defaultSet;
-    JButton remove;
+    private JButton colorEdit;
+    private JButton defaultSet;
+    private JButton remove;
 
     /**
@@ -108,5 +111,5 @@
         }
     }
-    
+
     private void addColorRows(Map<String, String> colorMap, Map<String, String> keyMap) {
         for (String value : keyMap.values()) {
@@ -139,6 +142,5 @@
     }
 
-    private String getName(String o)
-    {
+    private String getName(String o) {
         return Main.pref.getColorName(o);
     }
@@ -251,6 +253,5 @@
     }
 
-    Boolean isRemoveColor(int row)
-    {
+    Boolean isRemoveColor(int row) {
         return ((String)colors.getValueAt(row, 0)).startsWith("layer ");
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java	(revision 6763)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java	(revision 6764)
@@ -12,4 +12,8 @@
 import org.openstreetmap.josm.tools.GBC;
 
+/**
+ * Display preferences (various settings that influence the visual representation of the whole program).
+ * @since 4969
+ */
 public final class DisplayPreference extends DefaultTabPreferenceSetting {
 
@@ -23,9 +27,9 @@
         }
     }
-    
+
     private DisplayPreference() {
         super("display", tr("Display Settings"), tr("Various settings that influence the visual representation of the whole program."), false, new JTabbedPane());
     }
-    
+
     @Override
     public boolean ok() {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java	(revision 6763)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java	(revision 6764)
@@ -24,4 +24,7 @@
 import org.openstreetmap.josm.tools.GBC;
 
+/**
+ * Map drawing preferences.
+ */
 public class DrawingPreference implements SubPreferenceSetting {
 
@@ -127,5 +130,5 @@
         discardableKeys.setToolTipText(tr("Display keys which have been deemed uninteresting to the point that they can be silently removed."));
         discardableKeys.setSelected(Main.pref.getBoolean("display.discardable-keys", false));
-        
+
         JLabel performanceLabel = new JLabel(tr("Options that affect drawing performance"));
 
@@ -169,5 +172,5 @@
     @Override
     public boolean ok() {
-        gpxPanel.savePreferences();
+        boolean restart = gpxPanel.savePreferences();
         Main.pref.put("draw.data.area_outline_only", outlineOnly.isSelected());
         Main.pref.put("draw.segment.direction", directionHint.isSelected());
@@ -192,5 +195,5 @@
         }
         Main.pref.putInteger("mappaint.node.virtual-size", vn);
-        return false;
+        return restart;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 6763)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 6764)
@@ -27,9 +27,12 @@
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane.ValidationListener;
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
+import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.template_engine.ParseError;
 import org.openstreetmap.josm.tools.template_engine.TemplateParser;
-import org.openstreetmap.josm.gui.widgets.JosmTextField;
-
+
+/**
+ * Panel for GPX settings.
+ */
 public class GPXSettingsPanel extends JPanel implements ValidationListener {
 
@@ -71,10 +74,17 @@
 
     private String layerName;
-    private boolean local; // flag to display LocalOnly checkbox
-    private boolean nonlocal; // flag to display AllLines checkbox
-
+    private final boolean local; // flag to display LocalOnly checkbox
+    private final boolean nonlocal; // flag to display AllLines checkbox
+
+    /**
+     * Constructs a new {@code GPXSettingsPanel} for a given layer name.
+     * @param layerName The GPX layer name
+     * @param local flag to display LocalOnly checkbox
+     * @param nonlocal flag to display AllLines checkbox
+     */
     public GPXSettingsPanel(String layerName, boolean local, boolean nonlocal) {
         super(new GridBagLayout());
-        this.local=local; this.nonlocal=nonlocal;
+        this.local=local;
+        this.nonlocal=nonlocal;
         this.layerName = "layer "+layerName;
         initComponents();
@@ -82,8 +92,12 @@
     }
 
+    /**
+     * Constructs a new {@code GPXSettingsPanel}.
+     */
     public GPXSettingsPanel() {
         super(new GridBagLayout());
         initComponents();
-        local=false; nonlocal=false;
+        local=false;
+        nonlocal=false;
         loadPreferences(); // preferences -> controls
     }
@@ -356,8 +370,10 @@
 
     /**
-     * Save preferences from UI controls for specified layer
-     * if layerName==null, global preferences are written
+     * Save preferences from UI controls, globally or for a specified layer.
+     * @param layerName The GPX layer name. Can be {@code null}, in that case, global preferences are written
+     * @param locLayer {@code true} if the GPX layer is a local one. Ignored if {@code layerName} is null
+     * @return {@code true} when restart is required, {@code false} otherwise
      */
-    public boolean savePreferences (String layerName, boolean locLayer) {
+    public boolean savePreferences(String layerName, boolean locLayer) {
         String layerNameDot = ".layer "+layerName;
         if (layerName==null) {
@@ -421,7 +437,8 @@
     /**
      * Save preferences from UI controls for initial layer or globally
+     * @return {@code true} when restart is required, {@code false} otherwise
      */
-    public void savePreferences() {
-        savePreferences(null, false);
+    public boolean savePreferences() {
+        return savePreferences(null, false);
     }
 
@@ -472,4 +489,3 @@
         return true;
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 6763)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 6764)
@@ -30,4 +30,7 @@
 import org.openstreetmap.josm.tools.GBC;
 
+/**
+ * Look-and-feel preferences.
+ */
 public class LafPreference implements SubPreferenceSetting {
 
@@ -46,5 +49,5 @@
      */
     private JosmComboBox lafCombo;
-    public JPanel panel;
+    JPanel panel;
     private JCheckBox showSplashScreen = new JCheckBox(tr("Show splash screen at startup"));
     private JCheckBox showID = new JCheckBox(tr("Show object ID in selection lists"));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 6763)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 6764)
@@ -28,4 +28,7 @@
 import org.openstreetmap.josm.tools.I18n;
 
+/**
+ * Language preferences.
+ */
 public class LanguagePreference implements SubPreferenceSetting {
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/package-info.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/package-info.java	(revision 6764)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/package-info.java	(revision 6764)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+
+/**
+ * Provides classes for handling display preferences.
+ */
+package org.openstreetmap.josm.gui.preferences.display;
