Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/BasicEditorPanel.java	(revision 20675)
@@ -11,4 +11,5 @@
 import javax.swing.JScrollPane;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
@@ -31,4 +32,6 @@
 	private TurnRestrictionLegEditor toEditor;
 	private ViaList lstVias;
+	private JLabel lblVias;
+	private JScrollPane spVias;
 	private TurnRestrictionComboBox cbTurnRestrictions;
 	private VehicleExceptionEditor vehicleExceptionsEditor;
@@ -78,10 +81,14 @@
 		gc.weightx = 0.0;
 	    gc.insets = new Insets(0,0,5,5);	
-	    add(new JLabel("Vias:"), gc);
+	    add(lblVias = new JLabel("Vias:"), gc);
 	    
 	    gc.gridx = 1;
 	    gc.weightx = 1.0;
 	    DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
-	    add(new JScrollPane(lstVias = new ViaList(new ViaListModel(model, selectionModel), selectionModel)),gc);
+	    add(spVias = new JScrollPane(lstVias = new ViaList(new ViaListModel(model, selectionModel), selectionModel)),gc);
+	    if (!Main.pref.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false)) {
+	    	lblVias.setVisible(false);
+	    	spVias.setVisible(false);
+	    }
 	    
 	    // the editor for vehicle exceptions
@@ -152,3 +159,17 @@
 		cbTurnRestrictions.initIconSetFromPreferences(prefs);
 	}
+	
+	/**
+	 * Initializes the visibility of the list of via-objects depending
+	 * on values in the JOSM preferences
+	 * 
+	 * @param prefs the JOSM preferences
+	 */
+	public void initViasVisibilityFromPreferences(Preferences prefs){
+		boolean value = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
+		if (value != lblVias.isVisible()){
+			lblVias.setVisible(value);
+			spVias.setVisible(value);
+		}
+	}
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java	(revision 20675)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/MemberRoleCellEditor.java	(revision 20675)
@@ -0,0 +1,65 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.turnrestrictions.editor;
+
+import java.awt.Component;
+import java.util.logging.Logger;
+
+import javax.swing.AbstractCellEditor;
+import javax.swing.JTable;
+import javax.swing.table.TableCellEditor;
+
+import org.openstreetmap.josm.gui.tagging.AutoCompletingTextField;
+import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionItemPritority;
+import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
+import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionListItem;
+
+/**
+ * The cell editor for member roles of relation members in a turn restriction.
+ * 
+ */
+public class MemberRoleCellEditor extends AbstractCellEditor implements TableCellEditor {
+    static private Logger logger = Logger.getLogger(MemberRoleCellEditor.class.getName());
+
+    private AutoCompletingTextField editor = null;
+
+    /** user input is matched against this list of auto completion items */
+    private AutoCompletionList autoCompletionList = null;
+
+    /**
+     * constructor
+     */
+    public MemberRoleCellEditor() {
+        editor = new AutoCompletingTextField();
+        autoCompletionList = new AutoCompletionList();
+        editor.setAutoCompletionList(autoCompletionList);
+        autoCompletionList.add(new AutoCompletionListItem("from", AutoCompletionItemPritority.IS_IN_STANDARD));
+        autoCompletionList.add(new AutoCompletionListItem("to", AutoCompletionItemPritority.IS_IN_STANDARD));
+        autoCompletionList.add(new AutoCompletionListItem("via", AutoCompletionItemPritority.IS_IN_STANDARD));
+        autoCompletionList.add(new AutoCompletionListItem("location_hint", AutoCompletionItemPritority.IS_IN_STANDARD));
+    }
+
+    /**
+     * replies the table cell editor
+     */
+    public Component getTableCellEditorComponent(JTable table,
+            Object value, boolean isSelected, int row, int column) {
+
+        String role = (String)value;
+        editor.setText(role);        
+        return editor;
+    }
+
+    public Object getCellEditorValue() {
+        return editor.getText();
+    }
+
+    @Override
+    public void cancelCellEditing() {
+        super.cancelCellEditing();
+    }
+
+    @Override
+    public boolean stopCellEditing() {
+        return super.stopCellEditing();
+    }
+}
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberColumnModel.java	(revision 20675)
@@ -21,5 +21,6 @@
 		 col.setHeaderValue(tr("Role"));
 		 col.setResizable(true);
