Index: /applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
===================================================================
--- /applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 34210)
+++ /applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 34211)
@@ -14,4 +14,6 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.WindowAdapter;
@@ -42,4 +44,5 @@
 import javax.swing.KeyStroke;
 import javax.swing.SwingUtilities;
+import javax.swing.border.Border;
 import javax.swing.filechooser.FileFilter;
 
@@ -61,5 +64,4 @@
 import org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor;
 import org.openstreetmap.josm.gui.util.WindowGeometry;
-import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
@@ -161,6 +163,8 @@
     private JCheckBox splitOnSingleSegmentCheck;
     private JCheckBox splitOnOrthogonalCheck;
+    private Border  defaulfBorder = (new JTextField()).getBorder();
 
     public LoadPdfDialog() {
+    	Logging.debug("PdfImport:LoadPdfDialog");
         this.buildGUI();
         FilePlacement pl = new FilePlacement();
@@ -170,76 +174,155 @@
     }
 
-     private void addListeners() {
-
-        this.projectionCombo.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                updateProjectionPrefButton();
-            }
-
-        });
-        this.projectionPreferencesButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                showProjectionPreferences();
-            }
-        });
-
-        this.loadFileButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                loadFilePressed();
-            }
-        });
-
-        this.okButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                okPressed();
-            }
-        });
-
-        this.saveButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                savePressed();
-            }
-        });
-
-        this.showButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                showPressed();
-            }
-        });
-
-        this.cancelButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                cancelPressed();
-            }
-        });
-
-        this.addWindowListener(new WindowAdapter() {
-            @Override
-            public void windowClosing(WindowEvent e) {
-                cancelPressed();
-            }
-        });
-
-        this.getMinButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                getMinPressed();
-            }
-        });
-
-        this.getMaxButton.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                getMaxPressed();
-            }
-        });
-    }
+	private class CheckDouble implements FocusListener {
+
+		@Override
+		public void focusGained(FocusEvent e) {
+		}
+
+		@Override
+		public void focusLost(FocusEvent event) {
+			check((JTextField) event.getSource());
+		}
+
+		public void check(JTextField t) {
+			try {
+				Double.valueOf(t.getText());
+				t.setBorder((LoadPdfDialog.this.defaulfBorder));
+			} catch (NumberFormatException e) {
+				t.setBorder(BorderFactory.createLineBorder(Color.red));
+			}
+		}
+	}
+
+private CheckDouble doublelistener = new CheckDouble();
+
+	private void addListeners() {
+
+		this.maxEastField.addFocusListener(doublelistener);
+		this.maxEastField.addFocusListener(new FocusListener() {
+			@Override
+			public void focusLost(FocusEvent e) {
+				checkCoords(LoadPdfDialog.this.maxEastField, LoadPdfDialog.this.maxNorthField);
+			}
+
+			@Override
+			public void focusGained(FocusEvent e) {
+			}
+		});
+		this.maxNorthField.addFocusListener(doublelistener);
+
+		this.minEastField.addFocusListener(doublelistener);
+		this.minEastField.addFocusListener(new FocusListener() {
+			@Override
+			public void focusLost(FocusEvent e) {
+				checkCoords(LoadPdfDialog.this.minEastField, LoadPdfDialog.this.minNorthField);
+			}
+
+			@Override
+			public void focusGained(FocusEvent e) {
+			}
+		});
+
+		this.minNorthField.addFocusListener(doublelistener);
+
+		this.minXField.addFocusListener(doublelistener);
+		this.minXField.addFocusListener(doublelistener);
+		this.minXField.addFocusListener(new FocusListener() {
+			@Override
+			public void focusLost(FocusEvent e) {
+				checkCoords(LoadPdfDialog.this.minXField, LoadPdfDialog.this.minYField);
+			}
+
+			@Override
+			public void focusGained(FocusEvent e) {
+			}
+		});
+
+		this.minYField.addFocusListener(doublelistener);
+
+		this.maxXField.addFocusListener(doublelistener);
+		this.maxXField.addFocusListener(new FocusListener() {
+			@Override
+			public void focusLost(FocusEvent e) {
+				checkCoords(LoadPdfDialog.this.maxXField, LoadPdfDialog.this.maxYField);
+			}
+
+			@Override
+			public void focusGained(FocusEvent e) {
+			}
+		});
+
+		this.maxYField.addFocusListener(doublelistener);
+
+		this.projectionCombo.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				updateProjectionPrefButton();
+			}
+
+		});
+		this.projectionPreferencesButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				showProjectionPreferences();
+			}
+		});
+
+		this.loadFileButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				loadFilePressed();
+			}
+		});
+
+		this.okButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				okPressed();
+			}
+		});
+
+		this.saveButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				savePressed();
+			}
+		});
+
+		this.showButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				showPressed();
+			}
+		});
+
+		this.cancelButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				cancelPressed();
+			}
+		});
+
+		this.addWindowListener(new WindowAdapter() {
+			@Override
+			public void windowClosing(WindowEvent e) {
+				cancelPressed();
+			}
+		});
+
+		this.getMinButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				getMinPressed();
+			}
+		});
+
+		this.getMaxButton.addActionListener(new ActionListener() {
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				getMaxPressed();
+			}
+		});
+	}
 
     JPanel projectionPanel = null;
