Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 486)
@@ -53,4 +53,5 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer.CommandQueueListener;
+import org.openstreetmap.josm.gui.preferences.MapPaintPreference;
 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;
 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences;
@@ -120,6 +121,4 @@
 	 */
 	public final MainMenu menu;
-
-
 
 
@@ -186,4 +185,5 @@
 
 		TaggingPresetPreference.initialize();
+		MapPaintPreference.initialize();
 
 		toolbar.refreshToolbarControl();
@@ -203,4 +203,12 @@
 		if (System.getProperty("josm.plugins") != null)
 			plugins.addAll(Arrays.asList(System.getProperty("josm.plugins").split(",")));
+		
+		// we remove mappaint from the preferences on startup but this is just
+		// in case it crept in through the properties:
+		if (plugins.contains("mappaint")) {
+			plugins.remove("mappaint");
+			System.out.println("Warning - loading of mappaint plugin was requested. This JOSM version has built-in mappaint support. The plugin is not required.");
+		}
+		
 		if (plugins.isEmpty())
 			return;
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 486)
@@ -136,4 +136,5 @@
 		return all;
 	}
+	
 	synchronized public boolean getBoolean(final String key) {
 		return getBoolean(key, false);
@@ -144,5 +145,4 @@
 		return properties.containsKey(key) ? Boolean.parseBoolean(properties.get(key)) : def;
 	}
-
 
 	synchronized public void put(final String key, final String value) {
@@ -159,5 +159,4 @@
 		firePreferenceChanged(key, Boolean.toString(value));
 	}
