Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/Visitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/Visitor.java	(revision 5419)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/Visitor.java	(revision 5421)
@@ -8,13 +8,27 @@
 
 /**
- * Implementation of the visitor scheme. Every OsmPrimitive can be visited by
- * several different visitors.
- *
- * @author imi
+ * Implementation of the visitor scheme. Every @{link org.openstreetmap.josm.data.OsmPrimitive}
+ * can be visited by several different visitors.
  */
 public interface Visitor {
+    /**
+     * Visiting call for points.
+     * @param n The node to inspect.
+     */
     void visit(Node n);
+    /**
+     * Visiting call for lines.
+     * @param w The way to inspect.
+     */
     void visit(Way w);
+    /**
+     * Visiting call for relations.
+     * @param e The relation to inspect.
+     */
     void visit(Relation e);
+    /**
+     * Visiting call for changesets.
+     * @param cs The changeset to inspect.
+     */
     void visit(Changeset cs);
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java	(revision 5419)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java	(revision 5421)
@@ -13,28 +13,46 @@
 
     private boolean useRealWidth;
+    /** Preference: should directional arrows be displayed */
     private boolean showDirectionArrow;
+    /** Preference: should arrows for oneways be displayed */
     private boolean showOnewayArrow;
-    private int defaultSegmentWidth;
+    /** Preference: should the segement numbers of ways be displayed */
     private boolean showOrderNumber;
+    /** Preference: should only the last arrow of a way be displayed */
     private boolean showHeadArrowOnly;
     private int showNamesDistance;
     private int useStrokesDistance;
     private int showIconsDistance;
+    /** Preference: size of selected nodes */
     private int selectedNodeSize;
+    /** Preference: size of multiply connected nodes */
     private int connectionNodeSize;
+    /** Preference: size of unselected nodes */
     private int unselectedNodeSize;
+    /** Preference: size of tagged nodes */
     private int taggedNodeSize;
+    /** Preference: should selected nodes be filled */
     private boolean fillSelectedNode;
+    /** Preference: should unselected nodes be filled */
     private boolean fillUnselectedNode;
+    /** Preference: should tagged nodes be filled */
     private boolean fillTaggedNode;
+    /** Preference: should multiply connected nodes be filled */
     private boolean fillConnectionNode;
     private boolean outlineOnly;
+    /** Color Preference for selected objects */
     private Color selectedColor;
     private Color relationSelectedColor;
+    /** Color Preference for hightlighted objects */
     private Color highlightColor;
+    /** Color Preference for inactive objects */
     private Color inactiveColor;
+    /** Color Preference for nodes */
     private Color nodeColor;
+    /** Color Preference for tagged nodes */
     private Color taggedColor;
+    /** Color Preference for multiply connected nodes */
     private Color connectionColor;
+    /** Color Preference for tagged and multiply connected nodes */
     private Color taggedConnectionColor;
 
@@ -48,5 +66,4 @@
         showOnewayArrow = Main.pref.getBoolean("draw.oneway", true);
         useRealWidth = Main.pref.getBoolean("mappaint.useRealWidth", false);
-        defaultSegmentWidth = Main.pref.getInteger("mappaint.segment.default-width", 2);
 
         selectedColor = PaintColors.SELECTED.get();
@@ -100,8 +117,4 @@
     }
 
-    public int getDefaultSegmentWidth() {
-        return defaultSegmentWidth;
-    }
-
     public Color getSelectedColor() {
         return selectedColor;
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java	(revision 5419)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java	(revision 5421)
@@ -24,5 +24,4 @@
     RELATION(marktr("relation"), new Color(0,128,128)), // teal
     UNTAGGED_WAY(marktr("untagged way"), new Color(0,128,0)), // dark green
-    INCOMPLETE_WAY(marktr("incomplete way"), new Color(0,0,96)), // darker blue
     BACKGROUND(marktr("background"), Color.BLACK),
     HIGHLIGHT(marktr("highlight"), SELECTED.get()),
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 5419)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 5421)
@@ -32,49 +32,90 @@
  * A map renderer that paints a simple scheme of every primitive it visits to a
  * previous set graphic environment.