@@ -260,9 +343,9 @@
         updateProjectionPrefButton();
 
-        this.loadFileButton = new JButton(tr("Load file..."));
-        this.okButton = new JButton(tr("Place"));
+        this.loadFileButton = new JButton(tr("Load preview ..."));
+        this.okButton = new JButton(tr("Import"));
         this.saveButton = new JButton(tr("Save"));
         this.showButton = new JButton(tr("Show target"));
-        this.cancelButton = new JButton(tr("Discard"));
+        this.cancelButton = new JButton(tr("Cancel"));
         this.loadProgress = new JProgressBar();
         this.progressRenderer = new LoadProgressRenderer(this.loadProgress);
@@ -280,28 +363,28 @@
         this.getMaxButton = new JButton(tr("Take X and Y from selected node"));
 
-        this.debugModeCheck = new JCheckBox(tr("Debug info"));
-        this.mergeCloseNodesCheck = new JCheckBox(tr("Merge close nodes"));
-        this.mergeCloseNodesTolerance = new JTextField("1e-3");
-
-        this.removeSmallObjectsCheck = new JCheckBox(tr("Remove objects smaller than"));
-        this.removeSmallObjectsSize = new JTextField("1");
-
-        this.removeLargeObjectsCheck = new JCheckBox(tr("Remove objects larger than"));
-        this.removeLargeObjectsSize = new JTextField("10");
-
-
-        this.colorFilterCheck = new JCheckBox(tr("Only this color"));
-        this.colorFilterColor = new JTextField("#000000");
-
-        this.removeParallelSegmentsCheck = new JCheckBox(tr("Remove parallel lines"));
-        this.removeParallelSegmentsTolerance = new JTextField("3");
-
-        this.limitPathCountCheck = new JCheckBox(tr("Take only first X paths"));
-        this.limitPathCount = new JTextField("10000");
-
-        this.splitOnColorChangeCheck = new JCheckBox(tr("Color/width change"));
-        this.splitOnShapeClosedCheck = new JCheckBox(tr("Shape closed"));
-        this.splitOnSingleSegmentCheck = new JCheckBox(tr("Single segments"));
-        this.splitOnOrthogonalCheck = new JCheckBox(tr("Orthogonal shapes"));
+        this.debugModeCheck = new JCheckBox(tr("Debug info"),PdfImportPlugin.Preferences.DebugTags);
+        this.mergeCloseNodesCheck = new JCheckBox(tr("Merge close nodes"),PdfImportPlugin.Preferences.MergeNodes);
+        this.mergeCloseNodesTolerance = new JTextField(Double.toString(PdfImportPlugin.Preferences.MergeNodesValue));
+
+        this.removeSmallObjectsCheck = new JCheckBox(tr("Remove objects smaller than"),PdfImportPlugin.Preferences.RemoveSmall);
+        this.removeSmallObjectsSize = new JTextField(Double.toString(PdfImportPlugin.Preferences.RemoveSmallValue));
+
+        this.removeLargeObjectsCheck = new JCheckBox(tr("Remove objects larger than"),PdfImportPlugin.Preferences.RemoveLarge);
+        this.removeLargeObjectsSize = new JTextField(Double.toString(PdfImportPlugin.Preferences.RemoveLargeValue));
+
+
+        this.colorFilterCheck = new JCheckBox(tr("Only this color"),PdfImportPlugin.Preferences.LimitColor);
+        this.colorFilterColor = new JTextField(PdfImportPlugin.Preferences.LimitColorValue);
+
+        this.removeParallelSegmentsCheck = new JCheckBox(tr("Remove parallel lines"),PdfImportPlugin.Preferences.RemoveParallel);
+        this.removeParallelSegmentsTolerance = new JTextField(Double.toString(PdfImportPlugin.Preferences.RemoveParallelValue));
+
+        this.limitPathCountCheck = new JCheckBox(tr("Take only first X paths"),PdfImportPlugin.Preferences.LimitPath);
+        this.limitPathCount = new JTextField(Integer.toString(PdfImportPlugin.Preferences.LimitPathValue));
+
+        this.splitOnColorChangeCheck = new JCheckBox(tr("Color/width change"),PdfImportPlugin.Preferences.LayerAttribChange);
+        this.splitOnShapeClosedCheck = new JCheckBox(tr("Shape closed"),PdfImportPlugin.Preferences.LayerClosed);
+        this.splitOnSingleSegmentCheck = new JCheckBox(tr("Single segments",PdfImportPlugin.Preferences.LayerSegment));
+        this.splitOnOrthogonalCheck = new JCheckBox(tr("Orthogonal shapes",PdfImportPlugin.Preferences.LayerOrtho));
 
         JPanel configPanel = new JPanel(new GridBagLayout());
