Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 12366)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 12367)
@@ -203,5 +203,28 @@
      */
     public enum ColorMode {
-        NONE, VELOCITY, HDOP, DIRECTION, TIME, HEATMAP;
+        /**
+         * No special colors
+         */
+        NONE,
+        /**
+         * Color by velocity
+         */
+        VELOCITY,
+        /**
+         * Color by accuracy
+         */
+        HDOP,
+        /**
+         * Color by traveling direction
+         */
+        DIRECTION,
+        /**
+         * Color by time
+         */
+        TIME,
+        /**
+         * Color using a heatmap instead of normal lines
+         */
+        HEATMAP;
 
         static ColorMode fromIndex(final int index) {
Index: trunk/src/org/openstreetmap/josm/tools/ColorScale.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 12366)
+++ trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 12367)
@@ -24,4 +24,9 @@
     }
 
+    /**
+     * Gets a HSB color range.
+     * @param count The number of colors the scale should have
+     * @return The scale
+     */
     public static ColorScale createHSBScale(int count) {
         ColorScale sc = new ColorScale();
@@ -35,4 +40,9 @@
     }
 
+    /**
+     * Creates a cyclic color scale (red  yellow  green   blue    red)
+     * @param count The number of colors the scale should have
+     * @return The scale
+     */
     public static ColorScale createCyclicScale(int count) {
         ColorScale sc = new ColorScale();
@@ -76,4 +86,9 @@
     }
 
+    /**
+     * Sets the hint on the range this scale is for
+     * @param min The minimum value
+     * @param max The maximum value
+     */
     public void setRange(double min, double max) {
         this.min = min;
@@ -89,4 +104,9 @@
     }
 
+    /**
+     * Gets a color for the given value.
+     * @param value The value
+     * @return The color for this value, this may be a special color if the value is outside the range but never null.
+     */
     public Color getColor(double value) {
         if (value < min) return belowMinColor;
@@ -102,16 +122,34 @@
     }
 
+    /**
+     * Gets a color for the given value.
+     * @param value The value, may be <code>null</code>
+     * @return The color for this value, this may be a special color if the value is outside the range or the value is null but never null.
+     */
     public Color getColor(Number value) {
         return (value == null) ? noDataColor : getColor(value.doubleValue());
     }
 
+    /**
+     * Get the color to use if there is no data
+     * @return The color
+     */
     public Color getNoDataColor() {
         return noDataColor;
     }
 
+    /**
+     * Sets the color to use if there is no data
+     * @param noDataColor The color
+     */
     public void setNoDataColor(Color noDataColor) {
         this.noDataColor = noDataColor;
     }
 
+    /**
+     * Make all colors transparent
+     * @param alpha The alpha value all colors in the range should have, range 0..255
+     * @return This scale, for chaining
+     */
     public ColorScale makeTransparent(int alpha) {
         for (int i = 0; i < colors.length; i++) {
@@ -121,4 +159,9 @@
     }
 
+    /**
+     * Adds a title to this scale
+     * @param title The new title
+     * @return This scale, for chaining
+     */
     public ColorScale addTitle(String title) {
         this.title = title;
@@ -126,4 +169,9 @@
     }
 
+    /**
+     * Sets the interval count for this scale
+     * @param intervalCount The interval count hint
+     * @return This scale, for chaining
+     */
     public ColorScale setIntervalCount(int intervalCount) {
         this.intervalCount = intervalCount;
@@ -131,4 +179,8 @@
     }
 
+    /**
+     * Reverses this scale
+     * @return This scale, for chaining
+     */
     public ColorScale makeReversed() {
         int n = colors.length;
@@ -145,4 +197,13 @@
     }
 
+    /**
+     * Draws a color bar representing this scale on the given graphics
+     * @param g The graphics to draw on
+     * @param x Rect x
+     * @param y Rect y
+     * @param w Rect width
+     * @param h Rect height
+     * @param valueScale The scale factor of the values
+     */
     public void drawColorBar(Graphics2D g, int x, int y, int w, int h, double valueScale) {
         int n = colors.length;
