Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/OSeaM.java	(revision 24786)
@@ -25,5 +25,5 @@
 		// TODO Auto-generated method stub
 System.out.println("start");
-		return false;
+		return true;
 	}
 
@@ -32,5 +32,5 @@
 		DataSet.removeSelectionListener(oseam.SmpListener);
 System.out.println("stop");
-		return false;
+		return true;
 	}
 
@@ -39,5 +39,5 @@
 System.out.println("hasFocus");
 		DataSet.addSelectionListener(oseam.SmpListener);
-		return false;
+		return true;
 	}
 
@@ -46,5 +46,5 @@
 		DataSet.removeSelectionListener(oseam.SmpListener);
 System.out.println("lostFocus");
-		return false;
+		return true;
 	}
 
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java	(revision 24786)
@@ -5,50 +5,31 @@
 import oseam.panels.*;
 
-import java.awt.Color;
 import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Rectangle;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.ComponentListener;
-import java.awt.event.FocusAdapter;
-import java.awt.event.FocusEvent;
-import java.awt.event.ItemEvent;
-import java.awt.event.ItemListener;
-import java.beans.PropertyChangeListener;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.Map;
 
-import javax.swing.BorderFactory;
-import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JMenuItem;
 import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JTextField;
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
-import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.SelectionChangedListener;
 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.gui.MapView.EditLayerChangeListener;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 
 import oseam.Messages;
-import oseam.OSeaM;
 import oseam.seamarks.SeaMark;
+import oseam.seamarks.MarkCard;
+import oseam.seamarks.MarkIsol;
+import oseam.seamarks.MarkLat;
+import oseam.seamarks.MarkLight;
+import oseam.seamarks.MarkSpec;
+import oseam.seamarks.MarkUkn;
+import oseam.seamarks.MarkSaw;
 
 public class OSeaMAction {
 
 	private OSeaMAction dia = null;
-	private PanelMain panelMain = null;
+	public PanelMain panelMain = null;
 
 	private SeaMark mark = null;
@@ -69,6 +50,6 @@
 							SelNode = node;
 System.out.println(node);
-//							parseSeaMark();
-//							mark.paintSign();
+							parseSeaMark();
+							mark.paintSign();
 						}
 				}
@@ -112,7 +93,7 @@
 
 		ds = Main.main.getCurrentDataSet();
-/*
+
 		if (ds == null) {
-			mark = new MarkUkn(this, Messages.getString("SmpDialogAction.26"));
+			mark = new MarkUkn(this, tr("Active layer contains no OSM data"));
 			mark.setNode(null);
 			return;
@@ -123,5 +104,5 @@
 
 		if (nodes == 0) {
-			mark = new MarkUkn(this, Messages.getString("SmpDialogAction.27"));
+			mark = new MarkUkn(this, tr("Please select a node"));
 			mark.setNode(null);
 			return;
@@ -129,5 +110,5 @@
 
 		if (nodes > 1) {
-			mark = new MarkUkn(this, Messages.getString("SmpDialogAction.28"));
+			mark = new MarkUkn(this, tr("Please select only one node"));
 			mark.setNode(null);
 			return;
@@ -136,10 +117,4 @@
 		Iterator<Node> it = selection.iterator();
 		node = it.next();
-
-		cM01IconVisible.setEnabled(true);
-		cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
-				"/images/Auge.png"))); //$NON-NLS-1$
-
-		cbM01TypeOfMark.setEnabled(true);
 
 		String type = "";
@@ -173,5 +148,5 @@
 		} else if (type.equals("landmark") || type.equals("light_vessel")
 				|| type.equals("light_major") || type.equals("light_minor")) {
-			mark = new MarkNota(this, node);
+			mark = new MarkLight(this, node);
 			return;
 
@@ -268,5 +243,5 @@
 		mark.paintSign();
 		return;
-*/	}
+	}
 
 }
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelHaz.java	(revision 24786)
@@ -25,16 +25,16 @@
 
 	private ButtonGroup catButtons = null;
-	private JRadioButton northButton = null;
-	private JRadioButton southButton = null;
-	private JRadioButton eastButton = null;
-	private JRadioButton westButton = null;
-	private JRadioButton isolButton = null;
+	public JRadioButton northButton = null;
+	public JRadioButton southButton = null;
+	public JRadioButton eastButton = null;
+	public JRadioButton westButton = null;
+	public JRadioButton isolButton = null;
 
 	private ButtonGroup shapeButtons = null;