@@ -541,4 +624,16 @@
     }
 
+	private void checkCoords(JTextField x, JTextField y) {
+		int splitpos = 0;
+		String eastVal = x.getText().trim();
+		if ((splitpos = eastVal.indexOf(';')) >= 0) {
+			// Split a coordinate into its parts for easy of data entry
+			y.setText(eastVal.substring(splitpos + 1).trim());
+			x.setText(eastVal.substring(0, splitpos).trim());
+		}
+		doublelistener.check(x);
+		doublelistener.check(y);
+	}
+
     private void showProjectionPreferences() {
         ProjectionChoice proj = (ProjectionChoice) projectionCombo.getSelectedItem();
@@ -555,5 +650,5 @@
             return;
         }
-
+        Logging.debug("PdfImport: Load Preview");
         this.removeLayer();
 
@@ -591,7 +686,7 @@
                             pdfFile = newFileName;
                             newLayer = null;
-                            LoadPdfDialog.this.loadFileButton.setText(tr("Loaded") + ": " + LoadPdfDialog.this.pdfFile.getName());
+                            LoadPdfDialog.this.loadFileButton.setText(tr("Preview") + ": " + LoadPdfDialog.this.pdfFile.getName());
                             LoadPdfDialog.this.loadFileButton.setEnabled(true);
-                            FilePlacement placement = LoadPdfDialog.this.loadPlacement();
+                            FilePlacement placement = LoadPdfDialog.this.loadPlacement(pdfFile);
                             LoadPdfDialog.this.setPlacement(placement);
                         }
@@ -623,5 +718,5 @@
             return;
         }
-
+        Logging.debug("PdfImport: Import");
         this.removeLayer();
 
@@ -740,5 +835,5 @@
         //get PDF file to load
     	if (loadChooser == null) {
-    		loadChooser = new JFileChooser(Config.getPref().get("pdfimport.loadDir"));
+    		loadChooser = new JFileChooser(PdfImportPlugin.Preferences.LoadDir);
     		loadChooser.setAcceptAllFileFilterUsed(false);
     		loadChooser.setMultiSelectionEnabled(false);
@@ -757,6 +852,5 @@
     		loadChooser.rescanCurrentDirectory();
     	}
-        int result = loadChooser.showOpenDialog(this);
-
+        int result = loadChooser.showDialog(this, tr("Preview"));
         if (result != JFileChooser.APPROVE_OPTION) {
             return null;
@@ -1020,8 +1114,8 @@
     }
 