-		 col.setPreferredWidth(100);				 
+		 col.setPreferredWidth(100);	
+		 col.setCellEditor(new MemberRoleCellEditor());
 		 addColumn(col);
 		 
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberEditorModel.java	(revision 20675)
@@ -2,6 +2,7 @@
 
 
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.text.MessageFormat;
-
 import java.util.ArrayList;
 import java.util.Collection;
@@ -22,5 +23,4 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 public class RelationMemberEditorModel extends AbstractTableModel{	
@@ -353,4 +353,56 @@
 	}
 	
+	protected List<Integer> getSelectedIndices() {
+		ArrayList<Integer> ret = new ArrayList<Integer>();
+		for(int i =0; i < members.size(); i++){
+			if (rowSelectionModel.isSelectedIndex(i)) 
+				ret.add(i);
+		}
+		return ret;
+	}
+	
+	public boolean canMoveUp() {
+		List<Integer> sel = getSelectedIndices();
+		if (sel.isEmpty()) return false;
+		return sel.get(0) > 0;
+	}
+	
+	public boolean canMoveDown() {
+		List<Integer> sel = getSelectedIndices();
+		if (sel.isEmpty()) return false;
+		return sel.get(sel.size()-1) < members.size()-1;
+	}
+	
+	public void moveUpSelected() {
+		if (!canMoveUp()) return;
+		List<Integer> sel = getSelectedIndices();
+		for (int idx: sel){
+			RelationMemberModel m = members.remove(idx);
+			members.add(idx-1, m);
+		}
+		fireTableDataChanged();
+		rowSelectionModel.clearSelection();
+		colSelectionModel.setSelectionInterval(0, 1);
+		for (int idx: sel){
+			rowSelectionModel.addSelectionInterval(idx-1, idx-1);
+		}
+	}
+	
+	public void moveDownSelected() {
+		if (!canMoveDown()) return;
+		List<Integer> sel = getSelectedIndices();
+		for (int i = sel.size()-1; i>=0;i--){
+			int idx = sel.get(i);
+			RelationMemberModel m = members.remove(idx);
+			members.add(idx+1, m);
+		}
+		fireTableDataChanged();
+		rowSelectionModel.clearSelection();
+		colSelectionModel.setSelectionInterval(0, 1);
+		for (int idx: sel){
+			rowSelectionModel.addSelectionInterval(idx+1, idx+1);
+		}
+	}
+	
 	/**
 	 * Inserts a list of new relation members with the empty role for the primitives
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/RelationMemberTable.java	(revision 20675)
@@ -51,4 +51,6 @@
 	private DeleteAction actDelete;
 	private PasteAction actPaste;
+	private MoveUpAction actMoveUp;
+	private MoveDownAction actMoveDown;
 	private TransferHandler transferHandler;
 	
@@ -81,4 +83,12 @@
 		// the standard paste action for transfer handling) 
 		actPaste = new PasteAction();
+		
+		actMoveUp = new MoveUpAction();
+		model.getRelationMemberEditorModel().getRowSelectionModel().addListSelectionListener(actMoveUp);
+		registerKeyboardAction(actMoveUp,actMoveUp.getKeyStroke(), WHEN_FOCUSED);
+		
+		actMoveDown = new MoveDownAction();
+		model.getRelationMemberEditorModel().getRowSelectionModel().addListSelectionListener(actMoveDown);
+		registerKeyboardAction(actMoveDown, actMoveDown.getKeyStroke(), WHEN_FOCUSED);
 	}
 
@@ -150,4 +160,57 @@
 		}
 	}	
+
+	class MoveDownAction extends AbstractAction implements ListSelectionListener{	
+		private KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK);
+		public MoveDownAction(){
+			putValue(NAME, tr("Move down"));
+			putValue(SHORT_DESCRIPTION, tr("Move the selected relation members down by one position"));
+			putValue(ACCELERATOR_KEY,keyStroke);
+			putValue(SMALL_ICON, ImageProvider.get("dialogs", "movedown"));
+			updateEnabledState();
+		}
+		
+		public void actionPerformed(ActionEvent e) {
+			model.getRelationMemberEditorModel().moveDownSelected();
+		}
+
+		public void updateEnabledState(){
+			setEnabled(model.getRelationMemberEditorModel().canMoveDown());
+		}
+		
+		public void valueChanged(ListSelectionEvent e) {
+			updateEnabledState();			
+		}
+		public KeyStroke getKeyStroke() {
+			return keyStroke;
+		}
+	}
+	
+	class MoveUpAction extends AbstractAction implements ListSelectionListener{
+		private KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK);
+
+		public MoveUpAction() {
+			putValue(NAME, tr("Move up"));
+			putValue(SHORT_DESCRIPTION, tr("Move the selected relation members up by one position"));
+			putValue(ACCELERATOR_KEY,keyStroke);
+			putValue(SMALL_ICON, ImageProvider.get("dialogs", "moveup"));
+			updateEnabledState();
+		}
+		
+		public void actionPerformed(ActionEvent e) {
+			model.getRelationMemberEditorModel().moveUpSelected();
+		}
+
+		public void updateEnabledState(){
+			setEnabled(model.getRelationMemberEditorModel().canMoveUp());
+		}
+		
+		public void valueChanged(ListSelectionEvent e) {
+			updateEnabledState();			
+		}
+		public KeyStroke getKeyStroke() {
+			return keyStroke;
+		}
+	}
 	
 	class TablePopupLauncher extends PopupMenuLauncher {
@@ -170,4 +233,7 @@
 			addSeparator();
 			add(actDelete);
+			addSeparator();
+			add(actMoveUp);
+			add(actMoveDown);
 		}
 	}
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java	(revision 20675)
@@ -866,6 +866,10 @@
     
     /**
-     * Listens the changes of the preference {@see PreferenceKeys#ROAD_SIGNS}
-     * and refreshes the set of road icons 
+     * Listens to changes of the preference {@see PreferenceKeys#ROAD_SIGNS}
+     * and refreshes the set of road icons.
+     * 
+     * Listens to changes of the preference {@see PreferenceKeys#SHOW_VIAS_IN_BASIC_EDITOR}
+     * and toggles the visibility af the list of via-objects in the Basic
+     * Editor. 
      *
      */