-	private JRadioButton pillarButton = null;
-	private JRadioButton sparButton = null;
-	private JRadioButton floatButton = null;
-	private JRadioButton beaconButton = null;
-	private JRadioButton towerButton = null;
+	public JRadioButton pillarButton = null;
+	public JRadioButton sparButton = null;
+	public JRadioButton floatButton = null;
+	public JRadioButton beaconButton = null;
+	public JRadioButton towerButton = null;
 
 	public PanelHaz() {
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java	(revision 24786)
@@ -58,8 +58,8 @@
 	private JButton saveButton = null;
 	private ButtonGroup typeButtons = null;
-	private JRadioButton chanButton = null;
-	private JRadioButton hazButton = null;
-	private JRadioButton specButton = null;
-	private JRadioButton lightsButton = null;
+	public JRadioButton chanButton = null;
+	public JRadioButton hazButton = null;
+	public JRadioButton specButton = null;
+	public JRadioButton lightsButton = null;
 	private ButtonGroup miscButtons = null;
 	private JRadioButton topButton = null;
@@ -67,8 +67,8 @@
 	private JRadioButton radarButton = null;
 	private JRadioButton litButton = null;
-	private PanelChan panelChan = null;
-	private PanelHaz panelHaz = null;
-	private PanelSpec panelSpec = null;
-	private PanelLights panelLights = null;
+	public PanelChan panelChan = null;
+	public PanelHaz panelHaz = null;
+	public PanelSpec panelSpec = null;
+	public PanelLights panelLights = null;
 	private PanelTop panelTop = null;
 	private PanelFog panelFog = null;
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkCard.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkCard.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkCard.java	(revision 24786)
@@ -3,11 +3,6 @@
 import java.util.Map;
 
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.Node;
 
-import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
 import oseam.seamarks.SeaMark;
@@ -22,109 +17,102 @@
 		keys = node.getKeys();
 		setNode(node);
-/*
-		dlg.cbM01TypeOfMark.setSelectedIndex(CARDINAL);
-
-		dlg.cbM01CatOfMark.removeAllItems();
-		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$
-		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.158")); //$NON-NLS-1$
-		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.159")); //$NON-NLS-1$
-		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.160")); //$NON-NLS-1$
-		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.161")); //$NON-NLS-1$
-
-		dlg.cbM01CatOfMark.setEnabled(true);
-		dlg.cbM01CatOfMark.setVisible(true);
-		dlg.lM01CatOfMark.setVisible(true);
-
-		dlg.cbM01StyleOfMark.removeAllItems();
-		dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
-		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$
-		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$
-		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$
-		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$
-		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$
-		dlg.cbM01StyleOfMark.setVisible(true);
-		dlg.lM01StyleOfMark.setVisible(true);
-*/
-		setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$
-		if (keys.containsKey("name")) //$NON-NLS-1$
-			setName(keys.get("name")); //$NON-NLS-1$
-
-		if (keys.containsKey("seamark:name")) //$NON-NLS-1$
-			setName(keys.get("seamark:name")); //$NON-NLS-1$
-
-		if (keys.containsKey("seamark:buoy_cardinal:name")) //$NON-NLS-1$
-			setName(keys.get("seamark:buoy_cardinal:name")); //$NON-NLS-1$
-		else if (keys.containsKey("seamark:beacon_cardinal:name")) //$NON-NLS-1$
-			setName(keys.get("seamark:beacon_cardinal:name")); //$NON-NLS-1$
-		else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$
-			setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$
-
-		String cat = ""; //$NON-NLS-1$
-		String col = ""; //$NON-NLS-1$
-
-		if (keys.containsKey("seamark:buoy_cardinal:category")) //$NON-NLS-1$
-			cat = keys.get("seamark:buoy_cardinal:category"); //$NON-NLS-1$
-		else if (keys.containsKey("seamark:beacon_cardinal:category")) //$NON-NLS-1$
-			cat = keys.get("seamark:beacon_cardinal:category"); //$NON-NLS-1$
-
-		if (keys.containsKey("seamark:buoy_cardinal:colour")) //$NON-NLS-1$
-			col = keys.get("seamark:buoy_cardinal:colour"); //$NON-NLS-1$
-		else if (keys.containsKey("seamark:beacon_cardinal:colour")) //$NON-NLS-1$
-			col = keys.get("seamark:beacon_cardinal:colour"); //$NON-NLS-1$
-		else if (keys.containsKey("seamark:light_float:colour")) //$NON-NLS-1$
-			col = keys.get("seamark:light_float:colour"); //$NON-NLS-1$
-
-		if (cat.isEmpty()) { //$NON-NLS-1$
-			if (col.equals("black;yellow")) { //$NON-NLS-1$
-				setMarkIndex(CARD_NORTH);
-				setColour(BLACK_YELLOW);
-			} else if (col.equals("black;yellow;black")) { //$NON-NLS-1$
-				setMarkIndex(CARD_EAST);
-				setColour(BLACK_YELLOW_BLACK);
-			} else if (col.equals("yellow;black")) { //$NON-NLS-1$
-				setMarkIndex(CARD_SOUTH);
-				setColour(YELLOW_BLACK);
-			} else if (col.equals("yellow;black;yellow")) { //$NON-NLS-1$
-				setMarkIndex(CARD_WEST);
-				setColour(YELLOW_BLACK_YELLOW);
-			}
-		} else if (cat.equals("north")) { //$NON-NLS-1$
-			setMarkIndex(CARD_NORTH);
-			setColour(BLACK_YELLOW);
-		} else if (cat.equals("east")) { //$NON-NLS-1$
-			setMarkIndex(CARD_EAST);
-			setColour(BLACK_YELLOW_BLACK);
-		} else if (cat.equals("south")) { //$NON-NLS-1$
-			setMarkIndex(CARD_SOUTH);
-			setColour(YELLOW_BLACK);
-		} else if (cat.equals("west")) { //$NON-NLS-1$
-			setMarkIndex(CARD_WEST);
-			setColour(YELLOW_BLACK_YELLOW);
-		}
-
-		if (keys.containsKey("seamark:buoy_cardinal:shape")) { //$NON-NLS-1$
-			str = keys.get("seamark:buoy_cardinal:shape"); //$NON-NLS-1$
-
-			if (str.equals("pillar")) //$NON-NLS-1$
-				setStyleIndex(CARD_PILLAR);
-			else if (str.equals("spar")) //$NON-NLS-1$
-				setStyleIndex(CARD_SPAR);
-		} else if (keys.containsKey("seamark:beacon_cardinal:colour")) { //$NON-NLS-1$
-			if (keys.containsKey("seamark:beacon_cardinal:shape")) { //$NON-NLS-1$
-				str = keys.get("seamark:beacon_cardinal:shape"); //$NON-NLS-1$
-
-				if (str.equals("tower")) //$NON-NLS-1$
-					setStyleIndex(CARD_TOWER);
-				else
-					setStyleIndex(CARD_BEACON);
-			} else
-				setStyleIndex(CARD_BEACON);
-		} else if (keys.containsKey("seamark:type") //$NON-NLS-1$
-				&& (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$
-			setStyleIndex(CARD_FLOAT);
-		}
-
-//		if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
-//			setStyleIndex(0);
+		
+		if (!dlg.panelMain.hazButton.isSelected())
+			dlg.panelMain.hazButton.doClick();
+
+		if (keys.containsKey("name"))
+			setName(keys.get("name"));
+
+		if (keys.containsKey("seamark:name"))
+			setName(keys.get("seamark:name"));
+
+		if (keys.containsKey("seamark:buoy_cardinal:name"))
+			setName(keys.get("seamark:buoy_cardinal:name"));
+		else if (keys.containsKey("seamark:beacon_cardinal:name"))
+			setName(keys.get("seamark:beacon_cardinal:name"));
+		else if (keys.containsKey("seamark:light_float:name"))
+			setName(keys.get("seamark:light_float:name"));
+
+		String cat = "";
+		String col = "";
+
+		if (keys.containsKey("seamark:buoy_cardinal:category"))
+			cat = keys.get("seamark:buoy_cardinal:category");
+		else if (keys.containsKey("seamark:beacon_cardinal:category"))
+			cat = keys.get("seamark:beacon_cardinal:category");
+
+		if (keys.containsKey("seamark:buoy_cardinal:colour"))
+			col = keys.get("seamark:buoy_cardinal:colour");
+		else if (keys.containsKey("seamark:beacon_cardinal:colour"))
+			col = keys.get("seamark:beacon_cardinal:colour");
+		else if (keys.containsKey("seamark:light_float:colour"))
+			col = keys.get("seamark:light_float:colour");
+
+		if (cat.isEmpty()) {
+			if (col.equals("black;yellow")) {
+				dlg.panelMain.panelHaz.northButton.doClick();
+				setCategory(Cat.CARD_NORTH);
+				setColour(Col.BLACK_YELLOW);
+			} else if (col.equals("black;yellow;black")) {
+				dlg.panelMain.panelHaz.eastButton.doClick();
+				setCategory(Cat.CARD_EAST);
+				setColour(Col.BLACK_YELLOW_BLACK);
+			} else if (col.equals("yellow;black")) {
+				dlg.panelMain.panelHaz.southButton.doClick();
+				setCategory(Cat.CARD_SOUTH);
+				setColour(Col.YELLOW_BLACK);
+			} else if (col.equals("yellow;black;yellow")) {
+				dlg.panelMain.panelHaz.westButton.doClick();
+				setCategory(Cat.CARD_WEST);
+				setColour(Col.YELLOW_BLACK_YELLOW);
+			}
+		} else if (cat.equals("north")) {
+			dlg.panelMain.panelHaz.northButton.doClick();
+			setCategory(Cat.CARD_NORTH);
+			setColour(Col.BLACK_YELLOW);
+		} else if (cat.equals("east")) {
+			dlg.panelMain.panelHaz.eastButton.doClick();
+			setCategory(Cat.CARD_EAST);
+			setColour(Col.BLACK_YELLOW_BLACK);
+		} else if (cat.equals("south")) {
+			dlg.panelMain.panelHaz.southButton.doClick();
+			setCategory(Cat.CARD_SOUTH);
+			setColour(Col.YELLOW_BLACK);
+		} else if (cat.equals("west")) {
+			dlg.panelMain.panelHaz.westButton.doClick();
+			setCategory(Cat.CARD_WEST);
+			setColour(Col.YELLOW_BLACK_YELLOW);
+		}
+
+		if (keys.containsKey("seamark:buoy_cardinal:shape")) {
+			str = keys.get("seamark:buoy_cardinal:shape");
+
+			if (str.equals("pillar")) {
+				dlg.panelMain.panelHaz.pillarButton.doClick();
+				setShape(Styl.PILLAR);
+			} else if (str.equals("spar")) {
+				dlg.panelMain.panelHaz.sparButton.doClick();
+				setShape(Styl.SPAR);
+			}
+		} else if (keys.containsKey("seamark:beacon_cardinal:colour")) {
+			if (keys.containsKey("seamark:beacon_cardinal:shape")) {
+				str = keys.get("seamark:beacon_cardinal:shape");
+
+				if (str.equals("tower")) {
+					setShape(Styl.TOWER);
+					dlg.panelMain.panelHaz.towerButton.doClick();
+				} else {
+					dlg.panelMain.panelHaz.beaconButton.doClick();
+					setShape(Styl.BEACON);
+				}
+			} else {
+				dlg.panelMain.panelHaz.beaconButton.doClick();
+				setShape(Styl.BEACON);
+			}
+		} else if (keys.containsKey("seamark:type")
+				&& (keys.get("seamark:type").equals("light_float"))) {
+			dlg.panelMain.panelHaz.floatButton.doClick();
+			setShape(Styl.FLOAT);
+		}
 
 //		refreshLights();
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkIsol.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkIsol.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkIsol.java	(revision 24786)
@@ -3,11 +3,6 @@
 import java.util.Map;
 
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.Node;
 
-import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
 import oseam.seamarks.SeaMark;
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLat.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLat.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLat.java	(revision 24786)
@@ -3,11 +3,6 @@
 import java.util.Map;
 
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.Node;
 
-import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
 
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLight.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLight.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLight.java	(revision 24786)
@@ -3,11 +3,6 @@
 import java.util.Map;
 
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.Node;
 
-import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
 import oseam.seamarks.SeaMark;
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSaw.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSaw.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSaw.java	(revision 24786)
@@ -3,11 +3,6 @@
 import java.util.Map;
 
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.Node;
 
-import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
 import oseam.seamarks.SeaMark;
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSpec.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSpec.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSpec.java	(revision 24786)
@@ -3,11 +3,6 @@
 import java.util.Map;
 
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangePropertyCommand;
 import org.openstreetmap.josm.data.osm.Node;
 
-import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
 import oseam.seamarks.SeaMark;
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkUkn.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkUkn.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkUkn.java	(revision 24786)
@@ -1,7 +1,3 @@
 package oseam.seamarks;
-
-import javax.swing.ImageIcon;
-
-import org.openstreetmap.josm.Main;
 
 import oseam.dialogs.OSeaMAction;
Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 24779)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 24786)
@@ -11,98 +11,18 @@
 abstract public class SeaMark {
 
-	/**
-	 * CONSTANTS
-	 */
+	public enum Type {UNKNOWN_TYPE, LATERAL, CARDINAL, SAFE_WATER, ISOLATED_DANGER, SPECIAL_PURPOSE, LIGHT}
 
-	/**
-	 * Colours
-	 */
+	public enum Cat {UNKNOWN_CAT, PORT_HAND, STARBOARD_HAND, PREF_PORT_HAND, PREF_STARBOARD_HAND, CARD_NORTH, CARD_EAST, CARD_SOUTH, CARD_WEST, LIGHT_HOUSE, LIGHT_MAJOR, LIGHT_MINOR, LIGHT_VESSEL}
 
-	public final static int UNKNOWN_COLOUR = 0;
-	public final static int RED = 1;
-	public final static int GREEN = 2;
-	public final static int RED_GREEN_RED = 3;
-	public final static int GREEN_RED_GREEN = 4;
-	public final static int RED_WHITE = 5;
-	public final static int BLACK_YELLOW = 6;
-	public final static int BLACK_YELLOW_BLACK = 7;
-	public final static int YELLOW_BLACK = 8;
-	public final static int YELLOW_BLACK_YELLOW = 9;
-	public final static int BLACK_RED_BLACK = 10;
-	public final static int YELLOW = 11;
+	public final static boolean IALA_A = false;
+	public final static boolean IALA_B = true;
+
+	public enum Styl {UNKNOWN_SHAPE, PILLAR, SPAR, CAN, CONE, SPHERE, BARREL, FLOAT, SUPER, BEACON, TOWER, STAKE, PERCH}
+
+	public enum Col {UNKNOWN_COLOUR, RED, GREEN, RED_GREEN_RED, GREEN_RED_GREEN, RED_WHITE, BLACK_YELLOW, BLACK_YELLOW_BLACK, YELLOW_BLACK, YELLOW_BLACK_YELLOW, BLACK_RED_BLACK, YELLOW}
+	
 	public final static int WHITE_LIGHT = 1;
 	public final static int RED_LIGHT = 2;
 	public final static int GREEN_LIGHT = 3;
-
-	/**
-	 * Types - correspond to TypeIndex
-	 */
-	public final static int UNKNOWN_TYPE = 0;
-	public final static int LATERAL = 1;
-	public final static int CARDINAL = 2;
-	public final static int SAFE_WATER = 3;
-	public final static int ISOLATED_DANGER = 4;
-	public final static int SPECIAL_PURPOSE = 5;
-	public final static int LIGHT = 6;
-
-	/**
-	 * Categories - correspond to CatIndex
-	 */
-	public final static int UNKNOWN_CAT = 0;
-	public final static int PORT_HAND = 1;
-	public final static int STARBOARD_HAND = 2;
-	public final static int PREF_PORT_HAND = 3;
-	public final static int PREF_STARBOARD_HAND = 4;
-	public final static int CARD_NORTH = 1;
-	public final static int CARD_EAST = 2;
-	public final static int CARD_SOUTH = 3;
-	public final static int CARD_WEST = 4;
-	public final static int LIGHT_HOUSE = 1;
-	public final static int LIGHT_MAJOR = 2;
-	public final static int LIGHT_MINOR = 3;
-	public final static int LIGHT_VESSEL = 4;
-
-	/**
-	 * Regions
-	 */
-	public final static boolean IALA_A = false;
-	public final static boolean IALA_B = true;
-
-	/**
-	 * Shapes - correspond to StyleIndex
-	 */
-	public final static int UNKNOWN_SHAPE = 0;
-	public final static int LAT_CAN = 1;
-	public final static int LAT_CONE = 1;
-	public final static int LAT_PILLAR = 2;
-	public final static int LAT_SPAR = 3;
-	public final static int LAT_BEACON = 4;
-	public final static int LAT_TOWER = 5;
-	public final static int LAT_FLOAT = 6;
-	public final static int LAT_PERCH = 7;
-	public final static int CARD_PILLAR = 1;
-	public final static int CARD_SPAR = 2;
-	public final static int CARD_BEACON = 3;
-	public final static int CARD_TOWER = 4;
-	public final static int CARD_FLOAT = 5;
-	public final static int SAFE_PILLAR = 1;
-	public final static int SAFE_SPAR = 2;
-	public final static int SAFE_SPHERE = 3;
-	public final static int SAFE_BEACON = 4;
-	public final static int SAFE_FLOAT = 5;
-	public final static int ISOL_PILLAR = 1;
-	public final static int ISOL_SPAR = 2;
-	public final static int ISOL_BEACON = 3;
-	public final static int ISOL_TOWER = 4;
-	public final static int ISOL_FLOAT = 5;
-	public final static int SPEC_PILLAR = 1;
-	public final static int SPEC_CAN = 2;
-	public final static int SPEC_CONE = 3;
-	public final static int SPEC_SPAR = 4;
-	public final static int SPEC_BEACON = 5;
-	public final static int SPEC_TOWER = 6;
-	public final static int SPEC_FLOAT = 7;
-	public final static int SPEC_SPHERE = 8;
-	public final static int SPEC_BARREL = 9;
 
 	/**
@@ -148,6 +68,6 @@
 	}
 
-	public void setDlg(OSeaMAction dlg) {
-		this.dlg = dlg;
+	public void setDlg(OSeaMAction dia) {
+		this.dlg = dia;
 	}
 
@@ -156,76 +76,72 @@
 	}
 
-	private Node Node = null;
+	private Node node = null;
 
 	public Node getNode() {
-		return Node;
+		return node;
 	}
 
-	public void setNode(Node node) {
-		Node = node;
+	public void setNode(Node nod) {
+		node = nod;
 	}
 
-	private boolean Region = false;
+	private boolean region = false;
 
 	public boolean getRegion() {
-		return Region;
+		return region;
 	}
 
-	public void setRegion(boolean region) {
-		Region = region;
+	public void setRegion(boolean reg) {
+		region = reg;
 	}
 
-	private int Colour = UNKNOWN_COLOUR;
+	private Col colour = Col.UNKNOWN_COLOUR;
 
-	public int getColour() {
-		return Colour;
+	public Col getColour() {
+		return colour;
 	}
 
-	public void setColour(int colour) {
-		if (colour < UNKNOWN_COLOUR || colour > RED_WHITE) {
-			return;
-		}
-		Colour = colour;
-
+	public void setColour(Col col) {
+		colour = col;
 	}
 
-	private String ErrMsg = null;
+	private String errMsg = null;
 
 	public String getErrMsg() {
-		return ErrMsg;
+		return errMsg;
 	}
 
-	public void setErrMsg(String errMsg) {
-		ErrMsg = errMsg;
+	public void setErrMsg(String msg) {
+		errMsg = msg;
 	}
 
-	private String Name;
+	private String name;
 
 	public String getName() {
-		return Name;
+		return name;
 	}
 
-	public void setName(String name) {
-		Name = name;
+	public void setName(String nam) {
+		name = nam;
 	}
 
-	private int MarkIndex = 0;
+	private Cat category = Cat.UNKNOWN_CAT;
 
-	public int getMarkIndex() {
-		return MarkIndex;
+	public Cat getCategory() {
+		return category;
 	}
 
-	public void setMarkIndex(int buoyIndex) {
-		MarkIndex = buoyIndex;
+	public void setCategory(Cat cat) {
+		category = cat;
 	}
 
-	private int StyleIndex = 0;
+	private Styl shape = Styl.UNKNOWN_SHAPE;
 
-	public int getStyleIndex() {
-		return StyleIndex;
+	public Styl getShape() {
+		return shape;
 	}
 
-	public void setStyleIndex(int styleIndex) {
-		StyleIndex = styleIndex;
+	public void setShape(Styl styl) {
+		shape = styl;
 	}
 