-
 
 	private final void firePreferenceChanged(final String key, final String value) {
@@ -207,4 +206,5 @@
 		properties.put("projection", "org.openstreetmap.josm.data.projection.Epsg4326");
 		properties.put("draw.segment.direction", "true");
+		properties.put("draw.wireframe", "false");
 		properties.put("layerlist.visible", "true");
 		properties.put("propertiesdialog.visible", "true");
Index: trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/data/coor/Coordinate.java	(revision 486)
@@ -3,7 +3,4 @@
 
 import java.io.Serializable;
-
-
-
 
 /**
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java	(revision 486)
@@ -0,0 +1,423 @@
+// License: GPL. Copyright 2007 by Immanuel Scholz and others
+package org.openstreetmap.josm.data.osm.visitor;
+
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.Polygon;
+import java.awt.Rectangle;
+import java.awt.Stroke;
+import java.awt.geom.GeneralPath;
+import java.util.Collection;
+import java.util.LinkedList;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.NavigatableComponent;
+import org.openstreetmap.josm.gui.mappaint.AreaElemStyle;
+import org.openstreetmap.josm.gui.mappaint.ElemStyle;
+import org.openstreetmap.josm.gui.mappaint.IconElemStyle;
+import org.openstreetmap.josm.gui.mappaint.LineElemStyle;
+import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+import org.openstreetmap.josm.tools.ColorHelper;
+
+public class MapPaintVisitor implements Visitor {
+	
+	protected boolean useRealWidth;
+	protected boolean zoomLevelDisplay;
+	protected boolean fillAreas;
+	protected int fillAlpha;
+	protected Color untaggedColor;
+	protected Color textColor;
+	protected boolean currentDashed = false;
+	protected int currentWidth = 0;
+	protected Stroke currentStroke = null;    
+	protected static final Font orderFont = new Font("Helvetica", Font.PLAIN, 8);
+	
+	public boolean inactive;
+	
+	/**
+	 * The environment to paint to.
+	 */
+	protected Graphics g;
+	
+	/**
+	 * MapView to get screen coordinates.
+	 */
+	protected NavigatableComponent nc;
+	
+	/**
+	 * Draw subsequent segments of same color as one Path
+	 */
+	protected Color currentColor = null;
+	protected GeneralPath currentPath = new GeneralPath();
+	
+	protected static final double PHI = Math.toRadians(20);
+	
+	/**
+	 * Preferences
+	*/
+	protected Color inactiveColor;
+	protected Color selectedColor;
+	protected Color nodeColor;
+	protected Color dfltWayColor;
+	protected Color untaggedWayColor;
+	protected Color incompleteColor;
+	protected Color backgroundColor;
+	protected boolean showDirectionArrow;
+	protected boolean showOrderNumber;
+	
+	public final static Color darkerblue = new Color(0,0,96);
+	public final static Color darkblue = new Color(0,0,128);
+	
+	protected boolean isZoomOk(ElemStyle e) {
+		double circum = Main.map.mapView.getScale()*100*Main.proj.scaleFactor()*40041455; // circumference of the earth in meter
+
+		/* show everything if the user wishes so */
+		if (!zoomLevelDisplay) {
+			return true;
+		}
+
+		if (e == null) {
+			/* the default for things that don't have a rule (show, if scale is smaller than 1500m) */
+			if (circum < 1500)
+				return true;
+			return false;
+		}
+
+		// formula to calculate a map scale: natural size / map size = scale
+		// example: 876000mm (876m as displayed) / 22mm (roughly estimated screen size of legend bar) = 39818
+		//
+		// so the exact "correcting value" below depends only on the screen size and resolution
+		// XXX - do we need a Preference setting for this (if things vary widely)?
+		/*System.out.println(
+   "Circum: " + circum + 
+   " max: " + e.getMaxScale() + "(" + e.getMaxScale()/22 + ")" +
+   " min:" + e.getMinScale() + "(" + e.getMinScale()/22 + ")");*/
+		if(circum>=e.getMaxScale() / 22 || circum<e.getMinScale() / 22)
+			return false;
+		return true;
+	}
+
+	/**
+	 * Draw a small rectangle.
+	 * White if selected (as always) or red otherwise.
+	 *
+	 * @param n The node to draw.
+	 */
+	public void visit(Node n) {
+		ElemStyle nodeStyle = MapPaintStyles.getStyle(n);
+		if (nodeStyle!=null) {
+			if (nodeStyle instanceof IconElemStyle) {
+				if (isZoomOk(nodeStyle)) {
+					drawNode(n, ((IconElemStyle)nodeStyle).getIcon(), ((IconElemStyle)nodeStyle).doAnnotate());
+				}
+			} else {
+				// throw some sort of exception
+			}
+		} else {
+			drawNode(n, n.selected ? selectedColor : nodeColor);
+		}
+	}
+
+	/**
+	 * Draw a line for all segments, according to tags.
+	 * @param w The way to draw.
+	 */
+	public void visit(Way w) {
+		double circum = Main.map.mapView.getScale()*100*Main.proj.scaleFactor()*40041455; // circumference of the earth in meter
+		boolean showDirection = showDirectionArrow;
+		if (useRealWidth && showDirection && !w.selected) showDirection = false;
+		Color colour = untaggedColor;
+		int width = 2;
+		int realWidth = 0; //the real width of the element in meters 
+		boolean dashed = false;
+		boolean area=false;
+		ElemStyle wayStyle = MapPaintStyles.getStyle(w);
+
+		if(!isZoomOk(wayStyle)) {
+			return;
+		}
+
+		if(wayStyle!=null)
+		{
+			if(wayStyle instanceof LineElemStyle)
+			{
+				colour = ((LineElemStyle)wayStyle).colour;
+				width = ((LineElemStyle)wayStyle).width;
+				realWidth = ((LineElemStyle)wayStyle).realWidth; 
+				dashed = ((LineElemStyle)wayStyle).dashed;
+			}
+			else if (wayStyle instanceof AreaElemStyle)
+			{
+				colour = ((AreaElemStyle)wayStyle).getColour();
+				area = true;
+			}
+		}
+
+		if (area && fillAreas)
+			drawWayAsArea(w, colour);
+		int orderNumber = 0;
+
+		Node lastN = null;
+		for (Node n : w.nodes) {
+			if (lastN == null) {
+				lastN = n;
+				continue;
+			}
+			orderNumber++;
+			//  drawSegment(lastN, n, w.selected && !inactive ? selectedColor : wayColor, showDirectionArrow);
+
+			if (area && fillAreas)
+				//Draw segments in a different colour so direction arrows show against the fill
+				drawSeg(lastN, n, w.selected ? selectedColor : untaggedColor, showDirection, width, true);
+			else
+				if (area)
+					drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, true);
+				else
+					if (realWidth > 0 && useRealWidth && !showDirection){
+						int tmpWidth = (int) (100 /  (float) (circum / realWidth));
+						if (tmpWidth > width) width = tmpWidth;
+					}
+
+			drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, dashed);
+
+			if (showOrderNumber)
+				drawOrderNumber(lastN, n, orderNumber);
+
+			lastN = n;
+		}
+	}
+
+	public void visit(Relation e) {
+		// relations are not (yet?) drawn.
+	}
+	
+	// This assumes that all segments are aligned in the same direction!
+	protected void drawWayAsArea(Way w, Color colour)
+	{
+		Polygon polygon = new Polygon();
+		Point p;
+		// set the opacity (alpha) level of the filled polygon
+		Color coloura = new Color( colour.getRed(), colour.getGreen(), colour.getBlue(), fillAlpha);
+
+		for (Node n : w.nodes)
+		{
+			p = nc.getPoint(n.eastNorth);
+			polygon.addPoint(p.x,p.y);
+		}
+
+		g.setColor( w.selected ?
+				selectedColor : coloura);
+
+		g.fillPolygon(polygon);
+	}
+
+	// NEW
+	protected void drawNode(Node n, ImageIcon icon, boolean annotate) {
+		Point p = nc.getPoint(n.eastNorth);
+		if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return;
+		int w = icon.getIconWidth(), h=icon.getIconHeight();
+		icon.paintIcon ( Main.map.mapView, g, p.x-w/2, p.y-h/2 );
+		String name = (n.keys==null) ? null : n.keys.get("name");
+		if (name!=null && annotate)
+		{
+			g.setColor(textColor);
+			Font defaultFont = g.getFont();
+			g.setFont (orderFont);
+			g.drawString (name, p.x+w/2+2, p.y+h/2+2);
+			g.setFont(defaultFont);
+		}
+		if (n.selected)
+		{
+			g.setColor (  selectedColor );
+			g.drawRect (p.x-w/2-2,p.y-w/2-2, w+4, h+4);
+		}
+	}
+
+	/**
+	 * Draw a line with the given color.
+	 */
+	protected void drawSegment(Node n1, Node n2, Color col, boolean showDirection) {
+		if (useRealWidth && showDirection) showDirection = false;
+		drawSeg(n1, n2, col, showDirection, 1, false);
+	}
+
+	private void drawSeg(Node n1, Node n2, Color col, boolean showDirection, int width, boolean dashed) {
+		if (col != currentColor || width != currentWidth || dashed != currentDashed) {
+			displaySegments(col, width, dashed);
+		}
+		Point p1 = nc.getPoint(n1.eastNorth);
+		Point p2 = nc.getPoint(n2.eastNorth);
+
+		// checking if this segment is visible
+		if ((p1.x < 0) && (p2.x < 0)) return ;
+		if ((p1.y < 0) && (p2.y < 0)) return ;
+		if ((p1.x > nc.getWidth()) && (p2.x > nc.getWidth())) return ;
+		if ((p1.y > nc.getHeight()) && (p2.y > nc.getHeight())) return ;
+		//if (ls.selected)
+		// col = selectedColor;
+		//g.setColor(col);
+		//g.setWidth(width);
+		//if (dashed) 
+		// g2d.setStroke(new BasicStroke(width,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,new float[] {9},0));
+		//else 
+		// g2d.setStroke(new BasicStroke(width,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
+
+		//g.drawLine(p1.x, p1.y, p2.x, p2.y);
+		currentPath.moveTo(p1.x, p1.y);
+		currentPath.lineTo(p2.x, p2.y);
+
+		if (showDirection) {
+			double t = Math.atan2(p2.y-p1.y, p2.x-p1.x) + Math.PI;
+			//g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
+			//g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
+			currentPath.lineTo((int)(p2.x + 10*Math.cos(t-PHI)), (int)(p2.y + 10*Math.sin(t-PHI)));
+			currentPath.moveTo((int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI)));
+			currentPath.lineTo(p2.x, p2.y);
+		}
+		//g2d.setStroke(new BasicStroke(1));
+
+	}
+
+	protected void displaySegments() {
+		displaySegments(null, 0, false);
+	}
+
+	protected void displaySegments(Color newColor, int newWidth, boolean newDash) {
+
+		if (currentPath != null) {
+			Graphics2D g2d = (Graphics2D)g;
+			g2d.setColor(inactive ? inactiveColor : currentColor);
+			if (currentStroke == null) {
+				if (currentDashed)
+					g2d.setStroke(new BasicStroke(currentWidth,BasicStroke.CAP_BUTT,BasicStroke.JOIN_ROUND,0,new float[] {9},0));
+				else 
+					g2d.setStroke(new BasicStroke(currentWidth,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
+			}
+			g2d.draw(currentPath);
+			g2d.setStroke(new BasicStroke(1));
+
+			currentPath = new GeneralPath();
+			currentColor = newColor;
+			currentWidth = newWidth;
+			currentDashed = newDash;
+			currentStroke = null;
+		}
+	}
+
+	/**
+	 * Draw the node as small rectangle with the given color.
+	 *
+	 * @param n  The node to draw.
+	 * @param color The color of the node.
+	 */
+	public void drawNode(Node n, Color color) {
+		if(isZoomOk(null)) {
+			Point p = nc.getPoint(n.eastNorth);
+			if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return;
+			g.setColor(color);
+			g.drawRect(p.x-1, p.y-1, 2, 2);
+		}
+	}
+	
+	public static Color getPreferencesColor(String colName, Color def) {
+		String colStr = Main.pref.get("color."+colName);
+		if (colStr.equals("")) {
+			Main.pref.put("color."+colName, ColorHelper.color2html(def));
+			return def;
+		}
+		return ColorHelper.html2color(colStr);
+	}
+
+	// NW 111106 Overridden from SimplePaintVisitor in josm-1.4-nw1
+	// Shows areas before non-areas
+	public void visitAll(DataSet data) {
+		inactiveColor = getPreferencesColor("inactive", Color.DARK_GRAY);
+		selectedColor = getPreferencesColor("selected", Color.YELLOW);
+		nodeColor = getPreferencesColor("node", Color.RED);
+		dfltWayColor = getPreferencesColor("way", darkblue);
+		incompleteColor = getPreferencesColor("incomplete way", darkerblue);
+		backgroundColor = getPreferencesColor("background", Color.BLACK);
+		untaggedColor = getPreferencesColor("untagged",Color.GRAY);
+		textColor = getPreferencesColor ("text", Color.WHITE);
+		showDirectionArrow = Main.pref.getBoolean("draw.segment.direction");
+		showOrderNumber = Main.pref.getBoolean("draw.segment.order_number");
+		useRealWidth = Main.pref.getBoolean("mappaint.useRealWidth",true);
+		zoomLevelDisplay = Main.pref.getBoolean("mappaint.zoomLevelDisplay",false);
+		fillAreas = Main.pref.getBoolean("mappaint.fillareas", true);
+
+		/* XXX - there must be a better way to get a bounded Integer pref! */
+		try {
+			fillAlpha = Integer.valueOf(Main.pref.get("mappaint.fillalpha", "50"));
+			if (fillAlpha < 0) {
+				fillAlpha = 0;
+			}
+			if (fillAlpha > 255) {
+				fillAlpha = 255;
+			}
+		} catch (NumberFormatException nfe) {
+			fillAlpha = 50;
+		}
+
+		Collection<Way> noAreaWays = new LinkedList<Way>();
+
+		for (final OsmPrimitive osm : data.ways)
+			if (!osm.incomplete && !osm.deleted && MapPaintStyles.isArea(osm))
+				osm.visit(this);
+			else if (!osm.deleted && !osm.incomplete)
+				noAreaWays.add((Way)osm);
+
+		for (final OsmPrimitive osm : noAreaWays)
+			osm.visit(this);
+
+		for (final OsmPrimitive osm : data.nodes)
+			if (!osm.incomplete && !osm.deleted)
+				osm.visit(this);
+
+		for (final OsmPrimitive osm : data.getSelected())
+			if (!osm.incomplete && !osm.deleted){
+				osm.shown=false; //to be sure it will be drawn
+				osm.visit(this);
+			}
+		displaySegments();
+	}
+	
+	/**
+	 * Draw an number of the order of the two consecutive nodes within the
+	 * parents way
+	 */
+	protected void drawOrderNumber(Node n1, Node n2, int orderNumber) {
+		int strlen = (""+orderNumber).length();
+		Point p1 = nc.getPoint(n1.eastNorth);
+		Point p2 = nc.getPoint(n2.eastNorth);
+		int x = (p1.x+p2.x)/2 - 4*strlen;
+		int y = (p1.y+p2.y)/2 + 4;
+
+		Rectangle screen = g.getClipBounds();
+		if (screen.contains(x,y)) {
+			Color c = g.getColor();
+			g.setColor(backgroundColor);
+			g.fillRect(x-1, y-12, 8*strlen+1, 14);
+			g.setColor(c);
+			g.drawString(""+orderNumber, x, y);
+		}
+    }
+	
+	public void setGraphics(Graphics g) {
+    	this.g = g;
+    }
+
+	public void setNavigatableComponent(NavigatableComponent nc) {
+    	this.nc = nc;
+    }
+}
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java	(revision 486)
@@ -21,5 +21,5 @@
 
 /**
- * A visitor that paint a simple scheme of every primitive it visits to a 
+ * A visitor that paints a simple scheme of every primitive it visits to a 
  * previous set graphic environment.
  * 
Index: trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 486)
@@ -50,13 +50,12 @@
 		panel = new JPanel(new GridBagLayout());
 		
-		panel.add(new JLabel(tr("<html><h2>You are running the latest \"modeless\" JOSM version.</h2>" +
-				"<h3>This version (almost) does away with the old edit modes, like \"add node and connect\"<br>" +
-				"etc.; instead, there are only four modes: zoom, select, edit, and delete." +
-				"<br>The edit mode will do what you want in most cases (also see the mini help about<br>" +
-				"modifier keys at the bottom of the screen).</h3>" +
-                "<h3>If this is the first time you use JOSM since 08 October, you will also find that with the<br>" +
-                "0.5 API, segments have gone and relations have been added. You will find general<br>" +
-                "information about the changes on the OSM wiki, and there's a page on using relations<br>"+
-                "in the JOSM online help." +
+		panel.add(new JLabel(tr("<html><h2>You are running the latest JOSM version with built-in mappaint support.</h2>" +
+                "<h3>The mappaint plugin is no longer necessary and has been removed from your configuration<br>" +
+                "file (if it was present). You can now switch between the \"classic\" display and the mappaint<br>" +
+                "style by toggling the \"Wireframe\" option in the \"View\" menu.</h3>" +
+                "<h3>If you have not used new JOSM versions for a while, you will also discover that this JOSM<br>" +
+                "is \"modeless\". It (almost) does away with the old edit modes, like \"add node and connect\" etc.;<br>"+
+                "instead, there are only four modes: zoom, select, edit, and delete. The edit mode will do what<br>"+
+                "you want in most cases (also see the mini help about modifier keys at the bottom of the screen)." +
 		"</h3>")), GBC.eol());
 		
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 486)
@@ -111,4 +111,20 @@
 			} else {
 				Main.pref.load();
+				
+				// this is temporary code to ease the transition to built-in mappaint
+				List<String> plugins = new LinkedList<String>();
+				if (Main.pref.hasKey("plugins"))
+					plugins.addAll(Arrays.asList(Main.pref.get("plugins").split(",")));
+								
+				if (plugins.contains("mappaint")) {
+					plugins.remove("mappaint");
+					// XXX is there really no "public static String.join" or something?
+					StringBuilder tmp = new StringBuilder();
+					for (String p : plugins) { if (tmp.length()>0) tmp.append(","); tmp.append(p); }
+					Main.pref.put("plugins", tmp.toString());
+					Main.pref.put("draw.wireframe", false);
+				} else if (!Main.pref.hasKey("draw.wireframe")) {
+					Main.pref.put("draw.wireframe", true);
+				}
 			}
 		} catch (final IOException e1) {
Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 486)
@@ -10,4 +10,5 @@
 
 import javax.swing.Action;
+import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JMenu;
 import javax.swing.JMenuBar;
@@ -15,4 +16,5 @@
 import javax.swing.KeyStroke;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.actions.AboutAction;
@@ -44,4 +46,5 @@
 import org.openstreetmap.josm.actions.search.SearchAction;
 import org.openstreetmap.josm.data.DataSetChecker;
+import org.openstreetmap.josm.data.Preferences;
 
 /**
@@ -156,4 +159,18 @@
 		    current.setAccelerator(autoScaleAction.shortCut);
         }
+        viewMenu.addSeparator();
+
+        // TODO move code to an "action" like the others?
+        final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view"));
+        wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", true));     
+        wireframe.setAccelerator(KeyStroke.getKeyStroke("alt W"));
+        wireframe.addActionListener(new ActionListener() {
+        	public void actionPerformed(ActionEvent ev) {
+        		Main.pref.put("draw.wireframe", wireframe.isSelected());
+        		Main.map.mapView.repaint();
+        	}
+        });
+        viewMenu.add(wireframe);
+        
 		add(viewMenu);
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 486)
@@ -41,4 +41,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.data.osm.visitor.MapPaintVisitor;
 import org.openstreetmap.josm.data.osm.visitor.MergeVisitor;
 import org.openstreetmap.josm.data.osm.visitor.SimplePaintVisitor;
@@ -116,6 +117,7 @@
 	public final LinkedList<DataChangeListener> listenerDataChanged = new LinkedList<DataChangeListener>();
 	
-	private SimplePaintVisitor mapPainter = new SimplePaintVisitor();
-
+	private SimplePaintVisitor wireframeMapPainter = new SimplePaintVisitor();
+	private MapPaintVisitor standardMapPainter = new MapPaintVisitor();
+	
 	/**
 	 * Construct a OsmDataLayer.
@@ -158,8 +160,18 @@
 			}
 		}
-		mapPainter.setGraphics(g);
-		mapPainter.setNavigatableComponent(mv);
-		mapPainter.inactive = inactive;
-		mapPainter.visitAll(data);
+		
+		if (Main.pref.getBoolean("draw.wireframe")) {
+			wireframeMapPainter.setGraphics(g);
+			wireframeMapPainter.setNavigatableComponent(mv);
+			wireframeMapPainter.inactive = inactive;
+			wireframeMapPainter.visitAll(data);
+		}
+		else
+		{
+			standardMapPainter.setGraphics(g);
+			standardMapPainter.setNavigatableComponent(mv);
+			standardMapPainter.inactive = inactive;
+			standardMapPainter.visitAll(data);
+		}
 		Main.map.conflictDialog.paintConflicts(g, mv);
 	}
@@ -321,9 +333,4 @@
 	}
 
-
-	public void setMapPainter(SimplePaintVisitor mapPainter) {
-    	this.mapPainter = mapPainter;
-    }
-	
 	public void fireDataChange() {
 		for (DataChangeListener dcl : listenerDataChanged) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/AreaElemStyle.java	(revision 486)
@@ -0,0 +1,21 @@
+package org.openstreetmap.josm.gui.mappaint;
+import java.awt.Color;
+
+public class AreaElemStyle extends ElemStyle
+{
+	Color colour;
+
+	public AreaElemStyle (Color colour, long maxScale, long minScale) {
+		this.colour = colour;
+		this.maxScale = maxScale;
+		this.minScale = minScale;
+	}
+
+	public Color getColour() {
+		return colour;
+	}
+
+	@Override public String toString() {
+		return "AreaElemStyle:   colour=" + colour;
+	}
+}
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 486)
@@ -0,0 +1,18 @@
+package org.openstreetmap.josm.gui.mappaint;
+
+abstract public class ElemStyle
+{
+	// zoom range to display the feature
+	protected long minScale;
+	protected long maxScale;
+
+	public long getMinScale() {
+		return minScale;
+	}
+	public long getMaxScale() {
+		return maxScale;
+	}
+}
+
+
+
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java	(revision 486)
@@ -0,0 +1,180 @@
+package org.openstreetmap.josm.gui.mappaint;
+
+import java.io.File;
+import java.awt.Color;
+import java.awt.Toolkit;
+import java.net.URL;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.tools.ColorHelper;
+import org.openstreetmap.josm.plugins.Plugin;
+import org.xml.sax.Attributes;
+import org.xml.sax.helpers.DefaultHandler;
+
+public class ElemStyleHandler extends DefaultHandler
+{
+	boolean inDoc, inRule, inCondition, inElemStyle, inLine, inIcon, inArea, inScaleMax, inScaleMin;
+	String curKey = null;
+	String curValue = null;
+	int curLineWidth = -1;
+	int curLineRealWidth = 0;
+	boolean curLineDashed = false;
+	Color curLineColour = null;
+	Color curAreaColour = null;
+	ImageIcon curIcon = null;
+	boolean curIconAnnotate = true;
+	long curScaleMax = 1000000000;
+	long curScaleMin = 0;
+
+	public ElemStyleHandler() {
+		inDoc=inRule=inCondition=inElemStyle=inLine=inIcon=inArea=false;
+	}
+
+	/*
+    ElemStyles getElemStyles()
+    {
+        return styles;
+    }
+	*/
+
+	@Override public void startDocument() {
+		inDoc = true;
+	}
+
+	@Override public void endDocument() {
+		inDoc = false;
+	}
+
+	@Override public void startElement(String uri,String name, String qName, 
+			Attributes atts) {
+		if (inDoc==true)	{
+			if (qName.equals("rule")) {
+				inRule=true;
+			}
+			else if (qName.equals("condition") && inRule) {
+				inCondition=true;
+				for (int count=0; count<atts.getLength(); count++) {
+					if(atts.getQName(count).equals("k"))
+						curKey = atts.getValue(count);        
+					else if(atts.getQName(count).equals("v"))
+						curValue = atts.getValue(count);        
+				}
+			} else if (qName.equals("line")) {
+				inLine = true;
+				for (int count=0; count<atts.getLength(); count++) {
+					if(atts.getQName(count).equals("width"))
+						curLineWidth = Integer.parseInt(atts.getValue(count));
+					else if (atts.getQName(count).equals("colour"))
+						curLineColour=ColorHelper.html2color(atts.getValue(count));
+					else if (atts.getQName(count).equals("realwidth"))
+						curLineRealWidth=Integer.parseInt(atts.getValue(count));
+					else if (atts.getQName(count).equals("dashed"))
+						curLineDashed=Boolean.parseBoolean(atts.getValue(count));
+				}
+			} else if (qName.equals("scale_max")) {
+				inScaleMax = true;
+			} else if (qName.equals("scale_min")) {
+				inScaleMin = true;
+			} else if (qName.equals("icon")) {
+				inIcon = true;
+				for (int count=0; count<atts.getLength(); count++) {
+					if (atts.getQName(count).equals("src")) {
+						String imageFile = MapPaintStyles.getStyleDir()+"icons/"+atts.getValue(count); 
+						File f = new File(imageFile);
+						if (f.exists()) {
+							//open icon from user directory
+							curIcon = new ImageIcon(imageFile);
+						} else {
+							try {
+								URL path = getClass().getResource("/styles/standard/icons/"+atts.getValue(count));
+								if (path == null) {
+									/* icon not found, using default */
+									System.out.println("Mappaint: Icon " + atts.getValue(count) + " not found, using default icon");
+									path = getClass().getResource("/styles/standard/icons/misc/no_icon.png");
+									curIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(path));
+								} else {
+									curIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(path));
+								}
+							}
+							catch (Exception e){
+								URL path = getClass().getResource("/styles/standard/icons/amenity.png");
+								curIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(path));
+							}
+						}
+					} else if (atts.getQName(count).equals("annotate")) {
+						curIconAnnotate = Boolean.parseBoolean (atts.getValue(count));
+					}
+				}
+			}
+			else if (qName.equals("area"))
+			{
+				inArea = true;
+				for (int count=0; count<atts.getLength(); count++)
+				{
+					if (atts.getQName(count).equals("colour"))
+						curAreaColour=ColorHelper.html2color(atts.getValue(count));
+				}
+			}
+		}
+	}
+
+	@Override public void endElement(String uri,String name, String qName)
+	{
+		if (inRule && qName.equals("rule")) {
+			ElemStyle newStyle;
+			inRule = false;
+			if (curLineWidth != -1) {
+				newStyle = new LineElemStyle(curLineWidth, curLineRealWidth, curLineColour, 
+						curLineDashed, curScaleMax, curScaleMin);
+				MapPaintStyles.add(curKey, curValue, newStyle);
+				curLineWidth	= -1;
+				curLineRealWidth= 0;
+				curLineDashed   = false;
+				curLineColour 	= null;
+			}
+			
+			if (curIcon != null) {
+				newStyle = new IconElemStyle(curIcon, curIconAnnotate, curScaleMax, curScaleMin);
+				MapPaintStyles.add(curKey, curValue, newStyle);
+				curIcon 		= null;
+				curIconAnnotate = true;
+			}
+			if (curAreaColour != null) {
+				newStyle = new AreaElemStyle (curAreaColour, curScaleMax, curScaleMin);
+				MapPaintStyles.add(curKey, curValue, newStyle);
+				curAreaColour 	= null;
+			}
+			curScaleMax = 1000000000;
+			curScaleMin = 0;
+
+		}
+		else if (inCondition && qName.equals("condition"))
+			inCondition = false;
+		else if (inLine && qName.equals("line"))
+			inLine = false;
+		else if (inIcon && qName.equals("icon"))
+			inIcon = false;
+		else if (inArea && qName.equals("area"))
+			inArea = false;
+		else if (qName.equals("scale_max"))
+			inScaleMax = false;
+		else if (qName.equals("scale_min"))
+			inScaleMin = false;
+	}
+
+	@Override public void characters(char ch[], int start, int length) {
+		if (inScaleMax == true) {
+			String content = new String(ch, start, length);
+			curScaleMax = Long.parseLong(content);
+		}
+		if (inScaleMin == true) {
+			String content = new String(ch, start, length);
+			curScaleMin = Long.parseLong(content);
+		}
+	}
+}
+
+
+
+
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 486)
@@ -0,0 +1,114 @@
+package org.openstreetmap.josm.gui.mappaint;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+public class ElemStyles
+{
+	HashMap<String, ElemStyle> styles;
+	static int nr = 0;
+
+
+	public ElemStyles()
+	{
+		styles = new HashMap<String, ElemStyle>();
+	}
+
+	public void add (String k, String v, ElemStyle style)
+	{
+		ElemStyle  old_style;
+		String key = k + "=" + v;
+		
+		/* unfortunately, there don't seem to be an efficient way to */
+		/* find out, if a given OsmPrimitive is an area or not, */
+		/* so distinguish only between way and node here - for now */
+		if(style instanceof AreaElemStyle) {
+			key = key + "way";
+		}
+		else if(style instanceof LineElemStyle) {
+			key = key + "way";
+		}
+		else if(style instanceof IconElemStyle) {
+			key = key + "node";
+		}
+		/* avoid duplicates - for now */
+		old_style = styles.get(key);
+		if(old_style == null) {
+			/* new key/value, insert */
+			styles.put(key, style);
+		} else {
+			if(style.getMaxScale() < old_style.getMaxScale()) {
+				/* existing larger scale key/value, replace */
+				styles.remove(old_style);
+				styles.put(key, style);
+			}
+		}
+	}
+
+	public ElemStyle getStyle (OsmPrimitive p)
+	{
+		if(p.keys!=null)
+		{
+			String classname;
+			String kv = null;
+			
+			if(p instanceof org.openstreetmap.josm.data.osm.Node) {
+				classname = "node";
+			} else {
+				classname = "way";
+			}
+			Iterator<String> iterator = p.keys.keySet().iterator();
+			while(iterator.hasNext())	
+			{
+				String key = iterator.next();
+				kv = key + "=" + p.keys.get(key) + classname;
+				if(styles.containsKey(kv))
+				{
+					return styles.get(kv);
+				}
+			}
+
+            // not a known key/value combination
+			boolean first_line = true;
+
+            // filter out trivial tags and show the rest
+			iterator = p.keys.keySet().iterator();
+			while(iterator.hasNext())	
+			{
+				String key = iterator.next();
+				kv = key + "=" + p.keys.get(key);
+				if(	!kv.startsWith("created_by=") &&
+					!kv.startsWith("converted_by=") &&
+					!kv.startsWith("source=") &&
+					!kv.startsWith("note=") &&
+					!kv.startsWith("layer=") &&
+					!kv.startsWith("bridge=") &&
+					!kv.startsWith("tunnel=") &&
+					!kv.startsWith("oneway=") &&
+					!kv.startsWith("speedlimit=") &&
+					!kv.startsWith("motorcar=") &&
+					!kv.startsWith("horse=") &&
+					!kv.startsWith("bicycle=") &&
+					!kv.startsWith("foot=")
+					) {
+						
+					if (first_line) {
+						nr++;
+						//System.out.println("mappaint - rule not found[" + nr + "]: " + kv + " id:" + p.id);
+					} else {
+						//System.out.println("mappaint - rule not found[" + nr + "]: " + kv);
+					}
+					first_line=false;
+				}
+			}
+		}
+		
+		return null;
+	}
+
+	public boolean isArea(OsmPrimitive p)
+	{
+		return getStyle(p) instanceof AreaElemStyle;
+	}
+}
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/IconElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/IconElemStyle.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/IconElemStyle.java	(revision 486)
@@ -0,0 +1,28 @@
+package org.openstreetmap.josm.gui.mappaint;
+import javax.swing.ImageIcon;
+
+public class IconElemStyle extends ElemStyle
+{
+	ImageIcon icon;
+	boolean annotate;
+
+	public IconElemStyle (ImageIcon icon, boolean annotate, long maxScale, long minScale) {
+		this.icon=icon;
+		this.annotate=annotate;
+		this.maxScale = maxScale;
+		this.minScale = minScale;
+	}	
+	
+	public ImageIcon getIcon() {
+		return icon;
+	}
+
+	public boolean doAnnotate() {
+		return annotate;
+	}
+
+	@Override public String toString()
+	{
+		return "IconElemStyle:  icon= " + icon +  " annotate=" + annotate;
+	}
+}
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 486)
@@ -0,0 +1,23 @@
+package org.openstreetmap.josm.gui.mappaint;
+import java.awt.Color;
+
+public class LineElemStyle extends ElemStyle
+{
+	public int width;
+	public int realWidth = 0; //the real width of this line in meter
+	public Color colour;
+	public boolean dashed = false;
+
+	public LineElemStyle (int width, int realWidth, Color colour, boolean dashed, long maxScale, long minScale) {
+		this.width = width;
+		this.realWidth = realWidth;
+		this.colour = colour;
+		this.dashed = dashed;
+		this.maxScale = maxScale;
+		this.minScale = minScale;
+	}
+
+	@Override public String toString() {
+		return "LineElemStyle:  width= " + width + "realWidth= " + realWidth +  " colour=" + colour + " dashed=" + dashed;
+	}
+}
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 486)
@@ -0,0 +1,175 @@
+package org.openstreetmap.josm.gui.mappaint;
+
+import java.io.File;
+import java.io.FileReader;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.MapFrame;
+import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.plugins.Plugin;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+public class MapPaintStyles {
+
+	public static String styleDir;
+	private static HashMap<String, ElemStyle> styles = new HashMap<String, ElemStyle>();
+	
+	public static String getStyleDir(){
+		return styleDir;
+	}
+
+	public static void readFromPreferences() {
+
+		String styleName = Main.pref.get("mappaint.style", "standard");
+		styleDir = Main.pref.getPreferencesDir()+"plugins/mappaint/"+styleName+"/"; //some day we will support different icon directories over options
+		String elemStylesFile = getStyleDir()+"elemstyles.xml";
+
+//		System.out.println("mappaint: Using style: " + styleName);
+//		System.out.println("mappaint: Using style dir: " + styleDir);
+//		System.out.println("mappaint: Using style file: " + elemStylesFile);
+
+		File f = new File(elemStylesFile);
+		if (f.exists())
+		{
+			try// reading file from file system
+			{
+//				System.out.println("mappaint: Using style file: \"" + f + "\"");
+				XMLReader xmlReader = XMLReaderFactory.createXMLReader();
+				ElemStyleHandler handler = new ElemStyleHandler();
+				xmlReader.setContentHandler(handler);
+				xmlReader.setErrorHandler(handler);
+//				temporary only!
+				xmlReader.parse(new InputSource(new FileReader(f)));
+			}
+			catch (Exception e)
+			{
+				throw new RuntimeException(e);
+			}
+		} 
+		else {// reading the builtin file from the plugin jar file
+			URL elemStylesPath = Main.class.getResource("/styles/"+styleName+"/elemstyles.xml");
+
+			System.out.println("mappaint: Using jar's elemstyles.xml: \"" + elemStylesPath + "\"");
+			if (elemStylesPath != null)
+			{
+				try
+				{
+					XMLReader xmlReader = XMLReaderFactory.createXMLReader();
+					ElemStyleHandler handler = new ElemStyleHandler();
+					xmlReader.setContentHandler(handler);
+					xmlReader.setErrorHandler(handler);
+//					temporary only!
+					xmlReader.parse(new InputSource(elemStylesPath.openStream()));
+				}
+				catch (Exception e)
+				{
+					throw new RuntimeException(e);
+				}
+			} else {
+				System.out.println("mappaint: Couldn't find style: \"" + styleDir + "elemstyles.xml\"");
+			}
+		}
+	}
+
+	static int nr = 0;
+
+	public static void add (String k, String v, ElemStyle style) {
+		ElemStyle  old_style;
+		String key = k + "=" + v;
+
+		/* unfortunately, there don't seem to be an efficient way to */
+		/* find out, if a given OsmPrimitive is an area or not, */
+		/* so distinguish only between way and node here - for now */
+		if (style instanceof AreaElemStyle) {
+			key = key + "way";
+		} else if (style instanceof LineElemStyle) {
+			key = key + "way";
+		} else if (style instanceof IconElemStyle) {
+			key = key + "node";
+		}
+		/* avoid duplicates - for now */
+		old_style = styles.get(key);
+		if (old_style == null) {
+			/* new key/value, insert */
+			styles.put(key, style);
+		} else {
+			if (style.getMaxScale() < old_style.getMaxScale()) {
+				/* existing larger scale key/value, replace */
+				styles.remove(old_style);
+				styles.put(key, style);
+			}
+		}
+	}
+
+	public static ElemStyle getStyle (OsmPrimitive p)
+	{
+		if (p.keys!=null) {
+			String classname;
+			String kv = null;
+
+			if (p instanceof org.openstreetmap.josm.data.osm.Node) {
+				classname = "node";
+			} else {
+				classname = "way";
+			}
+			Iterator<String> iterator = p.keys.keySet().iterator();
+			while (iterator.hasNext())	
+			{
+				String key = iterator.next();
+				kv = key + "=" + p.keys.get(key) + classname;
+				if (styles.containsKey(kv))	{
+					return styles.get(kv);
+				}
+			}
+
+			// not a known key/value combination
+			boolean first_line = true;
+
+			// filter out trivial tags and show the rest
+			iterator = p.keys.keySet().iterator();
+			while (iterator.hasNext()) {
+				String key = iterator.next();
+				kv = key + "=" + p.keys.get(key);
+				if (!kv.startsWith("created_by=") &&
+						!kv.startsWith("converted_by=") &&
+						!kv.startsWith("source=") &&
+						!kv.startsWith("note=") &&
+						!kv.startsWith("layer=") &&
+						!kv.startsWith("bridge=") &&
+						!kv.startsWith("tunnel=") &&
+						!kv.startsWith("oneway=") &&
+						!kv.startsWith("speedlimit=") &&
+						!kv.startsWith("motorcar=") &&
+						!kv.startsWith("horse=") &&
+						!kv.startsWith("bicycle=") &&
+						!kv.startsWith("foot=")
+				) {
+
+					if (first_line) {
+						nr++;
+						//System.out.println("mappaint - rule not found[" + nr + "]: " + kv + " id:" + p.id);
+					} else {
+						//System.out.println("mappaint - rule not found[" + nr + "]: " + kv);
+					}
+					first_line=false;
+				}
+			}
+		}
+
+		return null;
+	}
+
+	public static boolean isArea(OsmPrimitive p)
+	{
+		return getStyle(p) instanceof AreaElemStyle;
+	}
+}
Index: trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java	(revision 486)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/MapPaintPreference.java	(revision 486)
@@ -0,0 +1,22 @@
+// License: GPL. Copyright 2007 by Immanuel Scholz and others
+package org.openstreetmap.josm.gui.preferences;
+
+import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+
+public class MapPaintPreference implements PreferenceSetting {
+	
+	public void addGui(final PreferenceDialog gui) {
+		// this is intended for a future configuration panel for mappaint!
+	}
+
+	public void ok() {
+		// dummy
+	}
+
+	/** 
+	 * Initialize the styles
+	 */
+	public static void initialize() {
+		MapPaintStyles.readFromPreferences();
+	}
+}
Index: trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 485)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 486)
@@ -101,4 +101,5 @@
 		settings.add(new DrawingPreference());
 		settings.add(new ColorPreference());
+		settings.add(new MapPaintPreference());
 		settings.add(new ServerAccessPreference());
 		settings.add(new CsvPreference());