@@ -876,6 +880,9 @@
     	
 		public void preferenceChanged(PreferenceChangeEvent evt) {			
-			if (!evt.getKey().equals(PreferenceKeys.ROAD_SIGNS)) return;
-			refreshIconSet();
+			if (evt.getKey().equals(PreferenceKeys.ROAD_SIGNS)){
+				refreshIconSet();
+			} else if (evt.getKey().equals(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR)) {
+				pnlBasicEditor.initViasVisibilityFromPreferences(Main.pref);
+			}			
 		}
     }
Index: plications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/IconPreferencePanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/IconPreferencePanel.java	(revision 20674)
+++ 	(revision )
@@ -1,182 +1,0 @@
-package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
-
-import java.awt.FlowLayout;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.util.logging.Logger;
-
-
-import javax.swing.BorderFactory;
-import javax.swing.ButtonGroup;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-
-import org.openstreetmap.josm.data.Preferences;
-import org.openstreetmap.josm.gui.widgets.HtmlPanel;
-import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
-import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionType;
-import org.openstreetmap.josm.tools.ImageProvider;
-
-/**
- * IconPreferencePanel allows to configure a set of road sign icons to be
- * used in the turnrestrictions plugin.
- * 
- */
-public class IconPreferencePanel extends VerticallyScrollablePanel {
-	private static final Logger logger = Logger.getLogger(IconPreferencePanel.class.getName());
-	private JRadioButton rbSetA;
-	private JRadioButton rbSetB;
-	private ButtonGroup bgIconSet;
-
-	/**
-	 * Builds the panel for the icon set "set-a"
-	 * 
-	 * @return
-	 */
-	protected JPanel buildSetAPanel() {
-		JPanel pnl = new JPanel(new GridBagLayout());;
-		GridBagConstraints gc = new GridBagConstraints();
-		gc.anchor = GridBagConstraints.NORTHWEST;
-		gc.fill = GridBagConstraints.HORIZONTAL;
-		gc.weightx = 1.0;
-		gc.gridx = 0;
-		gc.gridy = 0;
-		
-		pnl.add(rbSetA = new JRadioButton(tr("Road signs - Set A")),gc);
-		
-		JPanel icons = new JPanel(new FlowLayout(FlowLayout.LEFT));
-		for (TurnRestrictionType type: TurnRestrictionType.values()){
-			JLabel lbl = new JLabel();
-			icons.add(lbl);
-			lbl.setIcon(ImageProvider.get("types/set-a",type.getTagValue()));
-		}
-		
-		gc.gridy = 1;
-		gc.insets = new Insets(0,20,0,0);
-		pnl.add(icons, gc);
-		return pnl;		
-	}
-	
-	/**
-	 * Builds the panel for the icon set "set-b"
-	 * 
-	 * @return
-	 */
-	protected JPanel buildSetBPanel() {
-		JPanel pnl = new JPanel(new GridBagLayout());;
-		GridBagConstraints gc = new GridBagConstraints();
-		gc.anchor = GridBagConstraints.NORTHWEST;
-		gc.fill = GridBagConstraints.HORIZONTAL;
-		gc.weightx = 1.0;
-		gc.gridx = 0;
-		gc.gridy = 0;
-		
-		pnl.add(rbSetB = new JRadioButton(tr("Road signs - Set B")),gc);
-		
-		JPanel icons = new JPanel(new FlowLayout(FlowLayout.LEFT));
-		for (TurnRestrictionType type: TurnRestrictionType.values()){
-			JLabel lbl = new JLabel();
-			icons.add(lbl);
-			lbl.setIcon(ImageProvider.get("types/set-b",type.getTagValue()));
-		}
-		
-		gc.gridy = 1;
-		gc.insets = new Insets(0,20,0,0);
-		pnl.add(icons, gc);
-		return pnl;		
-	}
-	
-	/**
-	 * Builds the message panel at the top
-	 * 
-	 * @return
-	 */
-	protected JPanel buildMessagePanel() {
-		HtmlPanel pnl = new HtmlPanel();
-		pnl.setText(
-				"<html><body>"
-			  + tr("Please select the set of road sign icons to be used in the plugin.")
-			  + "</body></html>"
-		);
-		return pnl;
-	}
-	
-	/**
-	 * Builds the UI
-	 * 
-	 * @return
-	 */
-	protected void build() {			
-		setLayout(new GridBagLayout());
-		GridBagConstraints gc = new GridBagConstraints();
-		gc.anchor = GridBagConstraints.NORTHWEST;
-		gc.fill = GridBagConstraints.HORIZONTAL;
-		gc.weightx = 1.0;
-		gc.gridx = 0;
-		gc.gridy = 0;
-		
-		add(buildMessagePanel(), gc);
-		gc.gridy++;
-		add(buildSetAPanel(), gc);
-		gc.gridy++;
-		add(buildSetBPanel(), gc);
-		
-		// filler - just grab remaining space
-		gc.gridy++;
-		gc.fill = GridBagConstraints.BOTH;
-		gc.weighty = 1.0;
-		add(new JPanel(), gc);		 
-		
-		bgIconSet = new ButtonGroup();
-		bgIconSet.add(rbSetA);
-		bgIconSet.add(rbSetB);
-		
-		setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-	}
-	
-	/**
-	 * Initializes the UI from the current settings in the JOSM preferences
-	 * {@code prefs}
-	 * 
-	 * @param prefs the preferences 
-	 */
-	public void initFromPreferences(Preferences prefs){
-		String set = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
-		set = set.trim().toLowerCase();
-		if (! set.equals("set-a") && ! set.equals("set-b")) {
-			System.out.println(tr("Warning: the preference with key ''{0}'' has an unsupported value ''{1}''. Assuming the default value ''set-a''.", PreferenceKeys.ROAD_SIGNS, set));
-			set = "set-a";
-		}
-		if (set.equals("set-a")){
-			rbSetA.setSelected(true);
-		} else {
-			rbSetB.setSelected(true);
-		}
-	}
-	
-	/**
-	 * Saves the current settings to the JOSM preferences {@code prefs}.
-	 * 
-	 * @param prefs the preferences 
-	 */
-	public void saveToPreferences(Preferences prefs){
-		String set = null;
-		if (rbSetA.isSelected()){
-			set = "set-a";
-		} else {
-			set = "set-b";
-		}
-		String oldSet = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");		
-		if (!set.equals(oldSet)){
-			prefs.put(PreferenceKeys.ROAD_SIGNS, set);
-		}
-	}
-	
-	public IconPreferencePanel() {
-		build();
-	}	
-}
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceEditor.java	(revision 20675)
@@ -32,5 +32,5 @@
 public class PreferenceEditor extends JPanel implements PreferenceSetting{
 	
-	private IconPreferencePanel pnlIconPreferences;
+	private PreferencesPanel pnlIconPreferences;
 
 	/**
@@ -77,5 +77,5 @@
 		JPanel pnl = new JPanel(new BorderLayout());
 		
-		pnlIconPreferences = new IconPreferencePanel();
+		pnlIconPreferences = new PreferencesPanel();
 		pnlIconPreferences.initFromPreferences(Main.pref);
 		
@@ -93,6 +93,6 @@
 		tp.add(buildIconPreferencePanel());
 		tp.add(buildCreditPanel());		
-		tp.setTitleAt(0, tr("Road Signs"));
-		tp.setToolTipTextAt(0,tr("Configure the set of road sign icons to be used in the turnrestrictions plugin"));
+		tp.setTitleAt(0, tr("Preferences"));
+		tp.setToolTipTextAt(0,tr("Configure the preferences for the turnrestrictions plugin"));
 		tp.setTitleAt(1, tr("Sponsor"));
 		add(tp, BorderLayout.CENTER);
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java	(revision 20674)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java	(revision 20675)
@@ -17,3 +17,15 @@
 	 */
 	String ROAD_SIGNS = "turnrestrictions.road-signs";
+	
+	/**
+	 * Indicates whether the Basic Editor should include a widget for for displaying
+	 * and editing the via-objects of a turn restriction.
+	 * 
+	 * Supported values are:
+	 * <ul>
+	 *   <li><tt>true</tt> - display the list of vias in the basic editor </li>
+	 *    <li><tt>false</tt> - don't display the list of vias in the basic editor </li>
+	 * </ul>
+	 */
+	String SHOW_VIAS_IN_BASIC_EDITOR = "turnrestrictions.show-vias-in-basic-editor";
 }
