Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 12378)
@@ -42,4 +42,13 @@
     }
 
+    /**
+     * Gets the value for a given key with the given type
+     * @param <T> the expected type
+     * @param key the key
+     * @param def default value, can be null
+     * @param klass the same as T
+     * @return if a value that can be converted to class klass has been mapped to key, returns this
+     *      value, def otherwise
+     */
     public <T> T get(String key, T def, Class<T> klass) {
         return get(key, def, klass, false);
@@ -54,5 +63,5 @@
      * @param suppressWarnings show or don't show a warning when some value is
      *      found, but cannot be converted to the requested type
-     * @return if a value with class klass has been mapped to key, returns this
+     * @return if a value that can be converted to class klass has been mapped to key, returns this
      *      value, def otherwise
      */
@@ -73,12 +82,27 @@
     }
 
+    /**
+     * Gets a property for the given key (like stroke, ...)
+     * @param key The key of the property
+     * @return The value or <code>null</code> if it is not set. May be of any type
+     */
     public Object get(String key) {
         return prop.get(key);
     }
 
+    /**
+     * Sets the property for the given key
+     * @param key The key
+     * @param val The value
+     */
     public void put(String key, Object val) {
         prop.put(key, val);
     }
 
+    /**
+     * Sets the property for the given key, removes it if the value is <code>null</code>
+     * @param key The key
+     * @param val The value, may be <code>null</code>
+     */
     public void putOrClear(String key, Object val) {
         if (val != null) {
@@ -89,8 +113,21 @@
     }
 
+    /**
+     * Removes the property with the given key
+     * @param key The key
+     */
     public void remove(String key) {
         prop.remove(key);
     }
 
+    /**
+     * Converts an object to a given other class.
+     *
+     * Only conversions that are useful for MapCSS are supported
+     * @param <T> The class type
+     * @param o The object to convert
+     * @param klass The class
+     * @return The converted object or <code>null</code> if the conversion failed
+     */
     @SuppressWarnings("unchecked")
     public static <T> T convertTo(Object o, Class<T> klass) {
@@ -235,12 +272,25 @@
     }
 
+    /**
+     * Checks if this cascade has a value for given key
+     * @param key The key to check
+     * @return <code>true</code> if there is a value
+     */
     public boolean containsKey(String key) {
         return prop.containsKey(key);
     }
 
+    /**
+     * Get if the default selection drawing should be used for the object this cascade applies to
+     * @return <code>true</code> to use the default selection drawing
+     */
     public boolean isDefaultSelectedHandling() {
         return defaultSelectedHandling;
     }
 
+    /**
+     * Set that the default selection drawing should be used for the object this cascade applies to
+     * @param defaultSelectedHandling <code>true</code> to use the default selection drawing
+     */
     public void setDefaultSelectedHandling(boolean defaultSelectedHandling) {
         this.defaultSelectedHandling = defaultSelectedHandling;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java	(revision 12378)
@@ -15,10 +15,26 @@
 public class Environment {
 
+    /**
+     * The primitive that is currently evaluated
+     */
     public OsmPrimitive osm;
 
+    /**
+     * The cascades that are currently evaluated
+     */
     public MultiCascade mc;
+    /**
+     * The current MapCSS layer
+     */
     public String layer;
+    /**
+     * The style source that is evaluated
+     */
     public StyleSource source;
     private Context context = Context.PRIMITIVE;
+
+    /**
+     * The name of the default layer. It is used if no layer is specified in the MapCSS rule
+     */
     public static final String DEFAULT_LAYER = "default";
 
@@ -228,4 +244,8 @@
     }
 
+    /**
+     * Gets the role of the matching primitive in the relation
+     * @return The role
+     */
     public String getRole() {
         if (getContext().equals(Context.PRIMITIVE))
@@ -239,4 +259,7 @@
     }
 
+    /**
+     * Clears all matching context information
+     */
     public void clearSelectorMatchingInformation() {
         parent = null;
@@ -246,4 +269,9 @@
     }
 
+    /**
+     * Gets the current cascade for a given layer
+     * @param layer The layer to use, <code>null</code> to use the layer of the {@link Environment}
+     * @return The cascade
+     */
     public Cascade getCascade(String layer) {
         return mc == null ? null : mc.getCascade(layer == null ? this.layer : layer);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Keyword.java	(revision 12378)
@@ -14,6 +14,13 @@
  */
 public class Keyword {
+    /**
+     * The string value for this keyword
+     */
     public final String val;
 
+    /**
+     * Create a new Keyword
+     * @param val The string value that is written in the MapCSS file
+     */
     public Keyword(String val) {
         this.val = val.toLowerCase(Locale.ENGLISH);
@@ -38,9 +45,27 @@
     }
 
+    /**
+     * Automated text positioning
+     */
     public static final Keyword AUTO = new Keyword("auto");
+    /**
+     * Align text at the bottom
+     */
     public static final Keyword BOTTOM = new Keyword("bottom");
+    /**
+     * Align text at the center
+     */
     public static final Keyword CENTER = new Keyword("center");
+    /**
+     * Use default line width
+     */
     public static final Keyword DEFAULT = new Keyword("default");
+    /**
+     * Align to the right
+     */
     public static final Keyword RIGHT = new Keyword("right");
+    /**
+     * Thinnest line width
+     */
     public static final Keyword THINNEST = new Keyword("thinnest");
 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 12378)
@@ -77,6 +77,13 @@
      */
     public static class TagKeyReference {
+        /**
+         * The tag name
+         */
         public final String key;
 
+        /**
+         * Create a new {@link TagKeyReference}
+         * @param key The tag name
+         */
         public TagKeyReference(String key) {
             this.key = key;
@@ -96,7 +103,18 @@
     public static class IconReference {
 
+        /**
+         * The name of the icon
+         */
         public final String iconName;
+        /**
+         * The style source this reference occurred in
+         */
         public final StyleSource source;
 
+        /**
+         * Create a new {@link IconReference}
+         * @param iconName The icon name
+         * @param source The current style source
+         */
         public IconReference(String iconName, StyleSource source) {
             this.iconName = iconName;
@@ -182,4 +200,9 @@
     }
 
+    /**
+     * Returns the node icon that would be displayed for the given tag.
+     * @param tag The tag to look an icon for
+     * @return {@code null} if no icon found
+     */
     public static ImageIcon getNodeIcon(Tag tag) {
         return getNodeIcon(tag, true);
@@ -225,4 +248,9 @@
     }
 
+    /**
+     * Gets the directories that should be searched for icons
+     * @param source The style source the icon is from
+     * @return A list of directory names
+     */
     public static List<String> getIconSourceDirs(StyleSource source) {
         List<String> dirs = new LinkedList<>();
@@ -323,8 +351,15 @@
     }
 
+    /**
+     * This class loads the map paint styles
+     */
     public static class MapPaintStyleLoader extends PleaseWaitRunnable {
         private boolean canceled;
         private final Collection<StyleSource> sources;
 
+        /**
+         * Create a new {@link MapPaintStyleLoader}
+         * @param sources The styles to load
+         */
         public MapPaintStyleLoader(Collection<StyleSource> sources) {
             super(tr("Reloading style sources"));
@@ -396,4 +431,10 @@
     }
 
+    /**
+     * Check if the styles can be moved
+     * @param sel The indexes of the selected styles
+     * @param i The number of places to move the styles
+     * @return <code>true</code> if that movement is possible
+     */
     public static boolean canMoveStyles(int[] sel, int i) {
         if (sel.length == 0)
@@ -410,4 +451,8 @@
     }
 
+    /**
+     * Toggles the active state of several styles
+     * @param sel The style indexes
+     */
     public static void toggleStyleActive(int... sel) {
         List<StyleSource> data = styles.getStyleSources();
@@ -491,8 +536,15 @@
     }
 
+    /**
+     * Notifies all listeners that there was any update to the map paint styles
+     */
     public static void fireMapPaintSylesUpdated() {
         listeners.fireEvent(MapPaintSylesUpdateListener::mapPaintStylesUpdated);
     }
 
+    /**
+     * Notifies all listeners that there was an update to a specific map paint style
+     * @param index The style index
+     */
     public static void fireMapPaintStyleEntryUpdated(int index) {
         listeners.fireEvent(l -> l.mapPaintStyleEntryUpdated(index));
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MultiCascade.java	(revision 12378)
@@ -17,4 +17,7 @@
 
     private final Map<String, Cascade> layers;
+    /**
+     * The scale range this cascade is valid for
+     */
     public Range range;
 
@@ -74,8 +77,17 @@
     }
 
+    /**
+     * Gets all cascades for the known layers
+     * @return The cascades for the layers
+     */
     public Collection<Entry<String, Cascade>> getLayers() {
         return layers.entrySet();
     }
 
+    /**
+     * Check whether this cascade has a given layer
+     * @param layer The layer to check for
+     * @return <code>true</code> if it has that layer
+     */
     public boolean hasLayer(String layer) {
         return layers.containsKey(layer);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Range.java	(revision 12378)
@@ -13,4 +13,7 @@
     private final double upper;
 
+    /**
+     * The full scale range from zero to infinity
+     */
     public static final Range ZERO_TO_INFINITY = new Range(0.0, Double.POSITIVE_INFINITY);
 
@@ -28,4 +31,9 @@
     }
 
+    /**
+     * Check if a number is contained in this range
+     * @param x The number to test
+     * @return <code>true</code> if it is in this range
+     */
     public boolean contains(double x) {
         return lower < x && x <= upper;
@@ -76,8 +84,16 @@
     }
 
+    /**
+     * Gets the lower bound
+     * @return The lower, exclusive, bound
+     */
     public double getLower() {
         return lower;
     }
 
+    /**
+     * Gets the upper bound
+     * @return The upper, inclusive, bound
+     */
     public double getUpper() {
         return upper;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 12378)
@@ -18,4 +18,7 @@
     private static final Storage<StyleCache> internPool = new Storage<>();
 
+    /**
+     * An empty style cache entry
+     */
     public static final StyleCache EMPTY_STYLECACHE = (new StyleCache()).intern();
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleElementList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleElementList.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleElementList.java	(revision 12378)
@@ -24,12 +24,25 @@
     }
 
+    /**
+     * Create a new List of style elements
+     * @param init The list
+     */
     public StyleElementList(StyleElement... init) {
         lst = new ArrayList<>(Arrays.asList(init));
     }
 
+    /**
+     * Create a new List of style elements
+     * @param sl The list
+     */
     public StyleElementList(Collection<StyleElement> sl) {
         lst = new ArrayList<>(sl);
     }
 
+    /**
+     * Create a new List of style elements
+     * @param sl The list
+     * @param s An item to merge to the list
+     */
     public StyleElementList(StyleElementList sl, StyleElement s) {
         lst = new ArrayList<>(sl.lst);
@@ -42,8 +55,16 @@
     }
 
+    /**
+     * Check if the list is empty
+     * @return <code>true</code> if it is empty
+     */
     public boolean isEmpty() {
         return lst.isEmpty();
     }
 
+    /**
+     * Get the list size
+     * @return The list size
+     */
     public int size() {
         return lst.size();
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSetting.java	(revision 12378)
@@ -34,6 +34,14 @@
 public interface StyleSetting {
 
+    /**
+     * 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
+     */
     Object getValue();
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java	(revision 12377)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java	(revision 12378)
@@ -38,4 +38,7 @@
     private final List<Throwable> errors = new CopyOnWriteArrayList<>();
     private final Set<String> warnings = new CopyOnWriteArraySet<>();
+    /**
+     * The zip file containing the icons for this style
+     */
     public File zipIcons;
 
@@ -245,4 +248,8 @@
     }
 
+    /**
+     * Gets the background color that was set in this style
+     * @return The color or <code>null</code> if it was not set
+     */
     public Color getBackgroundColorOverride() {
         return null;