-    private FilePlacement loadPlacement() {
+    private FilePlacement loadPlacement(File BaseFile) {
         FilePlacement pl = null;
         //load saved transformation
-        File propertiesFile = new File(pdfFile.getAbsoluteFile() + ".placement");
+        File propertiesFile = new File(BaseFile.getAbsoluteFile() + ".placement");
         try {
 
Index: /applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java
===================================================================
--- /applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java	(revision 34210)
+++ /applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java	(revision 34211)
@@ -6,13 +6,83 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.spi.preferences.Config;
 
 /**
  * A plugin to import a PDF file.
  */
+
 public class PdfImportPlugin extends Plugin {
 
-    public PdfImportPlugin(PluginInformation info) {
-        super(info);
-        MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction());
-    }
+	public enum GuiMode {
+		Auto, Expert, Simple
+	};
+
+	public static class Preferences {
+
+		public static String LoadDir;
+		public static GuiMode guiMode;
+		public static boolean MergeNodes;
+		public static double MergeNodesValue;
+		public static boolean RemoveSmall;
+		public static double RemoveSmallValue;
+		public static boolean RemoveLarge;
+		public static double RemoveLargeValue;
+		public static boolean RemoveParallel;
+		public static double RemoveParallelValue;
+		public static boolean LimitPath;
+		public static int LimitPathValue;
+		public static boolean LimitColor;
+		public static String LimitColorValue;
+		public static boolean DebugTags;
+		public static boolean LayerClosed;
+		public static boolean LayerSegment;
+		public static boolean LayerAttribChange;
+		public static boolean LayerOrtho;
+
+		protected static int GuiCode;
+
+		private static String PreFix;
+
+		private Preferences() {
+			return;
+		}
+
+		public static void reload(String Name) {
+			Preferences.PreFix = Name + ".";
+			Preferences.LoadDir = Config.getPref().get(Preferences.PreFix + "loadDir");
+			Preferences.GuiCode = Config.getPref().getInt(Preferences.PreFix + "GuiCode",0 );
+			switch (Preferences.GuiCode) {
+			case 1:
+				Preferences.guiMode = GuiMode.Expert;
+			case 2:
+				Preferences.guiMode = GuiMode.Simple;
+			default:
+				Preferences.guiMode = GuiMode.Expert;
+			}
+			Preferences.MergeNodes = Config.getPref().getBoolean(Preferences.PreFix + "MergeNodes");
+			Preferences.MergeNodesValue = Config.getPref().getDouble(Preferences.PreFix + "MergeNodes.Value", 1e-3);
+			Preferences.RemoveSmall = Config.getPref().getBoolean(Preferences.PreFix + "RemoveSmall");
+			Preferences.RemoveSmallValue = Config.getPref().getDouble(Preferences.PreFix + "RemoveSmall.Value", 1);
+			Preferences.RemoveLarge = Config.getPref().getBoolean(Preferences.PreFix + "RemoveLarge");
+			Preferences.RemoveLargeValue = Config.getPref().getDouble(Preferences.PreFix + "RemoveLarge.Value", 10);
+			Preferences.RemoveParallel = Config.getPref().getBoolean(Preferences.PreFix + "RemoveParallel");
+			Preferences.RemoveParallelValue = Config.getPref().getDouble(Preferences.PreFix + "RemoveParalle.Value", 3);
+			Preferences.LimitPath = Config.getPref().getBoolean(Preferences.PreFix + "LimitPath");
+			Preferences.LimitPathValue = Config.getPref().getInt(Preferences.PreFix + "LimitPath.Value", 10000);
+			Preferences.LimitColor = Config.getPref().getBoolean(Preferences.PreFix + "LimitColor");
+			Preferences.LimitColorValue = Config.getPref().get(Preferences.PreFix + "LimitColor.Value","#000000");
+			Preferences.DebugTags = Config.getPref().getBoolean(Preferences.PreFix + "DebugTags");
+			Preferences.LayerClosed = Config.getPref().getBoolean(Preferences.PreFix + "LayerClosed");
+			Preferences.LayerSegment = Config.getPref().getBoolean(Preferences.PreFix + "LayerSegment");
+			Preferences.LayerAttribChange = Config.getPref().getBoolean(Preferences.PreFix + "LayerAttribChanges");
+			Preferences.LayerOrtho = Config.getPref().getBoolean(Preferences.PreFix + "LayerOrtho");
+		}
+	}
+
+	public PdfImportPlugin(PluginInformation info) {
+		super(info);
+		MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction());
+		Preferences.reload(this.getPluginInformation().name);
+	}
+
 }