Index: /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java
===================================================================
--- /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java	(revision 20675)
+++ /applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java	(revision 20675)
@@ -0,0 +1,220 @@
+package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.util.logging.Logger;
+
+
+import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+
+import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.gui.widgets.HtmlPanel;
+import org.openstreetmap.josm.gui.widgets.VerticallyScrollablePanel;
+import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionType;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+/**
+ * IconPreferencePanel allows to configure a set of road sign icons to be
+ * used in the turnrestrictions plugin.
+ * 
+ */
+public class PreferencesPanel extends VerticallyScrollablePanel {
+	private static final Logger logger = Logger.getLogger(PreferencesPanel.class.getName());
+	private JRadioButton rbSetA;
+	private JRadioButton rbSetB;
+	private ButtonGroup bgIconSet;
+	private JCheckBox cbShowViaListInBasicEditor;
+	
+	protected JPanel buildShowViaListInBasicEditorPanel() {
+		JPanel pnl = new JPanel(new GridBagLayout());
+		GridBagConstraints gc = new GridBagConstraints();
+		gc.anchor = GridBagConstraints.NORTHWEST;
+		gc.fill = GridBagConstraints.HORIZONTAL;
+		gc.weightx = 1.0;
+		gc.gridx = 0;
+		gc.gridy = 0;
+		
+		HtmlPanel msg = new HtmlPanel();
+		msg.setText("<html><body>"
+				+ tr("The Basic Editor can optionally display the list of via-objects "
+					 + "of a turn restrictions. If enabled, one can also edit them "
+					 + "in the Basic editor. If disabled, editing of via-objects is only "
+					 + "possible in the Advanced Editor."
+				  )
+				+ "</body></html>"
+	    );
+		pnl.add(msg, gc);
+		
+		gc.gridy++;
+		pnl.add(cbShowViaListInBasicEditor = new JCheckBox(tr("Display and edit list of via-objects in the Basic Editor")), gc);
+		return pnl;
+	}
+	
+	/**
+	 * Builds the panel for the icon set "set-a"
+	 * 
+	 * @return
+	 */
+	protected JPanel buildSetAPanel() {
+		JPanel pnl = new JPanel(new GridBagLayout());;
+		GridBagConstraints gc = new GridBagConstraints();
+		gc.anchor = GridBagConstraints.NORTHWEST;
+		gc.fill = GridBagConstraints.HORIZONTAL;
+		gc.weightx = 1.0;
+		gc.gridx = 0;
+		gc.gridy = 0;
+		
+		pnl.add(rbSetA = new JRadioButton(tr("Road signs - Set A")),gc);
+		
+		JPanel icons = new JPanel(new FlowLayout(FlowLayout.LEFT));
+		for (TurnRestrictionType type: TurnRestrictionType.values()){
+			JLabel lbl = new JLabel();
+			icons.add(lbl);
+			lbl.setIcon(ImageProvider.get("types/set-a",type.getTagValue()));
+		}
+		
+		gc.gridy = 1;
+		gc.insets = new Insets(0,20,0,0);
+		pnl.add(icons, gc);
+		return pnl;		
+	}
+	
+	/**
+	 * Builds the panel for the icon set "set-b"
+	 * 
+	 * @return
+	 */
+	protected JPanel buildSetBPanel() {
+		JPanel pnl = new JPanel(new GridBagLayout());;
+		GridBagConstraints gc = new GridBagConstraints();
+		gc.anchor = GridBagConstraints.NORTHWEST;
+		gc.fill = GridBagConstraints.HORIZONTAL;
+		gc.weightx = 1.0;
+		gc.gridx = 0;
+		gc.gridy = 0;
+		
+		pnl.add(rbSetB = new JRadioButton(tr("Road signs - Set B")),gc);
+		
+		JPanel icons = new JPanel(new FlowLayout(FlowLayout.LEFT));
+		for (TurnRestrictionType type: TurnRestrictionType.values()){
+			JLabel lbl = new JLabel();
+			icons.add(lbl);
+			lbl.setIcon(ImageProvider.get("types/set-b",type.getTagValue()));
+		}
+		
+		gc.gridy = 1;
+		gc.insets = new Insets(0,20,0,0);
+		pnl.add(icons, gc);
+		return pnl;		
+	}
+	
+	/**
+	 * Builds the message panel at the top
+	 * 
+	 * @return
+	 */
+	protected JPanel buildMessagePanel() {
+		HtmlPanel pnl = new HtmlPanel();
+		pnl.setText(
+				"<html><body>"
+			  + tr("Please select the set of road sign icons to be used in the plugin.")
+			  + "</body></html>"
+		);
+		return pnl;
+	}
+	
+	/**
+	 * Builds the UI
+	 * 
+	 * @return
+	 */
+	protected void build() {			
+		setLayout(new GridBagLayout());
+		GridBagConstraints gc = new GridBagConstraints();
+		gc.anchor = GridBagConstraints.NORTHWEST;
+		gc.fill = GridBagConstraints.HORIZONTAL;
+		gc.weightx = 1.0;
+		gc.gridx = 0;
+		gc.gridy = 0;
+		
+		add(buildMessagePanel(), gc);
+		gc.gridy++;
+		add(buildSetAPanel(), gc);
+		gc.gridy++;
+		add(buildSetBPanel(), gc);
+		gc.gridy++;
+		add(buildShowViaListInBasicEditorPanel(), gc);
+		
+		// filler - just grab remaining space
+		gc.gridy++;
+		gc.fill = GridBagConstraints.BOTH;
+		gc.weighty = 1.0;
+		add(new JPanel(), gc);		 
+		
+		bgIconSet = new ButtonGroup();
+		bgIconSet.add(rbSetA);
+		bgIconSet.add(rbSetB);
+		
+		setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+	}
+	
+	/**
+	 * Initializes the UI from the current settings in the JOSM preferences
+	 * {@code prefs}
+	 * 
+	 * @param prefs the preferences 
+	 */
+	public void initFromPreferences(Preferences prefs){
+		String set = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");
+		set = set.trim().toLowerCase();
+		if (! set.equals("set-a") && ! set.equals("set-b")) {
+			System.out.println(tr("Warning: the preference with key ''{0}'' has an unsupported value ''{1}''. Assuming the default value ''set-a''.", PreferenceKeys.ROAD_SIGNS, set));
+			set = "set-a";
+		}
+		if (set.equals("set-a")){
+			rbSetA.setSelected(true);
+		} else {
+			rbSetB.setSelected(true);
+		}
+		
+		boolean b = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
+		cbShowViaListInBasicEditor.setSelected(b);
+	}
+	
+	/**
+	 * Saves the current settings to the JOSM preferences {@code prefs}.
+	 * 
+	 * @param prefs the preferences 
+	 */
+	public void saveToPreferences(Preferences prefs){
+		String set = null;
+		if (rbSetA.isSelected()){
+			set = "set-a";
+		} else {
+			set = "set-b";
+		}
+		String oldSet = prefs.get(PreferenceKeys.ROAD_SIGNS, "set-a");		
+		if (!set.equals(oldSet)){
+			prefs.put(PreferenceKeys.ROAD_SIGNS, set);
+		}
+		
+		boolean newValue = cbShowViaListInBasicEditor.isSelected();
+		boolean oldValue = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
+		if (newValue != oldValue){
+			prefs.put(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, newValue);
+		}		
+	}
+	
+	public PreferencesPanel() {
+		build();
+	}	
+}