- *
- * @author imi
  */
 public class WireframeMapRenderer extends AbstractMapRenderer implements Visitor {
 
-    /**
-     * Preferences
-     */
+    /** Color Preference for inactive objects */
     protected Color inactiveColor;
+    /** Color Preference for selected objects */
     protected Color selectedColor;
+    /** Color Preference for nodes */
     protected Color nodeColor;
+    /** Color Preference for ways not matching any other group */
     protected Color dfltWayColor;
+    /** Color Preference for relations */
     protected Color relationColor;
+    /** Color Preference for untagged ways */
     protected Color untaggedWayColor;
-    protected Color incompleteColor;
+    /** Color Preference for background */
     protected Color backgroundColor;
+    /** Color Preference for hightlighted objects */
     protected Color highlightColor;
+    /** Color Preference for tagged nodes */
     protected Color taggedColor;
+    /** Color Preference for multiply connected nodes */
     protected Color connectionColor;
+    /** Color Preference for tagged and multiply connected nodes */
     protected Color taggedConnectionColor;
+    /** Preference: should directional arrows be displayed */
     protected boolean showDirectionArrow;
+    /** Preference: should arrows for oneways be displayed */
     protected boolean showOnewayArrow;
+    /** Preference: should only the last arrow of a way be displayed */
     protected boolean showHeadArrowOnly;
+    /** Preference: should the segement numbers of ways be displayed */
     protected boolean showOrderNumber;
+    /** Preference: should selected nodes be filled */
     protected boolean fillSelectedNode;
+    /** Preference: should unselected nodes be filled */
     protected boolean fillUnselectedNode;
+    /** Preference: should tagged nodes be filled */
     protected boolean fillTaggedNode;
+    /** Preference: should multiply connected nodes be filled */
     protected boolean fillConnectionNode;
+    /** Preference: size of selected nodes */
     protected int selectedNodeSize;
+    /** Preference: size of unselected nodes */
     protected int unselectedNodeSize;
+    /** Preference: size of multiply connected nodes */
     protected int connectionNodeSize;
+    /** Preference: size of tagged nodes */
     protected int taggedNodeSize;
-    protected int defaultSegmentWidth;
+    /** Preference: size of virtual nodes (0 displayes display) */
     protected int virtualNodeSize;
+    /** Preference: minimum space (displayed way length) to display virtual nodes */
     protected int virtualNodeSpace;
+    /** Preference: minimum space (displayed way length) to display segment numbers */
     protected int segmentNumberSpace;
 
-    /**
-     * Draw subsequent segments of same color as one Path
-     */
+    /** Color cache to draw subsequent segments of same color as one <code>Path</code>. */
     protected Color currentColor = null;
+    /** Path store to draw subsequent segments of same color as one <code>Path</code>. */
     protected GeneralPath currentPath = new GeneralPath();
-
-    /**
-     * {@inheritDoc}
+    /**
+      * <code>DataSet</code> passed to the @{link render} function to overcome the argument
+      * limitations of @{link Visitor} interface. Only valid until end of rendering call.
+      */
+    private DataSet ds;
+
+    /** Helper variable for {@link #drawSgement} */
+    private static final double PHI = Math.toRadians(20);
+    /** Helper variable for {@link #drawSgement} */
+    private static final double cosPHI = Math.cos(PHI);
+    /** Helper variable for {@link #drawSgement} */
+    private static final double sinPHI = Math.sin(PHI);
+
+    /** Helper variable for {@link #visit(Relation) */
+    private Stroke relatedWayStroke = new BasicStroke(
+            4, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL);
+
+    /**
+     * Creates an wireframe render
+     * 
+     * @param g the graphics context. Must not be null.
+     * @param nc the map viewport. Must not be null.
+     * @param isInactiveMode if true, the paint visitor shall render OSM objects such that they
+     * look inactive. Example: rendering of data in an inactive layer using light gray as color only.
+     * @throws IllegalArgumentException thrown if {@code g} is null
+     * @throws IllegalArgumentException thrown if {@code nc} is null
      */
     public WireframeMapRenderer(Graphics2D g, NavigatableComponent nc, boolean isInactiveMode) {
@@ -82,4 +123,8 @@
     }
 
+    /**
+     * Reads the color definitions from preferences. This function is <code>public</code>, so that
+     * color names in preferences can be displayed even without calling the wireframe display before.
+     */
     public void getColors()
     {
@@ -90,5 +135,4 @@
         relationColor = PaintColors.RELATION.get();
         untaggedWayColor = PaintColors.UNTAGGED_WAY.get();
-        incompleteColor = PaintColors.INCOMPLETE_WAY.get();
         backgroundColor = PaintColors.BACKGROUND.get();
         highlightColor = PaintColors.HIGHLIGHT_WIREFRAME.get();
@@ -103,4 +147,10 @@
     }
 
+    /**
+     * Reads all the settings from preferences. Calls the @{link #getColors}
+     * function.
+     *
+     * @param virtual <code>true</code> if virtual nodes are used
+     */
     protected void getSettings(boolean virtual) {
         MapPaintSettings settings = MapPaintSettings.INSTANCE;
@@ -113,5 +163,4 @@
         connectionNodeSize = settings.getConnectionNodeSize();
         taggedNodeSize = settings.getTaggedNodeSize();
-        defaultSegmentWidth = settings.getDefaultSegmentWidth();
         fillSelectedNode = settings.isFillSelectedNode();
         fillUnselectedNode = settings.isFillUnselectedNode();
@@ -128,5 +177,11 @@
     }
 
-    DataSet ds;
+    /**
+     * Renders the dataset for display.
+     *
+     * @param data <code>DataSet</code> to display
+     * @param virtual <code>true</code> if virtual nodes are used
+     * @param bounds display boundaries
+     */
     public void render(DataSet data, boolean virtual, Bounds bounds) {
         BBox bbox = new BBox(bounds);
@@ -181,4 +236,12 @@
     }
 
+    /**
+     * Helper function to calculate maximum of 4 values.
+     *
+     * @param a First value
+     * @param b Second value
+     * @param c Third value
+     * @param d Fourth value
+     */
     private static final int max(int a, int b, int c, int d) {
         return Math.max(Math.max(a, b), Math.max(c, d));
@@ -191,4 +254,5 @@
      * @param n The node to draw.
      */
+    @Override
     public void visit(Node n) {
         if (n.isIncomplete()) return;
@@ -231,4 +295,12 @@
     }
 
+    /**
+     * Checks if a way segemnt is large enough for additional information display.
+     *
+     * @param p1 First point of the way segment.
+     * @param p2 Second point of the way segment.
+     * @param space The free space to check against.
+     * @return <code>true</code> if segment is larger than required space
+     */
     public static boolean isLargeSegment(Point2D p1, Point2D p2, int space)
     {
@@ -238,4 +310,10 @@
     }
 
+    /**
+     * Draws virtual nodes.
+     *
+     * @param ways The ways to draw nodes for.
+     * @param highlightVirtualNodes Way segements, where nodesshould be highlighted.
+     */
     public void drawVirtualNodes(Collection<Way> ways, Collection<WaySegment> highlightVirtualNodes) {
         if (virtualNodeSize == 0)
@@ -263,4 +341,10 @@
     }
 
+    /**
+     * Creates path for drawing virtual nodes for one way.
+     *
+     * @param path The path to append drawing to.
+     * @param w The ways to draw node for.
+     */
     public void visitVirtual(GeneralPath path, Way w) {
         Iterator<Node> it = w.getNodes().iterator();
@@ -285,7 +369,8 @@
 
     /**
-     * Draw a darkblue line for all segments.
+     * Draw a line for all way segments.
      * @param w The way to draw.
      */
+    @Override
     public void visit(Way w) {
         if (w.isIncomplete() || w.getNodesCount() < 2)
@@ -328,6 +413,9 @@
     }
 
-    private Stroke relatedWayStroke = new BasicStroke(
-            4, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL);
+    /**
+     * Draw objects used in relations.
+     * @param r The relation to draw.
+     */
+    @Override
     public void visit(Relation r) {
         if (r.isIncomplete()) return;
@@ -378,4 +466,8 @@
     }
 
+    /**
+     * Visitor for changesets not used in this class
+     * @param cs The changeset for inspection.
+     */
     @Override
     public void visit(Changeset cs) {/* ignore */}
@@ -384,4 +476,8 @@
      * Draw an number of the order of the two consecutive nodes within the
      * parents way
+     *
+     * @param p1 First point of the way segment.
+     * @param p2 Second point of the way segment.
+     * @param orderNumber The number of the segment in the way.
      */
     protected void drawOrderNumber(Point p1, Point p2, int orderNumber) {
@@ -429,8 +525,12 @@
     }
 
-    private static final double PHI = Math.toRadians(20);
-    private static final double cosPHI = Math.cos(PHI);
-    private static final double sinPHI = Math.sin(PHI);
-
+    /**
+     * Draw a line with the given color.
+     *
+     * @param path The path to append this segment.
+     * @param p1 First point of the way segment.
+     * @param p2 Second point of the way segment.
+     * @param showDirection <code>true</code> if segment direction should be indicated
+     */
     protected void drawSegment(GeneralPath path, Point p1, Point p2, boolean showDirection) {
         Rectangle bounds = g.getClipBounds();
@@ -458,4 +558,9 @@
     /**
      * Draw a line with the given color.
+     *
+     * @param p1 First point of the way segment.
+     * @param p2 Second point of the way segment.
+     * @param col The color to use for drawing line.
+     * @param showDirection <code>true</code> if segment direction should be indicated.
      */
     protected void drawSegment(Point p1, Point p2, Color col, boolean showDirection) {
@@ -466,4 +571,11 @@
     }
 
+    /**
+     * Checks if segment is visible in display.
+     *
+     * @param p1 First point of the way segment.
+     * @param p2 Second point of the way segment.
+     * @return <code>true</code> if segment is visible.
+     */
     protected boolean isSegmentVisible(Point p1, Point p2) {
         if ((p1.x < 0) && (p2.x < 0)) return false;
@@ -474,4 +586,10 @@
     }
 
+    /**
+     * Checks if a polygon is visible in display.
+     *
+     * @param polygon The polygon to check.
+     * @return <code>true</code> if polygon is visible.
+     */
     protected boolean isPolygonVisible(Polygon polygon) {
         Rectangle bounds = polygon.getBounds();
@@ -484,7 +602,16 @@
     }
 
+    /**
+     * Finally display all segments in currect path.
+     */
     protected void displaySegments() {
         displaySegments(null);
     }
+
+    /**
+     * Finally display all segments in currect path.
+     *
+     * @param newColor This color is set after the path is drawn.
+     */
     protected void displaySegments(Color newColor) {
         if (currentPath != null) {
