Index: applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 23269)
@@ -62,413 +62,413 @@
 
 public class SmpDialogAction extends JosmAction {
-    private static final long serialVersionUID = -2976230949744302905L;
-
-    /**
-     * lokale Variable, private
-     */
-    private SmpDialogAction dia = null; // Variable für den Handle von
-                                                                            // SmpDialogAction
-    private Buoy buoy = null; // Variable für Objekte des Typs "Tonne" //
-                                                        // @jve:decl-index=0:
-    private boolean isOpen = false; // zeigt den Status des Dialogs an
-    private Node onode = null; // gemerkter Knoten
-    private Buoy obuoy = null; // gemerkte Tonne // @jve:decl-index=0:
-    private JMenuItem SmpItem = null; // Info über item in der Werkzeugleiste
-    private String smt = ""; // value vom key "seamark:type" // @jve:decl-index=0: //$NON-NLS-1$
-    private String smb = ""; // value vom key "seamark" // @jve:decl-index=0: //$NON-NLS-1$
-    private Collection<? extends OsmPrimitive> Selection = null; // @jve:decl-index=0:
-    private OsmPrimitive SelNode = null;
-    private String Os = ""; // @jve:decl-index=0: //$NON-NLS-1$
-    private String UserHome = ""; // @jve:decl-index=0: //$NON-NLS-1$
-
-    // SelectionChangedListner der in die Eventqueue von josm eingehängt wird
-    private SelectionChangedListener SmpListener = new SelectionChangedListener() {
-        public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
-            Node node;
-            Selection = newSelection;
-
-            // System.out.println("hello");
-            for (OsmPrimitive osm : Selection) {
-                if (osm instanceof Node) {
-                    node = (Node) osm;
-                    if (Selection.size() == 1)
-                        // Absicherung gegen Doppelevents
-                        if (node.compareTo(SelNode) != 0) {
-                            SelNode = node;
-                            parseSeaMark();
-                            buoy.paintSign();
-                        }
-                }
-            }
-
-            Selection = null;
-
-        }
-    };
-
-    /**
-     * lokale Variable der Maske
-     */
-    private JDialog dM01SeaMap = null;
-    private JPanel pM01SeaMap = null;
-    private JLabel lM01Head = null;
-    private JLabel lM01Region = null;
-    private JLabel lM02Region = null;
-    public ButtonGroup bgM01Region = null;
-    public JRadioButton rbM01RegionA = null;
-    public JRadioButton rbM01RegionB = null;
-    public JLabel lM01Icon = null; // Shape
-    public JLabel lM02Icon = null; // Light
-    public JLabel lM03Icon = null; // Reflector
-    public JLabel lM04Icon = null; // Racon
-    public JLabel lM05Icon = null; // Fog
-    public JLabel lM06Icon = null; // Topmark
-    public JLabel lM01NameMark = null;
-    public JLabel lM01FireMark = null;
-    public JLabel lM01FogMark = null;
-    public JLabel lM01RadarMark = null;
-    private JLabel lM01TypeOfMark = null;
-    public JComboBox cbM01TypeOfMark = null;
-    public JLabel lM01CatOfMark = null;
-    public JComboBox cbM01CatOfMark = null;
-    public JLabel lM01StyleOfMark = null;
-    public JComboBox cbM01StyleOfMark = null;
-    private JLabel lM01Name = null;
-    public JTextField tfM01Name = null;
-    private JLabel lM01Props02 = null;
-    public JCheckBox cM01TopMark = null;
-    public JComboBox cbM01TopMark = null;
-    public JCheckBox cM01Radar = null;
-    public JCheckBox cM01Racon = null;
-    public JComboBox cbM01Racon = null;
-    public JTextField tfM01Racon = null;
-    public JLabel lM01Racon = null;
-    public JCheckBox cM01Fog = null;
-    public JComboBox cbM01Fog = null;
-    public JLabel lM01FogGroup = null;
-    public JTextField tfM01FogGroup = null;
-    public JLabel lM01FogPeriod = null;
-    public JTextField tfM01FogPeriod = null;
-    public JCheckBox cM01Fired = null;
-    public ButtonGroup bgM01Fired = null;
-    public JRadioButton rbM01Fired1 = null;
-    public JRadioButton rbM01FiredN = null;
-    public JLabel lM01Kennung = null;
-    public JComboBox cbM01Kennung = null;
-    public JLabel lM01Height = null;
-    public JTextField tfM01Height = null;
-    public JLabel lM01Range = null;
-    public JTextField tfM01Range = null;
-    public JLabel lM01Group = null;
-    public JTextField tfM01Group = null;
-    public JLabel lM01RepeatTime = null;
-    public JTextField tfM01RepeatTime = null;
-    public JLabel lM01Sector = null;
-    public JComboBox cbM01Sector = null;
-    public JLabel lM01Colour = null;
-    public JComboBox cbM01Colour = null;
-    public JLabel lM01Bearing = null;
-    public JTextField tfM01Bearing = null;
-    public JTextField tfM02Bearing = null;
-    public JTextField tfM01Radius = null;
-    public JButton bM01Save = null;
-    public JButton bM01Close = null;
-    public JCheckBox cM01IconVisible = null;
-    public JTextField sM01StatusBar = null;
-
-    public boolean paintlock = false;
-
-    public JMenuItem getSmpItem() {
-        return SmpItem;
-    }
-
-    public void setSmpItem(JMenuItem smpItem) {
-        SmpItem = smpItem;
-    }
-
-    public boolean isOpen() {
-        return isOpen;
-    }
-
-    public void setOpen(boolean isOpen) {
-        this.isOpen = isOpen;
-    }
-
-    public String getOs() {
-        return Os;
-    }
-
-    public void setOs(String os) {
-        Os = os;
-    }
-
-    public String getUserHome() {
-        return UserHome;
-    }
-
-    public void setUserHome(String userHome) {
-        UserHome = userHome;
-    }
-
-    public SmpDialogAction() {
-        super(
-                Messages.getString("SmpDialogAction.4"), "Smp", Messages.getString("SmpDialogAction.0"), Shortcut //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                        .registerShortcut(
-                                "tools:Semarks", //$NON-NLS-1$
-                                tr("Tool: {0}", Messages.getString("SmpDialogAction.9")), KeyEvent.VK_S, //$NON-NLS-1$ //$NON-NLS-2$
-                                Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
-
-        dia = this;
-        String str = Main.pref.get("mappaint.style.sources"); //$NON-NLS-1$
-        if (!str.contains("dev.openseamap.org")) { //$NON-NLS-1$
-            if (!str.isEmpty()) //$NON-NLS-1$
-                str += new String(new char[] { 0x1e });
-            Main.pref.put("mappaint.style.sources", str //$NON-NLS-1$
-                    + "http://dev.openseamap.org/josm/seamark_styles.xml"); //$NON-NLS-1$
-        }
-        str = Main.pref.get("color.background"); //$NON-NLS-1$
-        if (str.equals("#000000") || str.isEmpty()) //$NON-NLS-1$ //$NON-NLS-2$
-            Main.pref.put("color.background", "#606060"); //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    public void CloseDialog() {
-        onode = null;
-        DataSet.removeSelectionListener(SmpListener);
-        Selection = null;
-
-        if (isOpen)
-            dM01SeaMap.dispose();
-        isOpen = false;
-
-    }
-
-    public void actionPerformed(ActionEvent e) {
-
-        /*
-         * int option = JOptionPane.showConfirmDialog(Main.parent,
-         * tr("THIS IS EXPERIMENTAL. Save your work and verify before uploading.\n"
-         * + "Are you really sure to continue?"),
-         * tr("Please abort if you are not sure"), JOptionPane.YES_NO_OPTION,
-         * JOptionPane.WARNING_MESSAGE);
-         *
-         * if (option != JOptionPane.YES_OPTION) { return; }
-         */
-
-        onode = null;
-        obuoy = null;
-
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                JDialog dialog = getDM01SeaMap();
-
-                if (SmpItem == null) {
-                }
-                dialog.setVisible(true);
-            }
-        });
-
-        setOpen(true);
-
-        if (SmpItem == null) {
-            return;
-        }
-        SmpItem.setEnabled(false);
-
-        // Ausprobe: Möglichkeit der Benachrichtigung, wenn etwas neu
-        // selektiert wird (ueber SelectionChangedListener)
-        // private Collection<? extends OsmPrimitive> sel;
-        // siehe org.openstreetmap.josm.plugins.osb -> OsbLayer.java
-        // Einhängen des Listeners in die Eventqueue von josm
-        DataSet.addSelectionListener(SmpListener);
-    }
-
-    private void PicRebuild() {
-
-        DataSet ds = Main.main.getCurrentDataSet();
-
-        if (obuoy == null) {
-            return;
-        }
-
-        Node n = obuoy.getNode();
-
-        if (n != null) {
-            Command c;
-
-            if (smb != "") { //$NON-NLS-1$
-
-                c = new ChangePropertyCommand(n, "seamark", smb); //$NON-NLS-1$
-                c.executeCommand();
-                ds.fireSelectionChanged();
-
-                smb = ""; //$NON-NLS-1$
-            }
-
-            if (smt != "") { //$NON-NLS-1$
-
-                c = new ChangePropertyCommand(n, "seamark:type", smt); //$NON-NLS-1$
-                c.executeCommand();
-                ds.fireSelectionChanged();
-
-                smt = ""; //$NON-NLS-1$
-            }
-        }
-
-        obuoy = null;
-
-    }
-
-    private void parseSeaMark() {
-
-        int nodes = 0;
-        Node node = null;
-        Collection<Node> selection = null;
-        Map<String, String> keys;
-        DataSet ds;
-
-        ds = Main.main.getCurrentDataSet();
-
-        if (ds == null) {
-            buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.26")); //$NON-NLS-1$
-            buoy.setNode(null);
-            return;
-        }
-
-        selection = ds.getSelectedNodes();
-        nodes = selection.size();
-
-        if (nodes == 0) {
-            buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.27")); //$NON-NLS-1$
-            buoy.setNode(null);
-            return;
-        }
-
-        if (nodes > 1) {
-            buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.28")); //$NON-NLS-1$
-            buoy.setNode(null);
-            return;
-        }
-
-        Iterator<Node> it = selection.iterator();
-        node = it.next();
-
-        if (onode != null)
-            if (node.equals(onode))
-                return;
-
-        // Knoten wurde gewechselt -> die alten tags (benutzt zum Ausblenden der
-        // Pictogramme) wiederherstellen
-        if (obuoy != null)
-            PicRebuild();
-
-        onode = node;
-
-        cM01IconVisible.setEnabled(true);
-        cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
-                "/images/Auge.png"))); //$NON-NLS-1$
-
-        cbM01TypeOfMark.setEnabled(true);
-
-        // Soweit das Vorspiel. Ab hier beginnt das Parsen
-        String type = ""; //$NON-NLS-1$
-        String str = ""; //$NON-NLS-1$
-
-        keys = node.getKeys();
-
-        // vorsorglich den Namen holen und verwenden, wenn es ein
-        // Seezeichen ist. Name kann durch die weiteren Tags ueber-
-        // schrieben werden
-
-        if (keys.containsKey("seamark:type")) //$NON-NLS-1$
-            type = keys.get("seamark:type"); //$NON-NLS-1$
-
-        if (type.equals("buoy_lateral") || type.equals("beacon_lateral") //$NON-NLS-1$ //$NON-NLS-2$
-                || keys.containsKey("seamark:buoy_lateral:category") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_lateral:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_lateral:colour") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_lateral:category") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_lateral:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_lateral:colour")) { //$NON-NLS-1$
-            buoy = new BuoyLat(this, node);
-            return;
-
-        } else if (type.equals("buoy_cardinal") || type.equals("beacon_cardinal") //$NON-NLS-1$ //$NON-NLS-2$
-                || keys.containsKey("seamark:buoy_cardinal:category") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_cardinal:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_cardinal:colour") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_cardinal:category") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_cardinal:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_cardinal:colour")) { //$NON-NLS-1$
-            buoy = new BuoyCard(this, node);
-            return;
-
-        } else if (type.equals("buoy_safe_water") //$NON-NLS-1$
-                || type.equals("beacon_safe_water") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_safe_water:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_safe_water:colour") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_safe_water:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_safe_water:colour")) { //$NON-NLS-1$
-            buoy = new BuoySaw(this, node);
-            return;
-
-        } else if (type.equals("buoy_special_purpose") //$NON-NLS-1$
-                || type.equals("beacon_special_purpose") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_special_purpose:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_special_purpose:colour") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_special_purpose:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_special_purpose:colour")) { //$NON-NLS-1$
-            buoy = new BuoySpec(this, node);
-            return;
-
-        } else if (type.equals("buoy_isolated_danger") //$NON-NLS-1$
-                || type.equals("beacon_isolated_danger") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_isolated_danger:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:buoy_isolated_danger:colour") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_isolated_danger:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_isolated_danger:colour")) { //$NON-NLS-1$
-            buoy = new BuoyIsol(this, node);
-            return;
-
-        } else if (type.equals("landmark") || type.equals("light_vessel") //$NON-NLS-1$
-                || type.equals("light_major") || type.equals("light_minor")) { //$NON-NLS-1$
-            buoy = new BuoyNota(this, node);
-            return;
-
-        } else if (type.equals("light_float")) { //$NON-NLS-1$
-            if (keys.containsKey("seamark:light_float:colour")) { //$NON-NLS-1$
-                str = keys.get("seamark:light_float:colour"); //$NON-NLS-1$
-                if (str.equals("red") || str.equals("green") //$NON-NLS-1$ //$NON-NLS-2$
-                        || str.equals("red;green;red") || str.equals("green;red;green")) { //$NON-NLS-1$ //$NON-NLS-2$
-                    buoy = new BuoyLat(this, node);
-                    return;
-                } else if (str.equals("black;yellow") //$NON-NLS-1$
-                        || str.equals("black;yellow;black") || str.equals("yellow;black") //$NON-NLS-1$ //$NON-NLS-2$
-                        || str.equals("yellow;black;yellow")) { //$NON-NLS-1$
-                    buoy = new BuoyCard(this, node);
-                    return;
-                } else if (str.equals("black;red;black")) { //$NON-NLS-1$
-                    buoy = new BuoyIsol(this, node);
-                    return;
-                } else if (str.equals("red;white")) { //$NON-NLS-1$
-                    buoy = new BuoySaw(this, node);
-                    return;
-                } else if (str.equals("yellow")) { //$NON-NLS-1$
-                    buoy = new BuoySpec(this, node);
-                    return;
-                }
-            } else if (keys.containsKey("seamark:light_float:topmark:shape")) { //$NON-NLS-1$
-                str = keys.get("seamark:light_float:topmark:shape"); //$NON-NLS-1$
-                if (str.equals("cylinder") || str.equals("cone, point up")) { //$NON-NLS-1$ //$NON-NLS-2$
-                    buoy = new BuoyLat(this, node);
-                    return;
-                }
-            } else if (keys.containsKey("seamark:light_float:topmark:colour")) { //$NON-NLS-1$
-                str = keys.get("seamark:light_float:topmark:colour"); //$NON-NLS-1$
-                if (str.equals("red") || str.equals("green")) { //$NON-NLS-1$ //$NON-NLS-2$
-                    buoy = new BuoyLat(this, node);
-                    return;
-                }
-            }
-        }
+	private static final long serialVersionUID = -2976230949744302905L;
+
+	/**
+	 * lokale Variable, private
+	 */
+	private SmpDialogAction dia = null; // Variable für den Handle von
+																			// SmpDialogAction
+	private Buoy buoy = null; // Variable für Objekte des Typs "Tonne" //
+														// @jve:decl-index=0:
+	private boolean isOpen = false; // zeigt den Status des Dialogs an
+	private Node onode = null; // gemerkter Knoten
+	private Buoy obuoy = null; // gemerkte Tonne // @jve:decl-index=0:
+	private JMenuItem SmpItem = null; // Info über item in der Werkzeugleiste
+	private String smt = ""; // value vom key "seamark:type" // @jve:decl-index=0: //$NON-NLS-1$
+	private String smb = ""; // value vom key "seamark" // @jve:decl-index=0: //$NON-NLS-1$
+	private Collection<? extends OsmPrimitive> Selection = null; // @jve:decl-index=0:
+	private OsmPrimitive SelNode = null;
+	private String Os = ""; // @jve:decl-index=0: //$NON-NLS-1$
+	private String UserHome = ""; // @jve:decl-index=0: //$NON-NLS-1$
+
+	// SelectionChangedListner der in die Eventqueue von josm eingehängt wird
+	private SelectionChangedListener SmpListener = new SelectionChangedListener() {
+		public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
+			Node node;
+			Selection = newSelection;
+
+			// System.out.println("hello");
+			for (OsmPrimitive osm : Selection) {
+				if (osm instanceof Node) {
+					node = (Node) osm;
+					if (Selection.size() == 1)
+						// Absicherung gegen Doppelevents
+						if (node.compareTo(SelNode) != 0) {
+							SelNode = node;
+							parseSeaMark();
+							buoy.paintSign();
+						}
+				}
+			}
+
+			Selection = null;
+
+		}
+	};
+
+	/**
+	 * lokale Variable der Maske
+	 */
+	private JDialog dM01SeaMap = null;
+	private JPanel pM01SeaMap = null;
+	private JLabel lM01Head = null;
+	private JLabel lM01Region = null;
+	private JLabel lM02Region = null;
+	public ButtonGroup bgM01Region = null;
+	public JRadioButton rbM01RegionA = null;
+	public JRadioButton rbM01RegionB = null;
+	public JLabel lM01Icon = null; // Shape
+	public JLabel lM02Icon = null; // Light
+	public JLabel lM03Icon = null; // Reflector
+	public JLabel lM04Icon = null; // Racon
+	public JLabel lM05Icon = null; // Fog
+	public JLabel lM06Icon = null; // Topmark
+	public JLabel lM01NameMark = null;
+	public JLabel lM01FireMark = null;
+	public JLabel lM01FogMark = null;
+	public JLabel lM01RadarMark = null;
+	private JLabel lM01TypeOfMark = null;
+	public JComboBox cbM01TypeOfMark = null;
+	public JLabel lM01CatOfMark = null;
+	public JComboBox cbM01CatOfMark = null;
+	public JLabel lM01StyleOfMark = null;
+	public JComboBox cbM01StyleOfMark = null;
+	private JLabel lM01Name = null;
+	public JTextField tfM01Name = null;
+	private JLabel lM01Props02 = null;
+	public JCheckBox cM01TopMark = null;
+	public JComboBox cbM01TopMark = null;
+	public JCheckBox cM01Radar = null;
+	public JCheckBox cM01Racon = null;
+	public JComboBox cbM01Racon = null;
+	public JTextField tfM01Racon = null;
+	public JLabel lM01Racon = null;
+	public JCheckBox cM01Fog = null;
+	public JComboBox cbM01Fog = null;
+	public JLabel lM01FogGroup = null;
+	public JTextField tfM01FogGroup = null;
+	public JLabel lM01FogPeriod = null;
+	public JTextField tfM01FogPeriod = null;
+	public JCheckBox cM01Fired = null;
+	public ButtonGroup bgM01Fired = null;
+	public JRadioButton rbM01Fired1 = null;
+	public JRadioButton rbM01FiredN = null;
+	public JLabel lM01Kennung = null;
+	public JComboBox cbM01Kennung = null;
+	public JLabel lM01Height = null;
+	public JTextField tfM01Height = null;
+	public JLabel lM01Range = null;
+	public JTextField tfM01Range = null;
+	public JLabel lM01Group = null;
+	public JTextField tfM01Group = null;
+	public JLabel lM01RepeatTime = null;
+	public JTextField tfM01RepeatTime = null;
+	public JLabel lM01Sector = null;
+	public JComboBox cbM01Sector = null;
+	public JLabel lM01Colour = null;
+	public JComboBox cbM01Colour = null;
+	public JLabel lM01Bearing = null;
+	public JTextField tfM01Bearing = null;
+	public JTextField tfM02Bearing = null;
+	public JTextField tfM01Radius = null;
+	public JButton bM01Save = null;
+	public JButton bM01Close = null;
+	public JCheckBox cM01IconVisible = null;
+	public JTextField sM01StatusBar = null;
+
+	public boolean paintlock = false;
+
+	public JMenuItem getSmpItem() {
+		return SmpItem;
+	}
+
+	public void setSmpItem(JMenuItem smpItem) {
+		SmpItem = smpItem;
+	}
+
+	public boolean isOpen() {
+		return isOpen;
+	}
+
+	public void setOpen(boolean isOpen) {
+		this.isOpen = isOpen;
+	}
+
+	public String getOs() {
+		return Os;
+	}
+
+	public void setOs(String os) {
+		Os = os;
+	}
+
+	public String getUserHome() {
+		return UserHome;
+	}
+
+	public void setUserHome(String userHome) {
+		UserHome = userHome;
+	}
+
+	public SmpDialogAction() {
+		super(
+				Messages.getString("SmpDialogAction.4"), "Smp", Messages.getString("SmpDialogAction.0"), Shortcut //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+						.registerShortcut(
+								"tools:Semarks", //$NON-NLS-1$
+								tr("Tool: {0}", Messages.getString("SmpDialogAction.9")), KeyEvent.VK_S, //$NON-NLS-1$ //$NON-NLS-2$
+								Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
+
+		dia = this;
+		String str = Main.pref.get("mappaint.style.sources"); //$NON-NLS-1$
+		if (!str.contains("dev.openseamap.org")) { //$NON-NLS-1$
+			if (!str.isEmpty()) //$NON-NLS-1$
+				str += new String(new char[] { 0x1e });
+			Main.pref.put("mappaint.style.sources", str //$NON-NLS-1$
+					+ "http://dev.openseamap.org/josm/seamark_styles.xml"); //$NON-NLS-1$
+		}
+		str = Main.pref.get("color.background"); //$NON-NLS-1$
+		if (str.equals("#000000") || str.isEmpty()) //$NON-NLS-1$ //$NON-NLS-2$
+			Main.pref.put("color.background", "#606060"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void CloseDialog() {
+		onode = null;
+		DataSet.removeSelectionListener(SmpListener);
+		Selection = null;
+
+		if (isOpen)
+			dM01SeaMap.dispose();
+		isOpen = false;
+
+	}
+
+	public void actionPerformed(ActionEvent e) {
+
+		/*
+		 * int option = JOptionPane.showConfirmDialog(Main.parent,
+		 * tr("THIS IS EXPERIMENTAL. Save your work and verify before uploading.\n"
+		 * + "Are you really sure to continue?"),
+		 * tr("Please abort if you are not sure"), JOptionPane.YES_NO_OPTION,
+		 * JOptionPane.WARNING_MESSAGE);
+		 * 
+		 * if (option != JOptionPane.YES_OPTION) { return; }
+		 */
+
+		onode = null;
+		obuoy = null;
+
+		SwingUtilities.invokeLater(new Runnable() {
+			public void run() {
+				JDialog dialog = getDM01SeaMap();
+
+				if (SmpItem == null) {
+				}
+				dialog.setVisible(true);
+			}
+		});
+
+		setOpen(true);
+
+		if (SmpItem == null) {
+			return;
+		}
+		SmpItem.setEnabled(false);
+
+		// Ausprobe: Möglichkeit der Benachrichtigung, wenn etwas neu
+		// selektiert wird (ueber SelectionChangedListener)
+		// private Collection<? extends OsmPrimitive> sel;
+		// siehe org.openstreetmap.josm.plugins.osb -> OsbLayer.java
+		// Einhängen des Listeners in die Eventqueue von josm
+		DataSet.addSelectionListener(SmpListener);
+	}
+
+	private void PicRebuild() {
+
+		DataSet ds = Main.main.getCurrentDataSet();
+
+		if (obuoy == null) {
+			return;
+		}
+
+		Node n = obuoy.getNode();
+
+		if (n != null) {
+			Command c;
+
+			if (smb != "") { //$NON-NLS-1$
+
+				c = new ChangePropertyCommand(n, "seamark", smb); //$NON-NLS-1$
+				c.executeCommand();
+				ds.fireSelectionChanged();
+
+				smb = ""; //$NON-NLS-1$
+			}
+
+			if (smt != "") { //$NON-NLS-1$
+
+				c = new ChangePropertyCommand(n, "seamark:type", smt); //$NON-NLS-1$
+				c.executeCommand();
+				ds.fireSelectionChanged();
+
+				smt = ""; //$NON-NLS-1$
+			}
+		}
+
+		obuoy = null;
+
+	}
+
+	private void parseSeaMark() {
+
+		int nodes = 0;
+		Node node = null;
+		Collection<Node> selection = null;
+		Map<String, String> keys;
+		DataSet ds;
+
+		ds = Main.main.getCurrentDataSet();
+
+		if (ds == null) {
+			buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.26")); //$NON-NLS-1$
+			buoy.setNode(null);
+			return;
+		}
+
+		selection = ds.getSelectedNodes();
+		nodes = selection.size();
+
+		if (nodes == 0) {
+			buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.27")); //$NON-NLS-1$
+			buoy.setNode(null);
+			return;
+		}
+
+		if (nodes > 1) {
+			buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.28")); //$NON-NLS-1$
+			buoy.setNode(null);
+			return;
+		}
+
+		Iterator<Node> it = selection.iterator();
+		node = it.next();
+
+		if (onode != null)
+			if (node.equals(onode))
+				return;
+
+		// Knoten wurde gewechselt -> die alten tags (benutzt zum Ausblenden der
+		// Pictogramme) wiederherstellen
+		if (obuoy != null)
+			PicRebuild();
+
+		onode = node;
+
+		cM01IconVisible.setEnabled(true);
+		cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+				"/images/Auge.png"))); //$NON-NLS-1$
+
+		cbM01TypeOfMark.setEnabled(true);
+
+		// Soweit das Vorspiel. Ab hier beginnt das Parsen
+		String type = ""; //$NON-NLS-1$
+		String str = ""; //$NON-NLS-1$
+
+		keys = node.getKeys();
+
+		// vorsorglich den Namen holen und verwenden, wenn es ein
+		// Seezeichen ist. Name kann durch die weiteren Tags ueber-
+		// schrieben werden
+
+		if (keys.containsKey("seamark:type")) //$NON-NLS-1$
+			type = keys.get("seamark:type"); //$NON-NLS-1$
+
+		if (type.equals("buoy_lateral") || type.equals("beacon_lateral") //$NON-NLS-1$ //$NON-NLS-2$
+				|| keys.containsKey("seamark:buoy_lateral:category") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_lateral:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_lateral:colour") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_lateral:category") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_lateral:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_lateral:colour")) { //$NON-NLS-1$
+			buoy = new BuoyLat(this, node);
+			return;
+
+		} else if (type.equals("buoy_cardinal") || type.equals("beacon_cardinal") //$NON-NLS-1$ //$NON-NLS-2$
+				|| keys.containsKey("seamark:buoy_cardinal:category") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_cardinal:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_cardinal:colour") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_cardinal:category") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_cardinal:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_cardinal:colour")) { //$NON-NLS-1$
+			buoy = new BuoyCard(this, node);
+			return;
+
+		} else if (type.equals("buoy_safe_water") //$NON-NLS-1$
+				|| type.equals("beacon_safe_water") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_safe_water:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_safe_water:colour") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_safe_water:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_safe_water:colour")) { //$NON-NLS-1$
+			buoy = new BuoySaw(this, node);
+			return;
+
+		} else if (type.equals("buoy_special_purpose") //$NON-NLS-1$
+				|| type.equals("beacon_special_purpose") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_special_purpose:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_special_purpose:colour") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_special_purpose:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_special_purpose:colour")) { //$NON-NLS-1$
+			buoy = new BuoySpec(this, node);
+			return;
+
+		} else if (type.equals("buoy_isolated_danger") //$NON-NLS-1$
+				|| type.equals("beacon_isolated_danger") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_isolated_danger:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:buoy_isolated_danger:colour") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_isolated_danger:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_isolated_danger:colour")) { //$NON-NLS-1$
+			buoy = new BuoyIsol(this, node);
+			return;
+
+		} else if (type.equals("landmark") || type.equals("light_vessel") //$NON-NLS-1$
+				|| type.equals("light_major") || type.equals("light_minor")) { //$NON-NLS-1$
+			buoy = new BuoyNota(this, node);
+			return;
+
+		} else if (type.equals("light_float")) { //$NON-NLS-1$
+			if (keys.containsKey("seamark:light_float:colour")) { //$NON-NLS-1$
+				str = keys.get("seamark:light_float:colour"); //$NON-NLS-1$
+				if (str.equals("red") || str.equals("green") //$NON-NLS-1$ //$NON-NLS-2$
+						|| str.equals("red;green;red") || str.equals("green;red;green")) { //$NON-NLS-1$ //$NON-NLS-2$
+					buoy = new BuoyLat(this, node);
+					return;
+				} else if (str.equals("black;yellow") //$NON-NLS-1$
+						|| str.equals("black;yellow;black") || str.equals("yellow;black") //$NON-NLS-1$ //$NON-NLS-2$
+						|| str.equals("yellow;black;yellow")) { //$NON-NLS-1$
+					buoy = new BuoyCard(this, node);
+					return;
+				} else if (str.equals("black;red;black")) { //$NON-NLS-1$
+					buoy = new BuoyIsol(this, node);
+					return;
+				} else if (str.equals("red;white")) { //$NON-NLS-1$
+					buoy = new BuoySaw(this, node);
+					return;
+				} else if (str.equals("yellow")) { //$NON-NLS-1$
+					buoy = new BuoySpec(this, node);
+					return;
+				}
+			} else if (keys.containsKey("seamark:light_float:topmark:shape")) { //$NON-NLS-1$
+				str = keys.get("seamark:light_float:topmark:shape"); //$NON-NLS-1$
+				if (str.equals("cylinder") || str.equals("cone, point up")) { //$NON-NLS-1$ //$NON-NLS-2$
+					buoy = new BuoyLat(this, node);
+					return;
+				}
+			} else if (keys.containsKey("seamark:light_float:topmark:colour")) { //$NON-NLS-1$
+				str = keys.get("seamark:light_float:topmark:colour"); //$NON-NLS-1$
+				if (str.equals("red") || str.equals("green")) { //$NON-NLS-1$ //$NON-NLS-2$
+					buoy = new BuoyLat(this, node);
+					return;
+				}
+			}
+		}
 
 		buoy = new BuoyUkn(this, Messages.getString("SmpDialogAction.91")); //$NON-NLS-1$
@@ -478,320 +478,320 @@
 	}
 
-    private JDialog getDM01SeaMap() {
-
-        if (dM01SeaMap == null) {
-            dM01SeaMap = new JDialog();
-            dM01SeaMap.setSize(new Dimension(400, 400));
-            dM01SeaMap.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
-            dM01SeaMap.setModal(false);
-            dM01SeaMap.setResizable(false);
-            dM01SeaMap.setContentPane(getPM01SeaMap());
-            dM01SeaMap.setTitle(Messages.getString("SmpDialogAction.9")); //$NON-NLS-1$
-            dM01SeaMap.setVisible(false);
-            dM01SeaMap.setAlwaysOnTop(true);
-            dM01SeaMap.addWindowListener(new java.awt.event.WindowAdapter() {
-                public void windowClosing(java.awt.event.WindowEvent e) {
-
-                    // Pictogramme wiederherstellen und aufraeumen
-                    if (obuoy != null)
-                        PicRebuild();
-                    // Deaktivierung des Listeners
-                    DataSet.removeSelectionListener(SmpListener);
-                    Selection = null;
-
-                    SmpItem.setEnabled(true);
-                }
-
-                public void windowActivated(WindowEvent arg0) {
-                    parseSeaMark();
-                    buoy.paintSign();
-                }
-            });
-        }
-        return dM01SeaMap;
-    }
-
-    private JPanel getPM01SeaMap() {
-        if (pM01SeaMap == null) {
-
-            lM01Icon = new JLabel();
-            lM01Icon.setBounds(new Rectangle(220, 20, 150, 200));
-            lM01Icon.setIcon(null);
-            lM01Icon.setText(""); //$NON-NLS-1$
-
-            lM02Icon = new JLabel();
-            lM02Icon.setBounds(new Rectangle(220, 20, 150, 200));
-            lM02Icon.setIcon(null);
-            lM02Icon.setText(""); //$NON-NLS-1$
-
-            lM03Icon = new JLabel();
-            lM03Icon.setBounds(new Rectangle(220, 20, 150, 200));
-            lM03Icon.setIcon(null);
-            lM03Icon.setText(""); //$NON-NLS-1$
-
-            lM04Icon = new JLabel();
-            lM04Icon.setBounds(new Rectangle(220, 20, 150, 200));
-            lM04Icon.setIcon(null);
-            lM04Icon.setText(""); //$NON-NLS-1$
-
-            lM05Icon = new JLabel();
-            lM05Icon.setBounds(new Rectangle(220, 20, 150, 200));
-            lM05Icon.setIcon(null);
-            lM05Icon.setText(""); //$NON-NLS-1$
-
-            lM06Icon = new JLabel();
-            lM06Icon.setBounds(new Rectangle(220, 20, 150, 200));
-            lM06Icon.setIcon(null);
-            lM06Icon.setText(""); //$NON-NLS-1$
-
-            lM01FireMark = new JLabel();
-            lM01FireMark.setBounds(new Rectangle(315, 85, 80, 20));
-            lM01FireMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
-            lM01FireMark.setText(""); //$NON-NLS-1$
-
-            lM01NameMark = new JLabel();
-            lM01NameMark.setBounds(new Rectangle(315, 65, 80, 20));
-            lM01NameMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
-            lM01NameMark.setText(""); //$NON-NLS-1$
-
-            lM01FogMark = new JLabel();
-            lM01FogMark.setBounds(new Rectangle(220, 85, 70, 20));
-            lM01FogMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
-            lM01FogMark.setText(""); //$NON-NLS-1$
-
-            lM01RadarMark = new JLabel();
-            lM01RadarMark.setBounds(new Rectangle(230, 65, 70, 20));
-            lM01RadarMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
-            lM01RadarMark.setText(""); //$NON-NLS-1$
-
-            lM01Head = new JLabel();
-            lM01Head.setBounds(new Rectangle(5, 3, 316, 16));
-            lM01Head.setText(Messages.getString("SmpDialogAction.97")); //$NON-NLS-1$
-
-            lM01Region = new JLabel();
-            lM01Region.setBounds(new Rectangle(220, 7, 120, 16));
-            lM01Region.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Region.setText(Messages.getString("SmpDialogAction.99")); //$NON-NLS-1$
-
-            lM02Region = new JLabel();
-            lM02Region.setBounds(new Rectangle(270, 7, 120, 16));
-            lM02Region.setFont(new Font("Dialog", Font.BOLD, 12)); //$NON-NLS-1$
-            lM02Region.setText(Messages.getString("SmpDialogAction.101")); //$NON-NLS-1$
-
-            lM01TypeOfMark = new JLabel();
-            lM01TypeOfMark.setBounds(new Rectangle(5, 28, 120, 16));
-            lM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01TypeOfMark.setText(Messages.getString("SmpDialogAction.103")); //$NON-NLS-1$
-
-            lM01CatOfMark = new JLabel();
-            lM01CatOfMark.setBounds(new Rectangle(5, 58, 120, 16));
-            lM01CatOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01CatOfMark.setText(Messages.getString("SmpDialogAction.1")); //$NON-NLS-1$
-
-            lM01StyleOfMark = new JLabel();
-            lM01StyleOfMark.setBounds(new Rectangle(5, 88, 148, 16));
-            lM01StyleOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01StyleOfMark.setText(Messages.getString("SmpDialogAction.107")); //$NON-NLS-1$
-
-            lM01Name = new JLabel();
-            lM01Name.setBounds(new Rectangle(5, 120, 82, 16));
-            lM01Name.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Name.setText(Messages.getString("SmpDialogAction.109")); //$NON-NLS-1$
-
-            lM01Props02 = new JLabel();
-            lM01Props02.setBounds(new Rectangle(5, 150, 172, 16));
-            lM01Props02.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Props02.setText(Messages.getString("SmpDialogAction.111")); //$NON-NLS-1$
-
-            lM01Racon = new JLabel();
-            lM01Racon.setBounds(new Rectangle(335, 195, 65, 20));
-            lM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Racon.setText(Messages.getString("SmpDialogAction.113")); //$NON-NLS-1$
-
-            lM01FogGroup = new JLabel();
-            lM01FogGroup.setBounds(new Rectangle(190, 220, 100, 20));
-            lM01FogGroup.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01FogGroup.setText(Messages.getString("SmpDialogAction.115")); //$NON-NLS-1$
-
-            lM01FogPeriod = new JLabel();
-            lM01FogPeriod.setBounds(new Rectangle(300, 220, 100, 20));
-            lM01FogPeriod.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01FogPeriod.setText(Messages.getString("SmpDialogAction.117")); //$NON-NLS-1$
-
-            lM01Kennung = new JLabel();
-            lM01Kennung.setBounds(new Rectangle(240, 245, 60, 20));
-            lM01Kennung.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Kennung.setText(Messages.getString("SmpDialogAction.119")); //$NON-NLS-1$
-
-            lM01Height = new JLabel();
-            lM01Height.setBounds(new Rectangle(10, 270, 100, 20));
-            lM01Height.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Height.setText(Messages.getString("SmpDialogAction.121")); //$NON-NLS-1$
-
-            lM01Range = new JLabel();
-            lM01Range.setBounds(new Rectangle(108, 270, 100, 20));
-            lM01Range.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Range.setText(Messages.getString("SmpDialogAction.123")); //$NON-NLS-1$
-
-            lM01Group = new JLabel();
-            lM01Group.setBounds(new Rectangle(204, 270, 100, 20));
-            lM01Group.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Group.setText(Messages.getString("SmpDialogAction.125")); //$NON-NLS-1$
-
-            lM01RepeatTime = new JLabel();
-            lM01RepeatTime.setBounds(new Rectangle(300, 270, 100, 20));
-            lM01RepeatTime.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01RepeatTime.setText(Messages.getString("SmpDialogAction.127")); //$NON-NLS-1$
-
-            lM01Sector = new JLabel();
-            lM01Sector.setBounds(new Rectangle(10, 295, 180, 20));
-            lM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Sector.setText(Messages.getString("SmpDialogAction.129")); //$NON-NLS-1$
-
-            lM01Colour = new JLabel();
-            lM01Colour.setBounds(new Rectangle(120, 295, 180, 20));
-            lM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Colour.setText(Messages.getString("SmpDialogAction.131")); //$NON-NLS-1$
-
-            lM01Bearing = new JLabel();
-            lM01Bearing.setBounds(new Rectangle(228, 295, 180, 20));
-            lM01Bearing.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            lM01Bearing.setText(Messages.getString("SmpDialogAction.133")); //$NON-NLS-1$
-
-            rbM01RegionA = new JRadioButton(
-                    Messages.getString("SmpDialogAction.134"), Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$
-                            .equals("A")); //$NON-NLS-1$
-            rbM01RegionA.setBounds(new Rectangle(305, 0, 50, 30));
-            rbM01RegionB = new JRadioButton("-B", Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$
-                    .equals("B")); //$NON-NLS-1$
-            rbM01RegionB.setBounds(new Rectangle(352, 0, 50, 30));
-            bgM01Region = new ButtonGroup();
-            bgM01Region.add(rbM01RegionA);
-            bgM01Region.add(rbM01RegionB);
-
-            ActionListener alM01Region = new ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                    if (buoy instanceof BuoyLat) {
-                        buoy.setRegion(rbM01RegionB.isSelected());
-                        buoy.setLightColour();
-                        buoy.paintSign();
-                    }
-                }
-            };
-            rbM01RegionA.addActionListener(alM01Region);
-            rbM01RegionB.addActionListener(alM01Region);
-
-            rbM01Fired1 = new JRadioButton(
-                    Messages.getString("SmpDialogAction.140"), true); //$NON-NLS-1$
-            rbM01Fired1.setBounds(new Rectangle(85, 240, 70, 30));
-            rbM01FiredN = new JRadioButton(
-                    Messages.getString("SmpDialogAction.141"), false); //$NON-NLS-1$
-            rbM01FiredN.setBounds(new Rectangle(155, 240, 80, 30));
-            bgM01Fired = new ButtonGroup();
-            bgM01Fired.add(rbM01Fired1);
-            bgM01Fired.add(rbM01FiredN);
-
-            ActionListener alM01Fired = new ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                    buoy.setSectored(rbM01FiredN.isSelected());
-                    cbM01Sector.setSelectedIndex(0);
-                    buoy.setSectorIndex(0);
-                    buoy.paintSign();
-                }
-            };
-            rbM01Fired1.addActionListener(alM01Fired);
-            rbM01FiredN.addActionListener(alM01Fired);
-
-            pM01SeaMap = new JPanel();
-            pM01SeaMap.setLayout(null);
-            pM01SeaMap.add(lM01Head, null);
-            pM01SeaMap.add(rbM01RegionA, null);
-            pM01SeaMap.add(rbM01RegionB, null);
-            pM01SeaMap.add(lM01Region, null);
-            pM01SeaMap.add(lM02Region, null);
-            pM01SeaMap.add(lM01Icon, null);
-            pM01SeaMap.add(lM02Icon, null);
-            pM01SeaMap.add(lM03Icon, null);
-            pM01SeaMap.add(lM04Icon, null);
-            pM01SeaMap.add(lM05Icon, null);
-            pM01SeaMap.add(lM06Icon, null);
-            pM01SeaMap.add(getCbM01TypeOfMark(), null);
-            pM01SeaMap.add(lM01TypeOfMark, null);
-            pM01SeaMap.add(getCbM01CatOfMark(), null);
-            pM01SeaMap.add(lM01CatOfMark, null);
-            pM01SeaMap.add(getCbM01StyleOfMark(), null);
-            pM01SeaMap.add(lM01StyleOfMark, null);
-            pM01SeaMap.add(lM01Name, null);
-            pM01SeaMap.add(getTfM01Name(), null);
-            pM01SeaMap.add(lM01Props02, null);
-            pM01SeaMap.add(getCM01TopMark(), null);
-            pM01SeaMap.add(getCbM01TopMark(), null);
-            pM01SeaMap.add(getCM01Radar(), null);
-            pM01SeaMap.add(getCM01Racon(), null);
-            pM01SeaMap.add(getCbM01Racon(), null);
-            pM01SeaMap.add(getTfM01Racon(), null);
-            pM01SeaMap.add(lM01Racon, null);
-            pM01SeaMap.add(getCM01Fog(), null);
-            pM01SeaMap.add(getCbM01Fog(), null);
-            pM01SeaMap.add(getTfM01FogGroup(), null);
-            pM01SeaMap.add(lM01FogGroup, null);
-            pM01SeaMap.add(getTfM01FogPeriod(), null);
-            pM01SeaMap.add(lM01FogPeriod, null);
-            pM01SeaMap.add(getCM01Fired(), null);
-            pM01SeaMap.add(rbM01Fired1, null);
-            pM01SeaMap.add(rbM01FiredN, null);
-            pM01SeaMap.add(getTfM01RepeatTime(), null);
-            pM01SeaMap.add(lM01RepeatTime, null);
-            pM01SeaMap.add(getCbM01Kennung(), null);
-            pM01SeaMap.add(lM01Kennung, null);
-            pM01SeaMap.add(lM01Group, null);
-            pM01SeaMap.add(getTfM01Group(), null);
-            pM01SeaMap.add(lM01Sector, null);
-            pM01SeaMap.add(getCbM01Sector(), null);
-            pM01SeaMap.add(lM01Colour, null);
-            pM01SeaMap.add(getCbM01Colour(), null);
-            pM01SeaMap.add(lM01Bearing, null);
-            pM01SeaMap.add(getTfM01Bearing(), null);
-            pM01SeaMap.add(getTfM02Bearing(), null);
-            pM01SeaMap.add(getTfM01Radius(), null);
-            pM01SeaMap.add(lM01Height, null);
-            pM01SeaMap.add(getTfM01Height(), null);
-            pM01SeaMap.add(lM01Range, null);
-            pM01SeaMap.add(getTfM01Range(), null);
-            pM01SeaMap.add(lM01FireMark, null);
-            pM01SeaMap.add(lM01NameMark, null);
-            pM01SeaMap.add(lM01FogMark, null);
-            pM01SeaMap.add(lM01RadarMark, null);
-            pM01SeaMap.add(getBM01Save(), null);
-            pM01SeaMap.add(getSM01StatusBar(), null);
-            pM01SeaMap.add(getBM01Close(), null);
-            pM01SeaMap.add(getCM01IconVisible(), null);
-        }
-        return pM01SeaMap;
-    }
-
-    private JComboBox getCbM01TypeOfMark() {
-
-        if (cbM01TypeOfMark == null) {
-
-            cbM01TypeOfMark = new JComboBox();
-
-            // Inhalt der ComboBox
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.142")); //$NON-NLS-1$
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.143")); //$NON-NLS-1$
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.144")); //$NON-NLS-1$
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.145")); //$NON-NLS-1$
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.146")); //$NON-NLS-1$
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.147")); //$NON-NLS-1$
-            cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.148")); //$NON-NLS-1$
-
-            cbM01TypeOfMark.setBounds(new Rectangle(45, 25, 165, 25));
-            // cbM01TypeOfMark.setEditable(false);
-            cbM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01TypeOfMark.setEnabled(true);
-
-            cbM01TypeOfMark.addActionListener(new ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                    int type = cbM01TypeOfMark.getSelectedIndex();
+	private JDialog getDM01SeaMap() {
+
+		if (dM01SeaMap == null) {
+			dM01SeaMap = new JDialog();
+			dM01SeaMap.setSize(new Dimension(400, 400));
+			dM01SeaMap.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+			dM01SeaMap.setModal(false);
+			dM01SeaMap.setResizable(false);
+			dM01SeaMap.setContentPane(getPM01SeaMap());
+			dM01SeaMap.setTitle(Messages.getString("SmpDialogAction.9")); //$NON-NLS-1$
+			dM01SeaMap.setVisible(false);
+			dM01SeaMap.setAlwaysOnTop(true);
+			dM01SeaMap.addWindowListener(new java.awt.event.WindowAdapter() {
+				public void windowClosing(java.awt.event.WindowEvent e) {
+
+					// Pictogramme wiederherstellen und aufraeumen
+					if (obuoy != null)
+						PicRebuild();
+					// Deaktivierung des Listeners
+					DataSet.removeSelectionListener(SmpListener);
+					Selection = null;
+
+					SmpItem.setEnabled(true);
+				}
+
+				public void windowActivated(WindowEvent arg0) {
+					parseSeaMark();
+					buoy.paintSign();
+				}
+			});
+		}
+		return dM01SeaMap;
+	}
+
+	private JPanel getPM01SeaMap() {
+		if (pM01SeaMap == null) {
+
+			lM01Icon = new JLabel();
+			lM01Icon.setBounds(new Rectangle(220, 20, 150, 200));
+			lM01Icon.setIcon(null);
+			lM01Icon.setText(""); //$NON-NLS-1$
+
+			lM02Icon = new JLabel();
+			lM02Icon.setBounds(new Rectangle(220, 20, 150, 200));
+			lM02Icon.setIcon(null);
+			lM02Icon.setText(""); //$NON-NLS-1$
+
+			lM03Icon = new JLabel();
+			lM03Icon.setBounds(new Rectangle(220, 20, 150, 200));
+			lM03Icon.setIcon(null);
+			lM03Icon.setText(""); //$NON-NLS-1$
+
+			lM04Icon = new JLabel();
+			lM04Icon.setBounds(new Rectangle(220, 20, 150, 200));
+			lM04Icon.setIcon(null);
+			lM04Icon.setText(""); //$NON-NLS-1$
+
+			lM05Icon = new JLabel();
+			lM05Icon.setBounds(new Rectangle(220, 20, 150, 200));
+			lM05Icon.setIcon(null);
+			lM05Icon.setText(""); //$NON-NLS-1$
+
+			lM06Icon = new JLabel();
+			lM06Icon.setBounds(new Rectangle(220, 20, 150, 200));
+			lM06Icon.setIcon(null);
+			lM06Icon.setText(""); //$NON-NLS-1$
+
+			lM01FireMark = new JLabel();
+			lM01FireMark.setBounds(new Rectangle(315, 85, 80, 20));
+			lM01FireMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
+			lM01FireMark.setText(""); //$NON-NLS-1$
+
+			lM01NameMark = new JLabel();
+			lM01NameMark.setBounds(new Rectangle(315, 65, 80, 20));
+			lM01NameMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
+			lM01NameMark.setText(""); //$NON-NLS-1$
+
+			lM01FogMark = new JLabel();
+			lM01FogMark.setBounds(new Rectangle(220, 85, 70, 20));
+			lM01FogMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
+			lM01FogMark.setText(""); //$NON-NLS-1$
+
+			lM01RadarMark = new JLabel();
+			lM01RadarMark.setBounds(new Rectangle(230, 65, 70, 20));
+			lM01RadarMark.setFont(new Font("Dialog", Font.PLAIN, 10)); //$NON-NLS-1$
+			lM01RadarMark.setText(""); //$NON-NLS-1$
+
+			lM01Head = new JLabel();
+			lM01Head.setBounds(new Rectangle(5, 3, 316, 16));
+			lM01Head.setText(Messages.getString("SmpDialogAction.97")); //$NON-NLS-1$
+
+			lM01Region = new JLabel();
+			lM01Region.setBounds(new Rectangle(220, 7, 120, 16));
+			lM01Region.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Region.setText(Messages.getString("SmpDialogAction.99")); //$NON-NLS-1$
+
+			lM02Region = new JLabel();
+			lM02Region.setBounds(new Rectangle(270, 7, 120, 16));
+			lM02Region.setFont(new Font("Dialog", Font.BOLD, 12)); //$NON-NLS-1$
+			lM02Region.setText(Messages.getString("SmpDialogAction.101")); //$NON-NLS-1$
+
+			lM01TypeOfMark = new JLabel();
+			lM01TypeOfMark.setBounds(new Rectangle(5, 28, 120, 16));
+			lM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01TypeOfMark.setText(Messages.getString("SmpDialogAction.103")); //$NON-NLS-1$
+
+			lM01CatOfMark = new JLabel();
+			lM01CatOfMark.setBounds(new Rectangle(5, 58, 120, 16));
+			lM01CatOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01CatOfMark.setText(Messages.getString("SmpDialogAction.1")); //$NON-NLS-1$
+
+			lM01StyleOfMark = new JLabel();
+			lM01StyleOfMark.setBounds(new Rectangle(5, 88, 148, 16));
+			lM01StyleOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01StyleOfMark.setText(Messages.getString("SmpDialogAction.107")); //$NON-NLS-1$
+
+			lM01Name = new JLabel();
+			lM01Name.setBounds(new Rectangle(5, 120, 82, 16));
+			lM01Name.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Name.setText(Messages.getString("SmpDialogAction.109")); //$NON-NLS-1$
+
+			lM01Props02 = new JLabel();
+			lM01Props02.setBounds(new Rectangle(5, 150, 172, 16));
+			lM01Props02.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Props02.setText(Messages.getString("SmpDialogAction.111")); //$NON-NLS-1$
+
+			lM01Racon = new JLabel();
+			lM01Racon.setBounds(new Rectangle(335, 195, 65, 20));
+			lM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Racon.setText(Messages.getString("SmpDialogAction.113")); //$NON-NLS-1$
+
+			lM01FogGroup = new JLabel();
+			lM01FogGroup.setBounds(new Rectangle(190, 220, 100, 20));
+			lM01FogGroup.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01FogGroup.setText(Messages.getString("SmpDialogAction.115")); //$NON-NLS-1$
+
+			lM01FogPeriod = new JLabel();
+			lM01FogPeriod.setBounds(new Rectangle(300, 220, 100, 20));
+			lM01FogPeriod.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01FogPeriod.setText(Messages.getString("SmpDialogAction.117")); //$NON-NLS-1$
+
+			lM01Kennung = new JLabel();
+			lM01Kennung.setBounds(new Rectangle(240, 245, 60, 20));
+			lM01Kennung.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Kennung.setText(Messages.getString("SmpDialogAction.119")); //$NON-NLS-1$
+
+			lM01Height = new JLabel();
+			lM01Height.setBounds(new Rectangle(10, 270, 100, 20));
+			lM01Height.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Height.setText(Messages.getString("SmpDialogAction.121")); //$NON-NLS-1$
+
+			lM01Range = new JLabel();
+			lM01Range.setBounds(new Rectangle(108, 270, 100, 20));
+			lM01Range.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Range.setText(Messages.getString("SmpDialogAction.123")); //$NON-NLS-1$
+
+			lM01Group = new JLabel();
+			lM01Group.setBounds(new Rectangle(204, 270, 100, 20));
+			lM01Group.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Group.setText(Messages.getString("SmpDialogAction.125")); //$NON-NLS-1$
+
+			lM01RepeatTime = new JLabel();
+			lM01RepeatTime.setBounds(new Rectangle(300, 270, 100, 20));
+			lM01RepeatTime.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01RepeatTime.setText(Messages.getString("SmpDialogAction.127")); //$NON-NLS-1$
+
+			lM01Sector = new JLabel();
+			lM01Sector.setBounds(new Rectangle(10, 295, 180, 20));
+			lM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Sector.setText(Messages.getString("SmpDialogAction.129")); //$NON-NLS-1$
+
+			lM01Colour = new JLabel();
+			lM01Colour.setBounds(new Rectangle(120, 295, 180, 20));
+			lM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Colour.setText(Messages.getString("SmpDialogAction.131")); //$NON-NLS-1$
+
+			lM01Bearing = new JLabel();
+			lM01Bearing.setBounds(new Rectangle(228, 295, 180, 20));
+			lM01Bearing.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			lM01Bearing.setText(Messages.getString("SmpDialogAction.133")); //$NON-NLS-1$
+
+			rbM01RegionA = new JRadioButton(
+					Messages.getString("SmpDialogAction.134"), Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$
+							.equals("A")); //$NON-NLS-1$
+			rbM01RegionA.setBounds(new Rectangle(305, 0, 50, 30));
+			rbM01RegionB = new JRadioButton("-B", Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$
+					.equals("B")); //$NON-NLS-1$
+			rbM01RegionB.setBounds(new Rectangle(352, 0, 50, 30));
+			bgM01Region = new ButtonGroup();
+			bgM01Region.add(rbM01RegionA);
+			bgM01Region.add(rbM01RegionB);
+
+			ActionListener alM01Region = new ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					if (buoy instanceof BuoyLat) {
+						buoy.setRegion(rbM01RegionB.isSelected());
+						buoy.setLightColour();
+						buoy.paintSign();
+					}
+				}
+			};
+			rbM01RegionA.addActionListener(alM01Region);
+			rbM01RegionB.addActionListener(alM01Region);
+
+			rbM01Fired1 = new JRadioButton(
+					Messages.getString("SmpDialogAction.140"), true); //$NON-NLS-1$
+			rbM01Fired1.setBounds(new Rectangle(85, 240, 70, 30));
+			rbM01FiredN = new JRadioButton(
+					Messages.getString("SmpDialogAction.141"), false); //$NON-NLS-1$
+			rbM01FiredN.setBounds(new Rectangle(155, 240, 80, 30));
+			bgM01Fired = new ButtonGroup();
+			bgM01Fired.add(rbM01Fired1);
+			bgM01Fired.add(rbM01FiredN);
+
+			ActionListener alM01Fired = new ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					buoy.setSectored(rbM01FiredN.isSelected());
+					cbM01Sector.setSelectedIndex(0);
+					buoy.setSectorIndex(0);
+					buoy.paintSign();
+				}
+			};
+			rbM01Fired1.addActionListener(alM01Fired);
+			rbM01FiredN.addActionListener(alM01Fired);
+
+			pM01SeaMap = new JPanel();
+			pM01SeaMap.setLayout(null);
+			pM01SeaMap.add(lM01Head, null);
+			pM01SeaMap.add(rbM01RegionA, null);
+			pM01SeaMap.add(rbM01RegionB, null);
+			pM01SeaMap.add(lM01Region, null);
+			pM01SeaMap.add(lM02Region, null);
+			pM01SeaMap.add(lM01Icon, null);
+			pM01SeaMap.add(lM02Icon, null);
+			pM01SeaMap.add(lM03Icon, null);
+			pM01SeaMap.add(lM04Icon, null);
+			pM01SeaMap.add(lM05Icon, null);
+			pM01SeaMap.add(lM06Icon, null);
+			pM01SeaMap.add(getCbM01TypeOfMark(), null);
+			pM01SeaMap.add(lM01TypeOfMark, null);
+			pM01SeaMap.add(getCbM01CatOfMark(), null);
+			pM01SeaMap.add(lM01CatOfMark, null);
+			pM01SeaMap.add(getCbM01StyleOfMark(), null);
+			pM01SeaMap.add(lM01StyleOfMark, null);
+			pM01SeaMap.add(lM01Name, null);
+			pM01SeaMap.add(getTfM01Name(), null);
+			pM01SeaMap.add(lM01Props02, null);
+			pM01SeaMap.add(getCM01TopMark(), null);
+			pM01SeaMap.add(getCbM01TopMark(), null);
+			pM01SeaMap.add(getCM01Radar(), null);
+			pM01SeaMap.add(getCM01Racon(), null);
+			pM01SeaMap.add(getCbM01Racon(), null);
+			pM01SeaMap.add(getTfM01Racon(), null);
+			pM01SeaMap.add(lM01Racon, null);
+			pM01SeaMap.add(getCM01Fog(), null);
+			pM01SeaMap.add(getCbM01Fog(), null);
+			pM01SeaMap.add(getTfM01FogGroup(), null);
+			pM01SeaMap.add(lM01FogGroup, null);
+			pM01SeaMap.add(getTfM01FogPeriod(), null);
+			pM01SeaMap.add(lM01FogPeriod, null);
+			pM01SeaMap.add(getCM01Fired(), null);
+			pM01SeaMap.add(rbM01Fired1, null);
+			pM01SeaMap.add(rbM01FiredN, null);
+			pM01SeaMap.add(getTfM01RepeatTime(), null);
+			pM01SeaMap.add(lM01RepeatTime, null);
+			pM01SeaMap.add(getCbM01Kennung(), null);
+			pM01SeaMap.add(lM01Kennung, null);
+			pM01SeaMap.add(lM01Group, null);
+			pM01SeaMap.add(getTfM01Group(), null);
+			pM01SeaMap.add(lM01Sector, null);
+			pM01SeaMap.add(getCbM01Sector(), null);
+			pM01SeaMap.add(lM01Colour, null);
+			pM01SeaMap.add(getCbM01Colour(), null);
+			pM01SeaMap.add(lM01Bearing, null);
+			pM01SeaMap.add(getTfM01Bearing(), null);
+			pM01SeaMap.add(getTfM02Bearing(), null);
+			pM01SeaMap.add(getTfM01Radius(), null);
+			pM01SeaMap.add(lM01Height, null);
+			pM01SeaMap.add(getTfM01Height(), null);
+			pM01SeaMap.add(lM01Range, null);
+			pM01SeaMap.add(getTfM01Range(), null);
+			pM01SeaMap.add(lM01FireMark, null);
+			pM01SeaMap.add(lM01NameMark, null);
+			pM01SeaMap.add(lM01FogMark, null);
+			pM01SeaMap.add(lM01RadarMark, null);
+			pM01SeaMap.add(getBM01Save(), null);
+			pM01SeaMap.add(getSM01StatusBar(), null);
+			pM01SeaMap.add(getBM01Close(), null);
+			pM01SeaMap.add(getCM01IconVisible(), null);
+		}
+		return pM01SeaMap;
+	}
+
+	private JComboBox getCbM01TypeOfMark() {
+
+		if (cbM01TypeOfMark == null) {
+
+			cbM01TypeOfMark = new JComboBox();
+
+			// Inhalt der ComboBox
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.142")); //$NON-NLS-1$
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.143")); //$NON-NLS-1$
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.144")); //$NON-NLS-1$
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.145")); //$NON-NLS-1$
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.146")); //$NON-NLS-1$
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.147")); //$NON-NLS-1$
+			cbM01TypeOfMark.addItem(Messages.getString("SmpDialogAction.148")); //$NON-NLS-1$
+
+			cbM01TypeOfMark.setBounds(new Rectangle(45, 25, 165, 25));
+			// cbM01TypeOfMark.setEditable(false);
+			cbM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01TypeOfMark.setEnabled(true);
+
+			cbM01TypeOfMark.addActionListener(new ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					int type = cbM01TypeOfMark.getSelectedIndex();
 
 					if (buoy == null) {
@@ -801,10 +801,10 @@
 					}
 
-                    Node n = buoy.getNode();
-                    if (n == null)
-                        return;
-
-                    paintlock = true;
-                    switch (type) {
+					Node n = buoy.getNode();
+					if (n == null)
+						return;
+
+					paintlock = true;
+					switch (type) {
 
 					case SeaMark.UNKNOWN_TYPE:
@@ -814,68 +814,68 @@
 						break;
 
-                    case SeaMark.LATERAL:
-                        if (!(buoy instanceof BuoyLat)) {
-                            buoy = new BuoyLat(dia, n);
-                            buoy.setBuoyIndex(0);
-                        }
-                        break;
-
-                    case SeaMark.CARDINAL:
-                        if (!(buoy instanceof BuoyCard)) {
-                            buoy = new BuoyCard(dia, n);
-                            buoy.setBuoyIndex(0);
-                        }
-                        break;
-
-                    case SeaMark.SAFE_WATER:
-                        if (!(buoy instanceof BuoySaw)) {
-                            buoy = new BuoySaw(dia, n);
-                        }
-                        buoy.setBuoyIndex(type);
-                        break;
-
-                    case SeaMark.ISOLATED_DANGER:
-                        if (!(buoy instanceof BuoyIsol)) {
-                            buoy = new BuoyIsol(dia, n);
-                        }
-                        buoy.setBuoyIndex(type);
-                        break;
-
-                    case SeaMark.SPECIAL_PURPOSE:
-                        if (!(buoy instanceof BuoySpec)) {
-                            buoy = new BuoySpec(dia, n);
-                        }
-                        buoy.setBuoyIndex(type);
-                        break;
-
-                    case SeaMark.LIGHT:
-                        if (!(buoy instanceof BuoyNota)) {
-                            buoy = new BuoyNota(dia, n);
-                            buoy.setBuoyIndex(0);
-                        }
-                        break;
-                    }
-
-                    buoy.refreshStyles();
-                    buoy.refreshLights();
-                    buoy.setLightColour();
-                    paintlock = false;
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01TypeOfMark;
-    }
-
-    private JComboBox getCbM01CatOfMark() {
-        if (cbM01CatOfMark == null) {
-            cbM01CatOfMark = new JComboBox();
-            cbM01CatOfMark.setBounds(new Rectangle(60, 55, 150, 25));
-            cbM01CatOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01CatOfMark.setEnabled(true);
-
-            cbM01CatOfMark.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    int cat = cbM01CatOfMark.getSelectedIndex();
+					case SeaMark.LATERAL:
+						if (!(buoy instanceof BuoyLat)) {
+							buoy = new BuoyLat(dia, n);
+							buoy.setBuoyIndex(0);
+						}
+						break;
+
+					case SeaMark.CARDINAL:
+						if (!(buoy instanceof BuoyCard)) {
+							buoy = new BuoyCard(dia, n);
+							buoy.setBuoyIndex(0);
+						}
+						break;
+
+					case SeaMark.SAFE_WATER:
+						if (!(buoy instanceof BuoySaw)) {
+							buoy = new BuoySaw(dia, n);
+						}
+						buoy.setBuoyIndex(type);
+						break;
+
+					case SeaMark.ISOLATED_DANGER:
+						if (!(buoy instanceof BuoyIsol)) {
+							buoy = new BuoyIsol(dia, n);
+						}
+						buoy.setBuoyIndex(type);
+						break;
+
+					case SeaMark.SPECIAL_PURPOSE:
+						if (!(buoy instanceof BuoySpec)) {
+							buoy = new BuoySpec(dia, n);
+						}
+						buoy.setBuoyIndex(type);
+						break;
+
+					case SeaMark.LIGHT:
+						if (!(buoy instanceof BuoyNota)) {
+							buoy = new BuoyNota(dia, n);
+							buoy.setBuoyIndex(0);
+						}
+						break;
+					}
+
+					buoy.refreshStyles();
+					buoy.refreshLights();
+					buoy.setLightColour();
+					paintlock = false;
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01TypeOfMark;
+	}
+
+	private JComboBox getCbM01CatOfMark() {
+		if (cbM01CatOfMark == null) {
+			cbM01CatOfMark = new JComboBox();
+			cbM01CatOfMark.setBounds(new Rectangle(60, 55, 150, 25));
+			cbM01CatOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01CatOfMark.setEnabled(true);
+
+			cbM01CatOfMark.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					int cat = cbM01CatOfMark.getSelectedIndex();
 
 					if (buoy == null) {
@@ -885,18 +885,18 @@
 					}
 
-                    Node n = buoy.getNode();
-                    if (n == null)
-                        return;
+					Node n = buoy.getNode();
+					if (n == null)
+						return;
 
 					buoy.setBuoyIndex(cat);
-                    buoy.refreshStyles();
-                    buoy.refreshLights();
-                    buoy.setLightColour();
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01CatOfMark;
-    }
+					buoy.refreshStyles();
+					buoy.refreshLights();
+					buoy.setLightColour();
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01CatOfMark;
+	}
 
 	private JComboBox getCbM01StyleOfMark() {
@@ -920,510 +920,510 @@
 	}
 
-    private JTextField getTfM01Name() {
-        if (tfM01Name == null) {
-            tfM01Name = new JTextField();
-            tfM01Name.setBounds(new Rectangle(50, 120, 150, 20));
-            tfM01Name.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setName(tfM01Name.getText());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01Name;
-    }
-
-    private JCheckBox getCM01TopMark() {
-        if (cM01TopMark == null) {
-            cM01TopMark = new JCheckBox();
-            cM01TopMark.setBounds(new Rectangle(10, 170, 100, 20));
-            cM01TopMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cM01TopMark.setText(Messages.getString("SmpDialogAction.166")); //$NON-NLS-1$
-            cM01TopMark.addItemListener(new ItemListener() {
-                public void itemStateChanged(ItemEvent e) {
-                    if (buoy == null) {
-                        return;
-                    }
-                    buoy.setTopMark(cM01TopMark.isSelected());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cM01TopMark;
-    }
-
-    private JComboBox getCbM01TopMark() {
-        if (cbM01TopMark == null) {
-            cbM01TopMark = new JComboBox();
-            cbM01TopMark.setBounds(new Rectangle(110, 170, 80, 20));
-            cbM01TopMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01TopMark.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    int top = cbM01TopMark.getSelectedIndex();
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01TopMark;
-    }
-
-    private JCheckBox getCM01Radar() {
-        if (cM01Radar == null) {
-            cM01Radar = new JCheckBox();
-            cM01Radar.setBounds(new Rectangle(10, 195, 120, 20));
-            cM01Radar.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cM01Radar.setText(Messages.getString("SmpDialogAction.169")); //$NON-NLS-1$
-            cM01Radar.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    if (cM01Radar.isSelected()) {
-                        buoy.setRadar(true);
-                        buoy.setRacon(false);
-                        cM01Racon.setSelected(false);
-                    } else {
-                        buoy.setRadar(false);
-                    }
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cM01Radar;
-    }
-
-    private JCheckBox getCM01Racon() {
-        if (cM01Racon == null) {
-            cM01Racon = new JCheckBox();
-            cM01Racon.setBounds(new Rectangle(130, 195, 110, 20));
-            cM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cM01Racon.setText(Messages.getString("SmpDialogAction.171")); //$NON-NLS-1$
-            cM01Racon.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    if (cM01Racon.isSelected()) {
-                        buoy.setRacon(true);
-                        buoy.setRadar(false);
-                        cM01Radar.setSelected(false);
-                    } else {
-                        buoy.setRacon(false);
-                    }
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cM01Racon;
-    }
-
-    private JComboBox getCbM01Racon() {
-        if (cbM01Racon == null) {
-            cbM01Racon = new JComboBox();
-            cbM01Racon.setBounds(new Rectangle(240, 195, 80, 20));
-            cbM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01Racon.removeAllItems();
-            cbM01Racon.addItem("Any");
-            cbM01Racon.addItem("Racon");
-            cbM01Racon.addItem("Ramark");
-            cbM01Racon.addItem("Leading");
-            cbM01Racon.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    int rac = cbM01Racon.getSelectedIndex();
-                    buoy.setRaType(rac);
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01Racon;
-    }
-
-    private JTextField getTfM01Racon() {
-        if (tfM01Racon == null) {
-            tfM01Racon = new JTextField();
-            tfM01Racon.setBounds(new Rectangle(345, 195, 30, 20));
-            tfM01Racon.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setRaconGroup(tfM01Racon.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01Racon;
-    }
-
-    private JCheckBox getCM01Fog() {
-        if (cM01Fog == null) {
-            cM01Fog = new JCheckBox();
-            cM01Fog.setBounds(new Rectangle(10, 220, 90, 20));
-            cM01Fog.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cM01Fog.setText(Messages.getString("SmpDialogAction.174")); //$NON-NLS-1$
-            cM01Fog.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    buoy.setFog(cM01Fog.isSelected());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cM01Fog;
-    }
-
-    private JComboBox getCbM01Fog() {
-        if (cbM01Fog == null) {
-            cbM01Fog = new JComboBox();
-            cbM01Fog.setBounds(new Rectangle(100, 220, 70, 20));
-            cbM01Fog.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01Fog.removeAllItems();
-            cbM01Fog.addItem("Any");
-            cbM01Fog.addItem("Horn");
-            cbM01Fog.addItem("Siren");
-            cbM01Fog.addItem("Dia");
-            cbM01Fog.addItem("Bell");
-            cbM01Fog.addItem("Whis");
-            cbM01Fog.addItem("Gong");
-            cbM01Fog.addItem("Explos");
-            cbM01Fog.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    if (cbM01Fog.getSelectedIndex() > 0)
-                        buoy.setFogSound(cbM01Fog.getSelectedIndex());
-                    else
-                        buoy.setFogSound(0);
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01Fog;
-    }
-
-    private JTextField getTfM01FogGroup() {
-        if (tfM01FogGroup == null) {
-            tfM01FogGroup = new JTextField();
-            tfM01FogGroup.setBounds(new Rectangle(243, 220, 30, 20));
-            tfM01FogGroup.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setFogGroup(tfM01FogGroup.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01FogGroup;
-    }
-
-    private JTextField getTfM01FogPeriod() {
-        if (tfM01FogPeriod == null) {
-            tfM01FogPeriod = new JTextField();
-            tfM01FogPeriod.setBounds(new Rectangle(345, 220, 30, 20));
-            tfM01FogPeriod.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setFogPeriod(tfM01FogPeriod.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01FogPeriod;
-    }
-
-    private JCheckBox getCM01Fired() {
-        if (cM01Fired == null) {
-            cM01Fired = new JCheckBox();
-            cM01Fired.setBounds(new Rectangle(10, 245, 75, 20));
-            cM01Fired.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cM01Fired.setText(Messages.getString("SmpDialogAction.177")); //$NON-NLS-1$
-            cM01Fired.addItemListener(new ItemListener() {
-                public void itemStateChanged(ItemEvent e) {
-                    if (buoy == null) {
-                        return;
-                    }
-                    buoy.setFired(cM01Fired.isSelected());
-                    buoy.setLightColour();
-                    buoy.paintSign();
-                }
-            });
-        }
-
-        return cM01Fired;
-    }
-
-    private JComboBox getCbM01Kennung() {
-        if (cbM01Kennung == null) {
-            cbM01Kennung = new JComboBox();
-            cbM01Kennung.setBounds(new Rectangle(305, 245, 70, 20));
-            cbM01Kennung.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    int i1, i2;
-                    String c = ""; //$NON-NLS-1$ //$NON-NLS-2$
-                    String it = (String) cbM01Kennung.getSelectedItem();
-
-                    if (it == null)
-                        return;
-                    if (it.equals(Messages.getString("SmpDialogAction.212"))) //$NON-NLS-1$
-                        return;
-                    if (buoy == null)
-                        return;
-
-                    if (it.contains("(")) {
-                        i1 = it.indexOf("(");
-                        i2 = it.indexOf(")");
-                        c = it.substring(i1 + 1, i2);
-                        it = it.substring(0, i1) + it.substring(i2 + 1);
-                    }
-                    if (!c.isEmpty())
-                        buoy.setLightGroup(c);
-                    ;
-                    buoy.setLightChar(it);
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01Kennung;
-    }
-
-    private JTextField getTfM01Height() {
-        if (tfM01Height == null) {
-            tfM01Height = new JTextField();
-            tfM01Height.setBounds(new Rectangle(54, 270, 30, 20));
-            tfM01Height.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setHeight(tfM01Height.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01Height;
-    }
-
-    private JTextField getTfM01Range() {
-        if (tfM01Range == null) {
-            tfM01Range = new JTextField();
-            tfM01Range.setBounds(new Rectangle(151, 270, 30, 20));
-            tfM01Range.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setRange(tfM01Range.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01Range;
-    }
-
-    private JTextField getTfM01Group() {
-        if (tfM01Group == null) {
-            tfM01Group = new JTextField();
-            tfM01Group.setBounds(new Rectangle(255, 270, 30, 20));
-            tfM01Group.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setLightGroup(tfM01Group.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01Group;
-    }
-
-    private JTextField getTfM01RepeatTime() {
-        if (tfM01RepeatTime == null) {
-            tfM01RepeatTime = new JTextField();
-            tfM01RepeatTime.setBounds(new Rectangle(345, 270, 30, 20));
-            tfM01RepeatTime.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    buoy.setLightPeriod(tfM01RepeatTime.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-
-            tfM01RepeatTime.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setLightPeriod(tfM01RepeatTime.getText().trim());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return tfM01RepeatTime;
-    }
-
-    private JComboBox getCbM01Colour() {
-        if (cbM01Colour == null) {
-            cbM01Colour = new JComboBox();
-            cbM01Colour.setBounds(new Rectangle(165, 295, 40, 20));
-            cbM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01Colour.addItem(""); //$NON-NLS-1$
-            cbM01Colour.addItem(Messages.getString("SmpDialogAction.190")); //$NON-NLS-1$
-            cbM01Colour.addItem(Messages.getString("SmpDialogAction.191")); //$NON-NLS-1$
-            cbM01Colour.addItem(Messages.getString("SmpDialogAction.192")); //$NON-NLS-1$
-            cbM01Colour.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    buoy.setLightColour((String) cbM01Colour.getSelectedItem());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01Colour;
-    }
-
-    private JComboBox getCbM01Sector() {
-        if (cbM01Sector == null) {
-            cbM01Sector = new JComboBox();
-            cbM01Sector.setBounds(new Rectangle(55, 295, 50, 20));
-            cbM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.194")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.195")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.196")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.197")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.198")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.199")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.200")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.201")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.202")); //$NON-NLS-1$
-            cbM01Sector.addItem(Messages.getString("SmpDialogAction.203")); //$NON-NLS-1$
-            cbM01Sector.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    buoy.setSectorIndex(cbM01Sector.getSelectedIndex());
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cbM01Sector;
-    }
-
-    private JTextField getTfM01Bearing() {
-        if (tfM01Bearing == null) {
-            tfM01Bearing = new JTextField();
-            tfM01Bearing.setBounds(new Rectangle(255, 295, 30, 20));
-            tfM01Bearing.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setBearing1(tfM01Bearing.getText().trim());
-                }
-            });
-        }
-        return tfM01Bearing;
-    }
-
-    private JTextField getTfM02Bearing() {
-        if (tfM02Bearing == null) {
-            tfM02Bearing = new JTextField();
-            tfM02Bearing.setBounds(new Rectangle(300, 295, 30, 20));
-            tfM02Bearing.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setBearing2(tfM02Bearing.getText().trim());
-                }
-            });
-        }
-        return tfM02Bearing;
-    }
-
-    private JTextField getTfM01Radius() {
-        if (tfM01Radius == null) {
-            tfM01Radius = new JTextField();
-            tfM01Radius.setBounds(new Rectangle(355, 295, 30, 20));
-            tfM01Radius.addFocusListener(new FocusAdapter() {
-                public void focusLost(FocusEvent e) {
-                    buoy.setRadius(tfM01Radius.getText().trim());
-                }
-            });
-        }
-        return tfM01Radius;
-    }
-
-    private JButton getBM01Close() {
-        if (bM01Close == null) {
-            bM01Close = new JButton();
-            bM01Close.setBounds(new Rectangle(20, 325, 110, 20));
-            bM01Close.setText(tr("Close"));
-            bM01Close.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    // aufraeumen
-                    if (obuoy != null)
-                        PicRebuild();
-                    // Deaktivierung des Listeners
-                    DataSet.removeSelectionListener(SmpListener);
-                    Selection = null;
-                    SmpItem.setEnabled(true);
-                    onode = null;
-
-                    dM01SeaMap.dispose();
-                }
-            });
-        }
-
-        return bM01Close;
-    }
-
-    private JButton getBM01Save() {
-        if (bM01Save == null) {
-            bM01Save = new JButton();
-            bM01Save.setBounds(new Rectangle(150, 325, 110, 20));
-            bM01Save.setText(tr("Save"));
-            bM01Save.setEnabled(false);
-
-            bM01Save.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
-                            "/images/Auge.png"))); //$NON-NLS-1$
-                    cM01IconVisible.setSelected(true);
-
-                    buoy.saveSign();
-                }
-            });
-        }
-
-        return bM01Save;
-    }
-
-    private JCheckBox getCM01IconVisible() {
-        if (cM01IconVisible == null) {
-            cM01IconVisible = new JCheckBox();
-            cM01IconVisible.setBounds(new Rectangle(310, 325, 30, 21));
-            cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
-                    "/images/AugeN.png"))); //$NON-NLS-1$
-            cM01IconVisible.setSelected(false);
-            cM01IconVisible.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    Command c;
-                    Node n = null;
-                    DataSet ds = Main.main.getCurrentDataSet();
-
-                    if (buoy != null)
-                        n = buoy.getNode();
-
-                    if (cM01IconVisible.isSelected()) {
-                        cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
-                                "/images/AugeN.png"))); //$NON-NLS-1$
-                        if (n != null) {
-                            // seamark loeschen, wenn notwendig
-                            if (n.getKeys().containsKey("seamark")) { //$NON-NLS-1$
-                                smb = n.getKeys().get("seamark"); // smb merken //$NON-NLS-1$
-
-                                c = new ChangePropertyCommand(n, "seamark", null); //$NON-NLS-1$
-                                c.executeCommand();
-                                ds.fireSelectionChanged();
-                                obuoy = buoy;
-                            }
-
-                            // seamark:type loeschen, wenn notwendig
-                            if (n.getKeys().containsKey("seamark:type")) { //$NON-NLS-1$
-                                smt = n.getKeys().get("seamark:type"); // smt merken //$NON-NLS-1$
-
-                                c = new ChangePropertyCommand(n, "seamark:type", null); //$NON-NLS-1$
-                                c.executeCommand();
-                                ds.fireSelectionChanged();
-                                obuoy = buoy;
-                            }
-
-                        }
-                    } else {
-                        cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
-                                "/images/Auge.png"))); //$NON-NLS-1$
-                        PicRebuild();
-                        obuoy = null;
-                    }
-                    buoy.paintSign();
-                }
-            });
-        }
-        return cM01IconVisible;
-    }
-
-    private JTextField getSM01StatusBar() {
-        if (sM01StatusBar == null) {
-            sM01StatusBar = new JTextField();
-            sM01StatusBar.setBounds(new Rectangle(7, 355, 385, 20));
-            sM01StatusBar.setBackground(SystemColor.activeCaptionBorder);
-        }
-        return sM01StatusBar;
-    }
+	private JTextField getTfM01Name() {
+		if (tfM01Name == null) {
+			tfM01Name = new JTextField();
+			tfM01Name.setBounds(new Rectangle(50, 120, 150, 20));
+			tfM01Name.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setName(tfM01Name.getText());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01Name;
+	}
+
+	private JCheckBox getCM01TopMark() {
+		if (cM01TopMark == null) {
+			cM01TopMark = new JCheckBox();
+			cM01TopMark.setBounds(new Rectangle(10, 170, 100, 20));
+			cM01TopMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cM01TopMark.setText(Messages.getString("SmpDialogAction.166")); //$NON-NLS-1$
+			cM01TopMark.addItemListener(new ItemListener() {
+				public void itemStateChanged(ItemEvent e) {
+					if (buoy == null) {
+						return;
+					}
+					buoy.setTopMark(cM01TopMark.isSelected());
+					buoy.paintSign();
+				}
+			});
+		}
+		return cM01TopMark;
+	}
+
+	private JComboBox getCbM01TopMark() {
+		if (cbM01TopMark == null) {
+			cbM01TopMark = new JComboBox();
+			cbM01TopMark.setBounds(new Rectangle(110, 170, 80, 20));
+			cbM01TopMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01TopMark.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					int top = cbM01TopMark.getSelectedIndex();
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01TopMark;
+	}
+
+	private JCheckBox getCM01Radar() {
+		if (cM01Radar == null) {
+			cM01Radar = new JCheckBox();
+			cM01Radar.setBounds(new Rectangle(10, 195, 120, 20));
+			cM01Radar.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cM01Radar.setText(Messages.getString("SmpDialogAction.169")); //$NON-NLS-1$
+			cM01Radar.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					if (cM01Radar.isSelected()) {
+						buoy.setRadar(true);
+						buoy.setRacon(false);
+						cM01Racon.setSelected(false);
+					} else {
+						buoy.setRadar(false);
+					}
+					buoy.paintSign();
+				}
+			});
+		}
+		return cM01Radar;
+	}
+
+	private JCheckBox getCM01Racon() {
+		if (cM01Racon == null) {
+			cM01Racon = new JCheckBox();
+			cM01Racon.setBounds(new Rectangle(130, 195, 110, 20));
+			cM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cM01Racon.setText(Messages.getString("SmpDialogAction.171")); //$NON-NLS-1$
+			cM01Racon.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					if (cM01Racon.isSelected()) {
+						buoy.setRacon(true);
+						buoy.setRadar(false);
+						cM01Radar.setSelected(false);
+					} else {
+						buoy.setRacon(false);
+					}
+					buoy.paintSign();
+				}
+			});
+		}
+		return cM01Racon;
+	}
+
+	private JComboBox getCbM01Racon() {
+		if (cbM01Racon == null) {
+			cbM01Racon = new JComboBox();
+			cbM01Racon.setBounds(new Rectangle(240, 195, 80, 20));
+			cbM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01Racon.removeAllItems();
+			cbM01Racon.addItem("Any");
+			cbM01Racon.addItem("Racon");
+			cbM01Racon.addItem("Ramark");
+			cbM01Racon.addItem("Leading");
+			cbM01Racon.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					int rac = cbM01Racon.getSelectedIndex();
+					buoy.setRaType(rac);
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01Racon;
+	}
+
+	private JTextField getTfM01Racon() {
+		if (tfM01Racon == null) {
+			tfM01Racon = new JTextField();
+			tfM01Racon.setBounds(new Rectangle(345, 195, 30, 20));
+			tfM01Racon.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setRaconGroup(tfM01Racon.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01Racon;
+	}
+
+	private JCheckBox getCM01Fog() {
+		if (cM01Fog == null) {
+			cM01Fog = new JCheckBox();
+			cM01Fog.setBounds(new Rectangle(10, 220, 90, 20));
+			cM01Fog.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cM01Fog.setText(Messages.getString("SmpDialogAction.174")); //$NON-NLS-1$
+			cM01Fog.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					buoy.setFog(cM01Fog.isSelected());
+					buoy.paintSign();
+				}
+			});
+		}
+		return cM01Fog;
+	}
+
+	private JComboBox getCbM01Fog() {
+		if (cbM01Fog == null) {
+			cbM01Fog = new JComboBox();
+			cbM01Fog.setBounds(new Rectangle(100, 220, 70, 20));
+			cbM01Fog.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01Fog.removeAllItems();
+			cbM01Fog.addItem("Any");
+			cbM01Fog.addItem("Horn");
+			cbM01Fog.addItem("Siren");
+			cbM01Fog.addItem("Dia");
+			cbM01Fog.addItem("Bell");
+			cbM01Fog.addItem("Whis");
+			cbM01Fog.addItem("Gong");
+			cbM01Fog.addItem("Explos");
+			cbM01Fog.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					if (cbM01Fog.getSelectedIndex() > 0)
+						buoy.setFogSound(cbM01Fog.getSelectedIndex());
+					else
+						buoy.setFogSound(0);
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01Fog;
+	}
+
+	private JTextField getTfM01FogGroup() {
+		if (tfM01FogGroup == null) {
+			tfM01FogGroup = new JTextField();
+			tfM01FogGroup.setBounds(new Rectangle(243, 220, 30, 20));
+			tfM01FogGroup.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setFogGroup(tfM01FogGroup.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01FogGroup;
+	}
+
+	private JTextField getTfM01FogPeriod() {
+		if (tfM01FogPeriod == null) {
+			tfM01FogPeriod = new JTextField();
+			tfM01FogPeriod.setBounds(new Rectangle(345, 220, 30, 20));
+			tfM01FogPeriod.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setFogPeriod(tfM01FogPeriod.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01FogPeriod;
+	}
+
+	private JCheckBox getCM01Fired() {
+		if (cM01Fired == null) {
+			cM01Fired = new JCheckBox();
+			cM01Fired.setBounds(new Rectangle(10, 245, 75, 20));
+			cM01Fired.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cM01Fired.setText(Messages.getString("SmpDialogAction.177")); //$NON-NLS-1$
+			cM01Fired.addItemListener(new ItemListener() {
+				public void itemStateChanged(ItemEvent e) {
+					if (buoy == null) {
+						return;
+					}
+					buoy.setFired(cM01Fired.isSelected());
+					buoy.setLightColour();
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return cM01Fired;
+	}
+
+	private JComboBox getCbM01Kennung() {
+		if (cbM01Kennung == null) {
+			cbM01Kennung = new JComboBox();
+			cbM01Kennung.setBounds(new Rectangle(305, 245, 70, 20));
+			cbM01Kennung.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					int i1, i2;
+					String c = ""; //$NON-NLS-1$ //$NON-NLS-2$
+					String it = (String) cbM01Kennung.getSelectedItem();
+
+					if (it == null)
+						return;
+					if (it.equals(Messages.getString("SmpDialogAction.212"))) //$NON-NLS-1$
+						return;
+					if (buoy == null)
+						return;
+
+					if (it.contains("(")) {
+						i1 = it.indexOf("(");
+						i2 = it.indexOf(")");
+						c = it.substring(i1 + 1, i2);
+						it = it.substring(0, i1) + it.substring(i2 + 1);
+					}
+					if (!c.isEmpty())
+						buoy.setLightGroup(c);
+					;
+					buoy.setLightChar(it);
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01Kennung;
+	}
+
+	private JTextField getTfM01Height() {
+		if (tfM01Height == null) {
+			tfM01Height = new JTextField();
+			tfM01Height.setBounds(new Rectangle(54, 270, 30, 20));
+			tfM01Height.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setHeight(tfM01Height.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01Height;
+	}
+
+	private JTextField getTfM01Range() {
+		if (tfM01Range == null) {
+			tfM01Range = new JTextField();
+			tfM01Range.setBounds(new Rectangle(151, 270, 30, 20));
+			tfM01Range.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setRange(tfM01Range.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01Range;
+	}
+
+	private JTextField getTfM01Group() {
+		if (tfM01Group == null) {
+			tfM01Group = new JTextField();
+			tfM01Group.setBounds(new Rectangle(255, 270, 30, 20));
+			tfM01Group.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setLightGroup(tfM01Group.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01Group;
+	}
+
+	private JTextField getTfM01RepeatTime() {
+		if (tfM01RepeatTime == null) {
+			tfM01RepeatTime = new JTextField();
+			tfM01RepeatTime.setBounds(new Rectangle(345, 270, 30, 20));
+			tfM01RepeatTime.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					buoy.setLightPeriod(tfM01RepeatTime.getText().trim());
+					buoy.paintSign();
+				}
+			});
+
+			tfM01RepeatTime.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setLightPeriod(tfM01RepeatTime.getText().trim());
+					buoy.paintSign();
+				}
+			});
+		}
+		return tfM01RepeatTime;
+	}
+
+	private JComboBox getCbM01Colour() {
+		if (cbM01Colour == null) {
+			cbM01Colour = new JComboBox();
+			cbM01Colour.setBounds(new Rectangle(165, 295, 40, 20));
+			cbM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01Colour.addItem(""); //$NON-NLS-1$
+			cbM01Colour.addItem(Messages.getString("SmpDialogAction.190")); //$NON-NLS-1$
+			cbM01Colour.addItem(Messages.getString("SmpDialogAction.191")); //$NON-NLS-1$
+			cbM01Colour.addItem(Messages.getString("SmpDialogAction.192")); //$NON-NLS-1$
+			cbM01Colour.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					buoy.setLightColour((String) cbM01Colour.getSelectedItem());
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01Colour;
+	}
+
+	private JComboBox getCbM01Sector() {
+		if (cbM01Sector == null) {
+			cbM01Sector = new JComboBox();
+			cbM01Sector.setBounds(new Rectangle(55, 295, 50, 20));
+			cbM01Sector.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.194")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.195")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.196")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.197")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.198")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.199")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.200")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.201")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.202")); //$NON-NLS-1$
+			cbM01Sector.addItem(Messages.getString("SmpDialogAction.203")); //$NON-NLS-1$
+			cbM01Sector.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					buoy.setSectorIndex(cbM01Sector.getSelectedIndex());
+					buoy.paintSign();
+				}
+			});
+		}
+		return cbM01Sector;
+	}
+
+	private JTextField getTfM01Bearing() {
+		if (tfM01Bearing == null) {
+			tfM01Bearing = new JTextField();
+			tfM01Bearing.setBounds(new Rectangle(255, 295, 30, 20));
+			tfM01Bearing.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setBearing1(tfM01Bearing.getText().trim());
+				}
+			});
+		}
+		return tfM01Bearing;
+	}
+
+	private JTextField getTfM02Bearing() {
+		if (tfM02Bearing == null) {
+			tfM02Bearing = new JTextField();
+			tfM02Bearing.setBounds(new Rectangle(300, 295, 30, 20));
+			tfM02Bearing.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setBearing2(tfM02Bearing.getText().trim());
+				}
+			});
+		}
+		return tfM02Bearing;
+	}
+
+	private JTextField getTfM01Radius() {
+		if (tfM01Radius == null) {
+			tfM01Radius = new JTextField();
+			tfM01Radius.setBounds(new Rectangle(355, 295, 30, 20));
+			tfM01Radius.addFocusListener(new FocusAdapter() {
+				public void focusLost(FocusEvent e) {
+					buoy.setRadius(tfM01Radius.getText().trim());
+				}
+			});
+		}
+		return tfM01Radius;
+	}
+
+	private JButton getBM01Close() {
+		if (bM01Close == null) {
+			bM01Close = new JButton();
+			bM01Close.setBounds(new Rectangle(20, 325, 110, 20));
+			bM01Close.setText(tr("Close"));
+			bM01Close.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					// aufraeumen
+					if (obuoy != null)
+						PicRebuild();
+					// Deaktivierung des Listeners
+					DataSet.removeSelectionListener(SmpListener);
+					Selection = null;
+					SmpItem.setEnabled(true);
+					onode = null;
+
+					dM01SeaMap.dispose();
+				}
+			});
+		}
+
+		return bM01Close;
+	}
+
+	private JButton getBM01Save() {
+		if (bM01Save == null) {
+			bM01Save = new JButton();
+			bM01Save.setBounds(new Rectangle(150, 325, 110, 20));
+			bM01Save.setText(tr("Save"));
+			bM01Save.setEnabled(false);
+
+			bM01Save.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Auge.png"))); //$NON-NLS-1$
+					cM01IconVisible.setSelected(true);
+
+					buoy.saveSign();
+				}
+			});
+		}
+
+		return bM01Save;
+	}
+
+	private JCheckBox getCM01IconVisible() {
+		if (cM01IconVisible == null) {
+			cM01IconVisible = new JCheckBox();
+			cM01IconVisible.setBounds(new Rectangle(310, 325, 30, 21));
+			cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+					"/images/AugeN.png"))); //$NON-NLS-1$
+			cM01IconVisible.setSelected(false);
+			cM01IconVisible.addActionListener(new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					Command c;
+					Node n = null;
+					DataSet ds = Main.main.getCurrentDataSet();
+
+					if (buoy != null)
+						n = buoy.getNode();
+
+					if (cM01IconVisible.isSelected()) {
+						cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+								"/images/AugeN.png"))); //$NON-NLS-1$
+						if (n != null) {
+							// seamark loeschen, wenn notwendig
+							if (n.getKeys().containsKey("seamark")) { //$NON-NLS-1$
+								smb = n.getKeys().get("seamark"); // smb merken //$NON-NLS-1$
+
+								c = new ChangePropertyCommand(n, "seamark", null); //$NON-NLS-1$
+								c.executeCommand();
+								ds.fireSelectionChanged();
+								obuoy = buoy;
+							}
+
+							// seamark:type loeschen, wenn notwendig
+							if (n.getKeys().containsKey("seamark:type")) { //$NON-NLS-1$
+								smt = n.getKeys().get("seamark:type"); // smt merken //$NON-NLS-1$
+
+								c = new ChangePropertyCommand(n, "seamark:type", null); //$NON-NLS-1$
+								c.executeCommand();
+								ds.fireSelectionChanged();
+								obuoy = buoy;
+							}
+
+						}
+					} else {
+						cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Auge.png"))); //$NON-NLS-1$
+						PicRebuild();
+						obuoy = null;
+					}
+					buoy.paintSign();
+				}
+			});
+		}
+		return cM01IconVisible;
+	}
+
+	private JTextField getSM01StatusBar() {
+		if (sM01StatusBar == null) {
+			sM01StatusBar = new JTextField();
+			sM01StatusBar.setBounds(new Rectangle(7, 355, 385, 20));
+			sM01StatusBar.setBackground(SystemColor.activeCaptionBorder);
+		}
+		return sM01StatusBar;
+	}
 
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 23269)
@@ -14,191 +14,191 @@
 abstract public class SeaMark {
 
-    /**
-     * CONSTANTS
-     */
-
-    /**
-     * Colours
-     */
-
-    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 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;
-    
-    /**
-     * Radar Beacons - correspond to Ratyp Index
-     */
-    
-    public final static int UNKNOWN_RATYPE = 0;
-    public final static int RATYPE_RACON = 1;
-    public final static int RATYPE_RAMARK = 2;
-    public final static int RATYPE_LEADING = 3;
-
-    /**
-     * Fog Signals - correspond to FogSound Index
-     */
-    
-    public final static int UNKNOWN_FOG = 0;
-    public final static int FOG_HORN = 1;
-    public final static int FOG_SIREN = 2;
-    public final static int FOG_DIA = 3;
-    public final static int FOG_BELL = 4;
-    public final static int FOG_WHIS = 5;
-    public final static int FOG_GONG = 6;
-    public final static int FOG_EXPLOS = 7;
-
-    /**
-     * Variables
-     */
-
-    /**
-     * private Variablen
-     */
-
-    public abstract void paintSign();
-
-    public abstract void saveSign();
-
-    private int Colour = UNKNOWN_COLOUR;
-
-    public int getColour() {
-        return Colour;
-    }
-
-    public void setColour(int colour) {
-        if (colour < UNKNOWN_COLOUR || colour > RED_WHITE) {
-            return;
-        }
-        Colour = colour;
-
-    }
-
-    private String ErrMsg = null;
-
-    public String getErrMsg() {
-        return ErrMsg;
-    }
-
-    public void setErrMsg(String errMsg) {
-        ErrMsg = errMsg;
-    }
-
-    private String Name;
-
-    public String getName() {
-        return Name;
-    }
-
-    public void setName(String name) {
-        Name = name;
-    }
-
-    private boolean valid = true;
-
-    public boolean isValid() {
-        return valid;
-    }
-
-    public void setValid(boolean valid) {
-        this.valid = valid;
-
-    }
-
-    protected void delSeaMarkKeys(Node node) {
-        Iterator<String> it = node.getKeys().keySet().iterator();
-        String str;
-
-        while (it.hasNext()) {
-            str = it.next();
-
-            if (str.contains("seamark") == true)
-                if (str.compareTo("seamark") != 0) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node, str, null));
-                }
-        }
-    }
+	/**
+	 * CONSTANTS
+	 */
+
+	/**
+	 * Colours
+	 */
+
+	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 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;
+
+	/**
+	 * Radar Beacons - correspond to Ratyp Index
+	 */
+
+	public final static int UNKNOWN_RATYPE = 0;
+	public final static int RATYPE_RACON = 1;
+	public final static int RATYPE_RAMARK = 2;
+	public final static int RATYPE_LEADING = 3;
+
+	/**
+	 * Fog Signals - correspond to FogSound Index
+	 */
+
+	public final static int UNKNOWN_FOG = 0;
+	public final static int FOG_HORN = 1;
+	public final static int FOG_SIREN = 2;
+	public final static int FOG_DIA = 3;
+	public final static int FOG_BELL = 4;
+	public final static int FOG_WHIS = 5;
+	public final static int FOG_GONG = 6;
+	public final static int FOG_EXPLOS = 7;
+
+	/**
+	 * Variables
+	 */
+
+	/**
+	 * private Variablen
+	 */
+
+	public abstract void paintSign();
+
+	public abstract void saveSign();
+
+	private int Colour = UNKNOWN_COLOUR;
+
+	public int getColour() {
+		return Colour;
+	}
+
+	public void setColour(int colour) {
+		if (colour < UNKNOWN_COLOUR || colour > RED_WHITE) {
+			return;
+		}
+		Colour = colour;
+
+	}
+
+	private String ErrMsg = null;
+
+	public String getErrMsg() {
+		return ErrMsg;
+	}
+
+	public void setErrMsg(String errMsg) {
+		ErrMsg = errMsg;
+	}
+
+	private String Name;
+
+	public String getName() {
+		return Name;
+	}
+
+	public void setName(String name) {
+		Name = name;
+	}
+
+	private boolean valid = true;
+
+	public boolean isValid() {
+		return valid;
+	}
+
+	public void setValid(boolean valid) {
+		this.valid = valid;
+
+	}
+
+	protected void delSeaMarkKeys(Node node) {
+		Iterator<String> it = node.getKeys().keySet().iterator();
+		String str;
+
+		while (it.hasNext()) {
+			str = it.next();
+
+			if (str.contains("seamark") == true)
+				if (str.compareTo("seamark") != 0) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, str, null));
+				}
+		}
+	}
 
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 23269)
@@ -23,135 +23,135 @@
 abstract public class Buoy extends SeaMark {
 
-    public abstract void setLightColour();
-
-    /**
-     * private Variablen
-     */
-
-    private int BuoyIndex = 0;
-
-    public int getBuoyIndex() {
-        return BuoyIndex;
-    }
-
-    public void setBuoyIndex(int buoyIndex) {
-        BuoyIndex = buoyIndex;
-    }
-
-    private int StyleIndex = 0;
-
-    public int getStyleIndex() {
-        return StyleIndex;
-    }
-
-    public void setStyleIndex(int styleIndex) {
-        StyleIndex = styleIndex;
-    }
-
-    private boolean Region = false;
-
-    public boolean getRegion() {
-        return Region;
-    }
-
-    public void setRegion(boolean region) {
-        Region = region;
-    }
-
-    private boolean Radar = false;
-
-    public boolean hasRadar() {
-        return Radar;
-    }
-
-    public void setRadar(boolean radar) {
-        Radar = radar;
-    }
-
-    private boolean Racon = false;
-
-    public boolean hasRacon() {
-        return Racon;
-    }
-
-    public void setRacon(boolean racon) {
-        Racon = racon;
-    }
-
-    private int RaType = 0;
-
-    public int getRaType() {
-        return RaType;
-    }
-
-    public void setRaType(int type) {
-        RaType = type;
-    }
-
-    private String RaconGroup = "";
-
-    public String getRaconGroup() {
-        return RaconGroup;
-    }
-
-    public void setRaconGroup(String raconGroup) {
-        RaconGroup = raconGroup;
-    }
-
-    private boolean Fog = false;
-
-    public boolean hasFog() {
-        return Fog;
-    }
-
-    public void setFog(boolean fog) {
-        Fog = fog;
-    }
-
-    private int FogSound = 0;
-
-    public int getFogSound() {
-        return FogSound;
-    }
-
-    public void setFogSound(int sound) {
-        FogSound = sound;
-    }
-
-    private String FogGroup = "";
-
-    public String getFogGroup() {
-        return FogGroup;
-    }
-
-    public void setFogGroup(String group) {
-        FogGroup = group;
-    }
-
-    private String FogPeriod = "";
-
-    public String getFogPeriod() {
-        return FogPeriod;
-    }
-
-    public void setFogPeriod(String period) {
-        FogPeriod = period;
-    }
-
-    private boolean Fired = false;
-
-    public boolean isFired() {
-        return Fired;
-    }
-
-    public void setFired(boolean fired) {
-        Fired = fired;
-    }
-
-    private boolean Sectored = false;
-
-    public boolean isSectored() {
-        return Sectored;
-    }
+	public abstract void setLightColour();
+
+	/**
+	 * private Variablen
+	 */
+
+	private int BuoyIndex = 0;
+
+	public int getBuoyIndex() {
+		return BuoyIndex;
+	}
+
+	public void setBuoyIndex(int buoyIndex) {
+		BuoyIndex = buoyIndex;
+	}
+
+	private int StyleIndex = 0;
+
+	public int getStyleIndex() {
+		return StyleIndex;
+	}
+
+	public void setStyleIndex(int styleIndex) {
+		StyleIndex = styleIndex;
+	}
+
+	private boolean Region = false;
+
+	public boolean getRegion() {
+		return Region;
+	}
+
+	public void setRegion(boolean region) {
+		Region = region;
+	}
+
+	private boolean Radar = false;
+
+	public boolean hasRadar() {
+		return Radar;
+	}
+
+	public void setRadar(boolean radar) {
+		Radar = radar;
+	}
+
+	private boolean Racon = false;
+
+	public boolean hasRacon() {
+		return Racon;
+	}
+
+	public void setRacon(boolean racon) {
+		Racon = racon;
+	}
+
+	private int RaType = 0;
+
+	public int getRaType() {
+		return RaType;
+	}
+
+	public void setRaType(int type) {
+		RaType = type;
+	}
+
+	private String RaconGroup = "";
+
+	public String getRaconGroup() {
+		return RaconGroup;
+	}
+
+	public void setRaconGroup(String raconGroup) {
+		RaconGroup = raconGroup;
+	}
+
+	private boolean Fog = false;
+
+	public boolean hasFog() {
+		return Fog;
+	}
+
+	public void setFog(boolean fog) {
+		Fog = fog;
+	}
+
+	private int FogSound = 0;
+
+	public int getFogSound() {
+		return FogSound;
+	}
+
+	public void setFogSound(int sound) {
+		FogSound = sound;
+	}
+
+	private String FogGroup = "";
+
+	public String getFogGroup() {
+		return FogGroup;
+	}
+
+	public void setFogGroup(String group) {
+		FogGroup = group;
+	}
+
+	private String FogPeriod = "";
+
+	public String getFogPeriod() {
+		return FogPeriod;
+	}
+
+	public void setFogPeriod(String period) {
+		FogPeriod = period;
+	}
+
+	private boolean Fired = false;
+
+	public boolean isFired() {
+		return Fired;
+	}
+
+	public void setFired(boolean fired) {
+		Fired = fired;
+	}
+
+	private boolean Sectored = false;
+
+	public boolean isSectored() {
+		return Sectored;
+	}
 
 	public void setSectored(boolean sectored) {
@@ -172,924 +172,924 @@
 	}
 
-    private int SectorIndex = 0;
-
-    public int getSectorIndex() {
-        return SectorIndex;
-    }
-
-    public void setSectorIndex(int sector) {
-        SectorIndex = sector;
-    }
-
-    private String[] LightChar = new String[10];
-
-    public String getLightChar() {
-        if (LightChar[SectorIndex] == null)
-            return (LightChar[0]);
-        return LightChar[SectorIndex];
-    }
-
-    public void setLightChar(String lightChar) {
-        if (SectorIndex == 0) {
-            LightChar = new String[10];
-            LightChar[0] = lightChar;
-        } else if (LightChar[0].isEmpty())
-            LightChar[SectorIndex] = lightChar;
-    }
-
-    private String[] LightColour = new String[10];
-
-    public String getLightColour() {
-        if (LightColour[SectorIndex] == null)
-            return (LightColour[0]);
-        return LightColour[SectorIndex];
-    }
-
-    public void setLightColour(String lightColour) {
-        LightColour[SectorIndex] = lightColour;
-    }
-
-    private String[] LightGroup = new String[10];
-
-    public String getLightGroup() {
-        if (LightGroup[SectorIndex] == null)
-            return (LightGroup[0]);
-        return LightGroup[SectorIndex];
-    }
-
-    public void setLightGroup(String lightGroup) {
-        if (SectorIndex == 0)
-            LightGroup = new String[10];
-        LightGroup[SectorIndex] = lightGroup;
-    }
-
-    protected void setLightGroup(Map<String, String> k) {
-        String s = "";
-        if (k.containsKey("seamark:light:group")) {
-            s = k.get("seamark:light:group");
-            setLightGroup(s);
-        }
-    }
-
-    private String[] Height = new String[10];
-
-    public String getHeight() {
-        if (Height[SectorIndex] == null)
-            return (Height[0]);
-        return Height[SectorIndex];
-    }
-
-    public void setHeight(String height) {
-        if (SectorIndex == 0)
-            Height = new String[10];
-        Height[SectorIndex] = height;
-    }
-
-    private String[] Range = new String[10];
-
-    public String getRange() {
-        if (Range[SectorIndex] == null)
-            return (Range[0]);
-        return Range[SectorIndex];
-    }
-
-    public void setRange(String range) {
-        if (SectorIndex == 0)
-            Range = new String[10];
-        Range[SectorIndex] = range;
-    }
-
-    private String[] Bearing1 = new String[10];
-
-    public String getBearing1() {
-        if (Bearing1[SectorIndex] == null)
-            return (Bearing1[0]);
-        return Bearing1[SectorIndex];
-    }
-
-    public void setBearing1(String bearing) {
-        if (SectorIndex == 0)
-            Bearing1 = new String[10];
-        Bearing1[SectorIndex] = bearing;
-    }
-
-    private String[] Bearing2 = new String[10];
-
-    public String getBearing2() {
-        if (Bearing2[SectorIndex] == null)
-            return (Bearing2[0]);
-        return Bearing2[SectorIndex];
-    }
-
-    public void setBearing2(String bearing) {
-        if (SectorIndex == 0)
-            Bearing2 = new String[10];
-        Bearing2[SectorIndex] = bearing;
-    }
-
-    private String[] Radius = new String[10];
-
-    public String getRadius() {
-        if (Radius[SectorIndex] == null)
-            return (Radius[0]);
-        return Radius[SectorIndex];
-    }
-
-    public void setRadius(String radius) {
-        if (SectorIndex == 0)
-            Radius = new String[10];
-        Radius[SectorIndex] = radius;
-    }
-
-    private String[] LightPeriod = new String[10];
-
-    public String getLightPeriod() {
-        if (LightPeriod[SectorIndex] == null)
-            return (LightPeriod[0]);
-        return LightPeriod[SectorIndex];
-    }
-
-    public void setLightPeriod(String lightPeriod) {
-        String regex = "^[\\d\\s.]+$";
-
-        if (!lightPeriod.isEmpty()) {
-
-            Pattern pat = Pattern.compile(regex);
-            Matcher matcher = pat.matcher(lightPeriod);
-
-            if (matcher.find()) {
-                setErrMsg(null);
-            } else {
-                setErrMsg("Must be a number");
-                lightPeriod = "";
-                dlg.tfM01RepeatTime.requestFocus();
-            }
-        }
-        if (SectorIndex == 0)
-            LightPeriod = new String[10];
-        LightPeriod[SectorIndex] = lightPeriod;
-    }
-
-    private Node Node = null;
-
-    public Node getNode() {
-        return Node;
-    }
-
-    public void setNode(Node node) {
-        Node = node;
-    }
-
-    private boolean TopMark = false;
-
-    public boolean hasTopMark() {
-        return TopMark;
-    }
-
-    public void setTopMark(boolean topMark) {
-        TopMark = topMark;
-        /*
-         * if (dlg.cM01TopMark == null) { return; }
-         */
-        dlg.cM01TopMark.setSelected(topMark);
-    }
-
-    protected SmpDialogAction dlg = null; // hier wird der Dialog referenziert
-
-    public SmpDialogAction getDlg() {
-        return dlg;
-    }
-
-    public void setDlg(SmpDialogAction dlg) {
-        this.dlg = dlg;
-    }
-
-    protected Buoy(SmpDialogAction dia) {
-        dlg = dia;
-    }
-
-    public boolean isValid() {
-        return false;
-    }
-
-    public void parseLights(Map<String, String> k) {
-        setFired(false);
-        setSectored(false);
-        Iterator it = k.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
-            String key = (String) entry.getKey();
-            String value = ((String) entry.getValue()).trim();
-            if (key.contains("seamark:light:")) {
-                setFired(true);
-                int index = 0;
-                key = key.substring(14);
-                if (key.matches("^\\d:.*")) {
-                    index = key.charAt(0) - '0';
-                    key = key.substring(2);
-                } else if (key.matches("^\\d$")) {
-                    index = key.charAt(0) - '0';
-                    String values[] = value.split(":");
-                    if (values[0].equals("red"))
-                        LightColour[index] = "R";
-                    else if (values[0].equals("green"))
-                        LightColour[index] = "G";
-                    else if (values[0].equals("white"))
-                        LightColour[index] = "W";
-                    if (values.length > 1)
-                        Bearing1[index] = values[1];
-                    if (values.length > 2)
-                        Bearing2[index] = values[2];
-                    if (values.length > 3)
-                        Radius[index] = values[3];
-                } else {
-                    index = 0;
-                }
-                if (index != 0)
-                    setSectored(true);
-                if (key.equals("colour")) {
-                    if (value.equals("red"))
-                        LightColour[index] = "R";
-                    else if (value.equals("green"))
-                        LightColour[index] = "G";
-                    else if (value.equals("white"))
-                        LightColour[index] = "W";
-                } else if (key.equals("character")) {
-                    LightChar[index] = value;
-                } else if (key.equals("group")) {
-                    LightGroup[index] = value;
-                } else if (key.equals("period")) {
-                    LightPeriod[index] = value;
-                } else if (key.equals("height")) {
-                    Height[index] = value;
-                } else if (key.equals("range")) {
-                    Range[index] = value;
-                }
-            }
-        }
-        setSectorIndex(0);
-        dlg.cbM01Sector.setSelectedIndex(0);
-        dlg.cM01Fired.setSelected(isFired());
-        dlg.rbM01Fired1.setSelected(!isSectored());
-        dlg.rbM01FiredN.setSelected(isSectored());
-        dlg.cbM01Kennung.setSelectedItem(getLightChar());
-        dlg.tfM01Height.setText(getHeight());
-        dlg.tfM01Range.setText(getRange());
-        dlg.tfM01Group.setText(getLightGroup());
-        dlg.tfM01RepeatTime.setText(getLightPeriod());
-        dlg.cbM01Colour.setSelectedItem(getLightColour());
-    }
-
-    public void parseFogRadar(Map<String, String> k) {
-        String str;
-        setFog(false);
-        setRadar(false);
-        setRacon(false);
-        if (k.containsKey("seamark:fog_signal")
-                || k.containsKey("seamark:fog_signal:category")
-                || k.containsKey("seamark:fog_signal:group")
-                || k.containsKey("seamark:fog_signal:period")) {
-            setFog(true);
-            if (k.containsKey("seamark:fog_signal:category")) {
-                str = k.get("seamark:fog_signal:category");
-                if (str.equals("horn"))
-                    setFogSound(FOG_HORN);
-                else if (str.equals("siren"))
-                    setFogSound(FOG_SIREN);
-                else if (str.equals("diaphone"))
-                    setFogSound(FOG_DIA);
-                else if (str.equals("bell"))
-                    setFogSound(FOG_BELL);
-                else if (str.equals("whis"))
-                    setFogSound(FOG_WHIS);
-                else if (str.equals("gong"))
-                    setFogSound(FOG_GONG);
-                else if (str.equals("explosive"))
-                    setFogSound(FOG_EXPLOS);
-                else
-                    setFogSound(UNKNOWN_FOG);
-            }
-            if (k.containsKey("seamark:fog_signal:group"))
-                setFogGroup(k.get("seamark:fog_signal:group"));
-            if (k.containsKey("seamark:fog_signal:period"))
-                setFogPeriod(k.get("seamark:fog_signal:period"));
-        }
-        dlg.cM01Fog.setSelected(hasFog());
-        dlg.cbM01Fog.setSelectedIndex(getFogSound());
-        dlg.tfM01FogGroup.setText(getFogGroup());
-        dlg.tfM01FogPeriod.setText(getFogPeriod());
-
-        if (k.containsKey("seamark:radar_transponder")
-                || k.containsKey("seamark:radar_transponder:category")
-                || k.containsKey("seamark:radar_transponder:group")) {
-            setRacon(true);
-            if (k.containsKey("seamark:radar_transponder:category")) {
-                str = k.get("seamark:radar_transponder:category");
-                if (str.equals("racon"))
-                    setRaType(RATYPE_RACON);
-                else if (str.equals("ramark"))
-                    setRaType(RATYPE_RAMARK);
-                else if (str.equals("leading"))
-                    setRaType(RATYPE_LEADING);
-                else
-                    setRaType(UNKNOWN_RATYPE);
-            }
-            if (k.containsKey("seamark:radar_transponder:group"))
-                setRaconGroup(k.get("seamark:radar_transponder:group"));
-        } else if (k.containsKey("seamark:radar_reflector"))
-            setRadar(true);
-        dlg.cM01Radar.setSelected(hasRadar());
-        dlg.cM01Racon.setSelected(hasRacon());
-        dlg.cbM01Racon.setSelectedIndex(getRaType());
-        dlg.tfM01Racon.setText(getRaconGroup());
-    }
-
-    public void paintSign() {
-
-        if (dlg.paintlock)
-            return;
-        else
-            dlg.paintlock = true;
-
-        dlg.lM01Icon.setIcon(null);
-        dlg.lM02Icon.setIcon(null);
-        dlg.lM03Icon.setIcon(null);
-        dlg.lM04Icon.setIcon(null);
-        dlg.lM05Icon.setIcon(null);
-        dlg.lM06Icon.setIcon(null);
-        dlg.lM01NameMark.setText("");
-        dlg.lM01FireMark.setText("");
-        dlg.lM01FogMark.setText("");
-        dlg.lM01RadarMark.setText("");
-
-        dlg.rbM01RegionA.setSelected(!getRegion());
-        dlg.rbM01RegionB.setSelected(getRegion());
-
-        if (isValid()) {
-            dlg.lM01NameMark.setText(getName());
-
-            dlg.bM01Save.setEnabled(true);
-
-            dlg.cM01TopMark.setSelected(hasTopMark());
-            dlg.cM01Fired.setSelected(isFired());
-
-            dlg.tfM01RepeatTime.setText(getLightPeriod());
-
-            dlg.tfM01Name.setText(getName());
-            dlg.tfM01Name.setEnabled(true);
-
-            if (hasRadar()) {
-                dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Radar_Reflector_355.png")));
-            }
-
-            else if (hasRacon()) {
-                dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Radar_Station.png")));
-                if (getRaType() != 0) {
-                    String c = (String) dlg.cbM01Racon.getSelectedItem();
-                    if ((getRaType() == RATYPE_RACON) && !getRaconGroup().isEmpty())
-                        c += ("(" + getRaconGroup() + ")");
-                    dlg.lM01RadarMark.setText(c);
-                }
-                dlg.cbM01Racon.setVisible(true);
-                if (getRaType() == RATYPE_RACON) {
-                    dlg.lM01Racon.setVisible(true);
-                    dlg.tfM01Racon.setVisible(true);
-                    dlg.tfM01Racon.setEnabled(true);
-                } else {
-                    dlg.lM01Racon.setVisible(false);
-                    dlg.tfM01Racon.setVisible(false);
-                }
-            } else {
-                dlg.cbM01Racon.setVisible(false);
-                dlg.lM01Racon.setVisible(false);
-                dlg.tfM01Racon.setVisible(false);
-            }
-
-            if (hasFog()) {
-                dlg.lM05Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Fog_Signal.png")));
-                if (getFogSound() != 0) {
-                    String c = (String) dlg.cbM01Fog.getSelectedItem();
-                    if (!getFogGroup().isEmpty())
-                        c += ("(" + getFogGroup() + ")");
-                    if (!getFogPeriod().isEmpty())
-                        c += (" " + getFogPeriod() + "s");
-                    dlg.lM01FogMark.setText(c);
-                }
-                dlg.cbM01Fog.setVisible(true);
-                if (getFogSound() == 0) {
-                    dlg.lM01FogGroup.setVisible(false);
-                    dlg.tfM01FogGroup.setVisible(false);
-                    dlg.lM01FogPeriod.setVisible(false);
-                    dlg.tfM01FogPeriod.setVisible(false);
-                } else {
-                    dlg.lM01FogGroup.setVisible(true);
-                    dlg.tfM01FogGroup.setVisible(true);
-                    dlg.lM01FogPeriod.setVisible(true);
-                    dlg.tfM01FogPeriod.setVisible(true);
-                }
-            } else {
-                dlg.cbM01Fog.setVisible(false);
-                dlg.lM01FogGroup.setVisible(false);
-                dlg.tfM01FogGroup.setVisible(false);
-                dlg.lM01FogPeriod.setVisible(false);
-                dlg.tfM01FogPeriod.setVisible(false);
-            }
-
-            if (isFired()) {
-                String lp, c;
-                String tmp = null;
-                int i1;
-
-                String col = getLightColour();
-                if (col.equals("W")) {
-                    dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
-                            "/images/Light_White_120.png")));
-                    dlg.cbM01Colour.setSelectedIndex(WHITE_LIGHT);
-                } else if (col.equals("R")) {
-                    dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
-                            "/images/Light_Red_120.png")));
-                    dlg.cbM01Colour.setSelectedIndex(RED_LIGHT);
-                } else if (col.equals("G")) {
-                    dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
-                            "/images/Light_Green_120.png")));
-                    dlg.cbM01Colour.setSelectedIndex(GREEN_LIGHT);
-                } else {
-                    dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
-                            "/images/Light_Magenta_120.png")));
-                    dlg.cbM01Colour.setSelectedIndex(UNKNOWN_COLOUR);
-                }
-
-                c = getLightChar();
-                if (c.contains("+")) {
-                    i1 = c.indexOf("+");
-                    tmp = c.substring(i1, c.length());
-                    c = c.substring(0, i1);
-                    if (!getLightGroup().isEmpty()) {
-                        c = c + "(" + getLightGroup() + ")";
-                    }
-                    if (tmp != null)
-                        c = c + tmp;
-                }
-                dlg.cbM01Kennung.setSelectedItem(c);
-                if ((dlg.cbM01Kennung.getSelectedIndex() != 0)
-                        && (!getLightGroup().isEmpty())
-                        || (((String) dlg.cbM01Kennung.getSelectedItem()).contains("("))
-                        && !(((String) dlg.cbM01Kennung.getSelectedItem()).contains("+"))) {
-                    c = c + "(" + getLightGroup() + ")";
-                    dlg.cbM01Kennung.setSelectedItem(c);
-                }
-                c = c + " " + getLightColour();
-                lp = getLightPeriod();
-                if (!lp.isEmpty())
-                    c = c + " " + lp + "s";
-                dlg.lM01FireMark.setText(c);
-                dlg.cM01Fired.setVisible(true);
-                dlg.lM01Kennung.setVisible(true);
-                dlg.cbM01Kennung.setVisible(true);
-                if (((String) dlg.cbM01Kennung.getSelectedItem()).contains("(")) {
-                    dlg.tfM01Group.setVisible(false);
-                    dlg.lM01Group.setVisible(false);
-                } else {
-                    dlg.lM01Group.setVisible(true);
-                    dlg.tfM01Group.setVisible(true);
-                }
-                dlg.tfM01Group.setText(getLightGroup());
-                dlg.lM01RepeatTime.setVisible(true);
-                dlg.tfM01RepeatTime.setVisible(true);
-                if (isSectored()) {
-                    dlg.rbM01Fired1.setSelected(false);
-                    dlg.rbM01FiredN.setSelected(true);
-                    if ((getSectorIndex() != 0) && (!LightChar[0].isEmpty()))
-                        dlg.cbM01Kennung.setEnabled(false);
-                    else
-                        dlg.cbM01Kennung.setEnabled(true);
-                    dlg.cbM01Kennung.setSelectedItem(getLightChar());
-                    if ((getSectorIndex() != 0) && (!LightGroup[0].isEmpty()))
-                        dlg.tfM01Group.setEnabled(false);
-                    else
-                        dlg.tfM01Group.setEnabled(true);
-                    dlg.tfM01Group.setText(getLightGroup());
-                    if ((getSectorIndex() != 0) && (!LightPeriod[0].isEmpty()))
-                        dlg.tfM01RepeatTime.setEnabled(false);
-                    else
-                        dlg.tfM01RepeatTime.setEnabled(true);
-                    dlg.tfM01RepeatTime.setText(getLightPeriod());
-                    if ((getSectorIndex() != 0) && (!Height[0].isEmpty()))
-                        dlg.tfM01Height.setEnabled(false);
-                    else
-                        dlg.tfM01Height.setEnabled(true);
-                    dlg.tfM01Height.setText(getHeight());
-                    if ((getSectorIndex() != 0) && (!Range[0].isEmpty()))
-                        dlg.tfM01Range.setEnabled(false);
-                    else
-                        dlg.tfM01Range.setEnabled(true);
-                    dlg.tfM01Range.setText(getRange());
-                    dlg.lM01Sector.setVisible(true);
-                    dlg.cbM01Sector.setVisible(true);
-                    if (getSectorIndex() == 0) {
-                        dlg.lM01Colour.setVisible(false);
-                        dlg.cbM01Colour.setVisible(false);
-                        dlg.lM01Bearing.setVisible(false);
-                        dlg.tfM01Bearing.setVisible(false);
-                        dlg.tfM02Bearing.setVisible(false);
-                        dlg.tfM01Radius.setVisible(false);
-                    } else {
-                        dlg.lM01Colour.setVisible(true);
-                        dlg.cbM01Colour.setVisible(true);
-                        dlg.lM01Bearing.setVisible(true);
-                        dlg.tfM01Bearing.setVisible(true);
-                        dlg.tfM01Bearing.setText(getBearing1());
-                        dlg.tfM02Bearing.setVisible(true);
-                        dlg.tfM02Bearing.setText(getBearing2());
-                        dlg.tfM01Radius.setVisible(true);
-                        dlg.tfM01Radius.setText(getRadius());
-                    }
-                } else {
-                    dlg.rbM01FiredN.setSelected(false);
-                    dlg.rbM01Fired1.setSelected(true);
-                    dlg.cbM01Kennung.setEnabled(true);
-                    dlg.tfM01Group.setEnabled(true);
-                    dlg.tfM01RepeatTime.setEnabled(true);
-                    dlg.tfM01Height.setEnabled(true);
-                    dlg.tfM01Range.setEnabled(true);
-                    dlg.lM01Colour.setVisible(true);
-                    dlg.cbM01Colour.setVisible(true);
-                    dlg.lM01Sector.setVisible(false);
-                    dlg.cbM01Sector.setVisible(false);
-                    dlg.lM01Bearing.setVisible(false);
-                    dlg.tfM01Bearing.setVisible(false);
-                    dlg.tfM02Bearing.setVisible(false);
-                    dlg.tfM01Radius.setVisible(false);
-                }
-            } else {
-                dlg.lM01FireMark.setText("");
-                dlg.rbM01Fired1.setVisible(false);
-                dlg.rbM01FiredN.setVisible(false);
-                dlg.cbM01Kennung.setVisible(false);
-                dlg.lM01Kennung.setVisible(false);
-                dlg.tfM01Height.setVisible(false);
-                dlg.lM01Height.setVisible(false);
-                dlg.tfM01Range.setVisible(false);
-                dlg.lM01Range.setVisible(false);
-                dlg.cbM01Colour.setVisible(false);
-                dlg.lM01Colour.setVisible(false);
-                dlg.cbM01Sector.setVisible(false);
-                dlg.lM01Sector.setVisible(false);
-                dlg.tfM01Group.setVisible(false);
-                dlg.lM01Group.setVisible(false);
-                dlg.tfM01RepeatTime.setVisible(false);
-                dlg.lM01RepeatTime.setVisible(false);
-                dlg.tfM01Bearing.setVisible(false);
-                dlg.lM01Bearing.setVisible(false);
-                dlg.tfM02Bearing.setVisible(false);
-                dlg.tfM01Radius.setVisible(false);
-            }
-        } else {
-            dlg.bM01Save.setEnabled(false);
-            dlg.tfM01Name.setEnabled(false);
-            dlg.cM01TopMark.setVisible(false);
-            dlg.cbM01TopMark.setVisible(false);
-            dlg.cM01Radar.setVisible(false);
-            dlg.cM01Racon.setVisible(false);
-            dlg.cbM01Racon.setVisible(false);
-            dlg.tfM01Racon.setVisible(false);
-            dlg.lM01Racon.setVisible(false);
-            dlg.cM01Fog.setVisible(false);
-            dlg.cbM01Fog.setVisible(false);
-            dlg.tfM01FogGroup.setVisible(false);
-            dlg.lM01FogGroup.setVisible(false);
-            dlg.tfM01FogPeriod.setVisible(false);
-            dlg.lM01FogPeriod.setVisible(false);
-            dlg.cM01Fired.setVisible(false);
-            dlg.rbM01Fired1.setVisible(false);
-            dlg.rbM01FiredN.setVisible(false);
-            dlg.cbM01Kennung.setVisible(false);
-            dlg.lM01Kennung.setVisible(false);
-            dlg.tfM01Height.setVisible(false);
-            dlg.lM01Height.setVisible(false);
-            dlg.tfM01Range.setVisible(false);
-            dlg.lM01Range.setVisible(false);
-            dlg.cbM01Colour.setVisible(false);
-            dlg.lM01Colour.setVisible(false);
-            dlg.cbM01Sector.setVisible(false);
-            dlg.lM01Sector.setVisible(false);
-            dlg.tfM01Group.setVisible(false);
-            dlg.lM01Group.setVisible(false);
-            dlg.tfM01RepeatTime.setVisible(false);
-            dlg.lM01RepeatTime.setVisible(false);
-            dlg.tfM01Bearing.setVisible(false);
-            dlg.lM01Bearing.setVisible(false);
-            dlg.tfM02Bearing.setVisible(false);
-            dlg.tfM01Radius.setVisible(false);
-        }
-        dlg.paintlock = false;
-    }
-
-    public void saveSign(String type) {
-        delSeaMarkKeys(Node);
-
-        String str = dlg.tfM01Name.getText();
-        if (!str.isEmpty())
-            Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name",
-                    str));
-        Main.main.undoRedo
-                .add(new ChangePropertyCommand(Node, "seamark:type", type));
-    }
-
-    protected void saveLightData() {
-        String colour;
-        if (dlg.cM01Fired.isSelected()) {
-            if (!(colour = LightColour[0]).isEmpty())
-                if (colour.equals("R")) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:colour", "red"));
-                } else if (colour.equals("G")) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:colour", "green"));
-                } else if (colour.equals("W")) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:colour", "white"));
-                }
-
-            if (!LightPeriod[0].isEmpty())
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:light:period", LightPeriod[0]));
-
-            if (!LightChar[0].isEmpty())
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:light:character", LightChar[0]));
-
-            if (!LightGroup[0].isEmpty())
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:light:group", LightGroup[0]));
-
-            if (!Height[0].isEmpty())
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:light:height", Height[0]));
-
-            if (!Range[0].isEmpty())
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:light:range", Range[0]));
-
-            for (int i = 1; i < 10; i++) {
-                if ((colour = LightColour[i]) != null)
-                    if (colour.equals("R")) {
-                        Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                                "seamark:light:" + i + ":colour", "red"));
-                        if ((Bearing1[i] != null) && (Bearing2[i] != null)
-                                && (Radius[i] != null))
-                            Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                                    "seamark:light:" + i, "red:" + Bearing1[i] + ":"
-                                            + Bearing2[i] + ":" + Radius[i]));
-                    } else if (colour.equals("G")) {
-                        Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                                "seamark:light:" + i + ":colour", "green"));
-                        if ((Bearing1[i] != null) && (Bearing2[i] != null)
-                                && (Radius[i] != null))
-                            Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                                    "seamark:light:" + i, "green:" + Bearing1[i] + ":"
-                                            + Bearing2[i] + ":" + Radius[i]));
-                    } else if (colour.equals("W")) {
-                        Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                                "seamark:light:" + i + ":colour", "white"));
-                        if ((Bearing1[i] != null) && (Bearing2[i] != null)
-                                && (Radius[i] != null))
-                            Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                                    "seamark:light:" + i, "white:" + Bearing1[i] + ":"
-                                            + Bearing2[i] + ":" + Radius[i]));
-                    }
-
-                if (LightPeriod[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":period", LightPeriod[i]));
-
-                if (LightChar[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":character", LightChar[i]));
-
-                if (LightGroup[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":group", LightGroup[i]));
-
-                if (Height[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":height", Height[i]));
-
-                if (Range[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":range", Range[i]));
-
-                if (Bearing1[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":sector_start", Bearing1[i]));
-
-                if (Bearing2[i] != null)
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:light:" + i + ":sector_end", Bearing2[i]));
-            }
-        }
-    }
-
-    protected void saveTopMarkData(String shape, String colour) {
-        if (dlg.cM01TopMark.isSelected()) {
-            Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                    "seamark:topmark:shape", shape));
-            Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                    "seamark:topmark:colour", colour));
-        }
-    }
-
-    protected void saveRadarFogData() {
-        if (hasRadar()) {
-            Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                    "seamark:radar_reflector", "yes"));
-        }
-        if (hasRacon()) {
-            switch (RaType) {
-            case RATYPE_RACON:
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:radar_transponder:category", "racon"));
-                if (!getRaconGroup().isEmpty())
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:radar_transponder:group", getRaconGroup()));
-                break;
-            case RATYPE_RAMARK:
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:radar_transponder:category", "ramark"));
-                break;
-            case RATYPE_LEADING:
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:radar_transponder:category", "leading"));
-                break;
-            default:
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:radar_transponder", "yes"));
-            }
-        }
-        if (hasFog()) {
-            if (getFogSound() == 0) {
-                Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                        "seamark:fog_signal", "yes"));
-            } else {
-                switch (getFogSound()) {
-                case FOG_HORN:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "horn"));
-                    break;
-                case FOG_SIREN:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "siren"));
-                    break;
-                case FOG_DIA:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "diaphone"));
-                    break;
-                case FOG_BELL:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "bell"));
-                    break;
-                case FOG_WHIS:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "whistle"));
-                    break;
-                case FOG_GONG:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "gong"));
-                    break;
-                case FOG_EXPLOS:
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:category", "explosive"));
-                    break;
-                }
-                if (!getFogGroup().isEmpty())
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:group", getFogGroup()));
-                if (!getFogPeriod().isEmpty())
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Node,
-                            "seamark:fog_signal:period", getFogPeriod()));
-            }
-        }
-    }
-
-    public void refreshStyles() {
-    }
-
-    public void refreshLights() {
-        dlg.cbM01Kennung.removeAllItems();
-        dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Fl"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("LFl"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Iso"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("F"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("FFl"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("IQ"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("VQ"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("IVQ"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("UQ"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("IUQ"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Mo"); //$NON-NLS-1$
-        dlg.cbM01Kennung.setSelectedIndex(0);
-    }
-
-    public void resetMask() {
-        setRegion(Main.pref.get("tomsplugin.IALA").equals("B"));
-
-        dlg.lM01Icon.setIcon(null);
-        dlg.lM02Icon.setIcon(null);
-        dlg.lM03Icon.setIcon(null);
-        dlg.lM04Icon.setIcon(null);
-        dlg.lM05Icon.setIcon(null);
-        dlg.lM06Icon.setIcon(null);
-
-        dlg.rbM01RegionA.setEnabled(false);
-        dlg.rbM01RegionB.setEnabled(false);
-        dlg.lM01FireMark.setText("");
-        dlg.cbM01CatOfMark.setVisible(false);
-        dlg.lM01CatOfMark.setVisible(false);
-        setBuoyIndex(0);
-        dlg.cbM01StyleOfMark.setVisible(false);
-        dlg.lM01StyleOfMark.setVisible(false);
-        setStyleIndex(0);
-        dlg.tfM01Name.setText("");
-        dlg.tfM01Name.setEnabled(false);
-        setName("");
-        dlg.cM01TopMark.setSelected(false);
-        dlg.cM01TopMark.setVisible(false);
-        dlg.cbM01TopMark.setVisible(false);
-        setTopMark(false);
-        dlg.cM01Radar.setSelected(false);
-        dlg.cM01Radar.setVisible(false);
-        setRadar(false);
-        dlg.cM01Racon.setSelected(false);
-        dlg.cM01Racon.setVisible(false);
-        dlg.cbM01Racon.setVisible(false);
-        dlg.tfM01Racon.setText("");
-        dlg.tfM01Racon.setVisible(false);
-        dlg.lM01Racon.setVisible(false);
-        setRacon(false);
-        setRaType(0);
-        dlg.cM01Fog.setSelected(false);
-        dlg.cM01Fog.setVisible(false);
-        dlg.cbM01Fog.setVisible(false);
-        setFogSound(0);
-        dlg.tfM01FogGroup.setText("");
-        dlg.tfM01FogGroup.setVisible(false);
-        dlg.lM01FogGroup.setVisible(false);
-        dlg.tfM01FogPeriod.setText("");
-        dlg.tfM01FogPeriod.setVisible(false);
-        dlg.lM01FogPeriod.setVisible(false);
-        setFog(false);
-        dlg.cM01Fired.setSelected(false);
-        dlg.cM01Fired.setVisible(false);
-        setFired(false);
-        dlg.rbM01Fired1.setVisible(false);
-        dlg.rbM01Fired1.setSelected(true);
-        dlg.rbM01FiredN.setVisible(false);
-        dlg.rbM01FiredN.setSelected(false);
-        setSectored(false);
-        dlg.cbM01Kennung.removeAllItems();
-        dlg.cbM01Kennung.setVisible(false);
-        dlg.lM01Kennung.setVisible(false);
-        setLightChar("");
-        dlg.tfM01Height.setText("");
-        dlg.tfM01Height.setVisible(false);
-        dlg.lM01Height.setVisible(false);
-        setHeight("");
-        dlg.tfM01Range.setText("");
-        dlg.tfM01Range.setVisible(false);
-        dlg.lM01Range.setVisible(false);
-        setRange("");
-        dlg.cbM01Colour.setVisible(false);
-        dlg.lM01Colour.setVisible(false);
-        setLightColour("");
-        dlg.cbM01Sector.setVisible(false);
-        dlg.lM01Sector.setVisible(false);
-        setSectorIndex(0);
-        dlg.tfM01Group.setText("");
-        dlg.tfM01Group.setVisible(false);
-        dlg.lM01Group.setVisible(false);
-        setLightGroup("");
-        dlg.tfM01RepeatTime.setText("");
-        dlg.tfM01RepeatTime.setVisible(false);
-        dlg.lM01RepeatTime.setVisible(false);
-        setLightPeriod("");
-        dlg.tfM01Bearing.setText("");
-        dlg.tfM01Bearing.setVisible(false);
-        dlg.lM01Bearing.setVisible(false);
-        setBearing1("");
-        dlg.tfM02Bearing.setText("");
-        dlg.tfM02Bearing.setVisible(false);
-        setBearing2("");
-        dlg.tfM01Radius.setText("");
-        dlg.tfM01Radius.setVisible(false);
-        setRadius("");
-
-        dlg.bM01Save.setEnabled(false);
-    }
+	private int SectorIndex = 0;
+
+	public int getSectorIndex() {
+		return SectorIndex;
+	}
+
+	public void setSectorIndex(int sector) {
+		SectorIndex = sector;
+	}
+
+	private String[] LightChar = new String[10];
+
+	public String getLightChar() {
+		if (LightChar[SectorIndex] == null)
+			return (LightChar[0]);
+		return LightChar[SectorIndex];
+	}
+
+	public void setLightChar(String lightChar) {
+		if (SectorIndex == 0) {
+			LightChar = new String[10];
+			LightChar[0] = lightChar;
+		} else if (LightChar[0].isEmpty())
+			LightChar[SectorIndex] = lightChar;
+	}
+
+	private String[] LightColour = new String[10];
+
+	public String getLightColour() {
+		if (LightColour[SectorIndex] == null)
+			return (LightColour[0]);
+		return LightColour[SectorIndex];
+	}
+
+	public void setLightColour(String lightColour) {
+		LightColour[SectorIndex] = lightColour;
+	}
+
+	private String[] LightGroup = new String[10];
+
+	public String getLightGroup() {
+		if (LightGroup[SectorIndex] == null)
+			return (LightGroup[0]);
+		return LightGroup[SectorIndex];
+	}
+
+	public void setLightGroup(String lightGroup) {
+		if (SectorIndex == 0)
+			LightGroup = new String[10];
+		LightGroup[SectorIndex] = lightGroup;
+	}
+
+	protected void setLightGroup(Map<String, String> k) {
+		String s = "";
+		if (k.containsKey("seamark:light:group")) {
+			s = k.get("seamark:light:group");
+			setLightGroup(s);
+		}
+	}
+
+	private String[] Height = new String[10];
+
+	public String getHeight() {
+		if (Height[SectorIndex] == null)
+			return (Height[0]);
+		return Height[SectorIndex];
+	}
+
+	public void setHeight(String height) {
+		if (SectorIndex == 0)
+			Height = new String[10];
+		Height[SectorIndex] = height;
+	}
+
+	private String[] Range = new String[10];
+
+	public String getRange() {
+		if (Range[SectorIndex] == null)
+			return (Range[0]);
+		return Range[SectorIndex];
+	}
+
+	public void setRange(String range) {
+		if (SectorIndex == 0)
+			Range = new String[10];
+		Range[SectorIndex] = range;
+	}
+
+	private String[] Bearing1 = new String[10];
+
+	public String getBearing1() {
+		if (Bearing1[SectorIndex] == null)
+			return (Bearing1[0]);
+		return Bearing1[SectorIndex];
+	}
+
+	public void setBearing1(String bearing) {
+		if (SectorIndex == 0)
+			Bearing1 = new String[10];
+		Bearing1[SectorIndex] = bearing;
+	}
+
+	private String[] Bearing2 = new String[10];
+
+	public String getBearing2() {
+		if (Bearing2[SectorIndex] == null)
+			return (Bearing2[0]);
+		return Bearing2[SectorIndex];
+	}
+
+	public void setBearing2(String bearing) {
+		if (SectorIndex == 0)
+			Bearing2 = new String[10];
+		Bearing2[SectorIndex] = bearing;
+	}
+
+	private String[] Radius = new String[10];
+
+	public String getRadius() {
+		if (Radius[SectorIndex] == null)
+			return (Radius[0]);
+		return Radius[SectorIndex];
+	}
+
+	public void setRadius(String radius) {
+		if (SectorIndex == 0)
+			Radius = new String[10];
+		Radius[SectorIndex] = radius;
+	}
+
+	private String[] LightPeriod = new String[10];
+
+	public String getLightPeriod() {
+		if (LightPeriod[SectorIndex] == null)
+			return (LightPeriod[0]);
+		return LightPeriod[SectorIndex];
+	}
+
+	public void setLightPeriod(String lightPeriod) {
+		String regex = "^[\\d\\s.]+$";
+
+		if (!lightPeriod.isEmpty()) {
+
+			Pattern pat = Pattern.compile(regex);
+			Matcher matcher = pat.matcher(lightPeriod);
+
+			if (matcher.find()) {
+				setErrMsg(null);
+			} else {
+				setErrMsg("Must be a number");
+				lightPeriod = "";
+				dlg.tfM01RepeatTime.requestFocus();
+			}
+		}
+		if (SectorIndex == 0)
+			LightPeriod = new String[10];
+		LightPeriod[SectorIndex] = lightPeriod;
+	}
+
+	private Node Node = null;
+
+	public Node getNode() {
+		return Node;
+	}
+
+	public void setNode(Node node) {
+		Node = node;
+	}
+
+	private boolean TopMark = false;
+
+	public boolean hasTopMark() {
+		return TopMark;
+	}
+
+	public void setTopMark(boolean topMark) {
+		TopMark = topMark;
+		/*
+		 * if (dlg.cM01TopMark == null) { return; }
+		 */
+		dlg.cM01TopMark.setSelected(topMark);
+	}
+
+	protected SmpDialogAction dlg = null; // hier wird der Dialog referenziert
+
+	public SmpDialogAction getDlg() {
+		return dlg;
+	}
+
+	public void setDlg(SmpDialogAction dlg) {
+		this.dlg = dlg;
+	}
+
+	protected Buoy(SmpDialogAction dia) {
+		dlg = dia;
+	}
+
+	public boolean isValid() {
+		return false;
+	}
+
+	public void parseLights(Map<String, String> k) {
+		setFired(false);
+		setSectored(false);
+		Iterator it = k.entrySet().iterator();
+		while (it.hasNext()) {
+			Map.Entry entry = (Map.Entry) it.next();
+			String key = (String) entry.getKey();
+			String value = ((String) entry.getValue()).trim();
+			if (key.contains("seamark:light:")) {
+				setFired(true);
+				int index = 0;
+				key = key.substring(14);
+				if (key.matches("^\\d:.*")) {
+					index = key.charAt(0) - '0';
+					key = key.substring(2);
+				} else if (key.matches("^\\d$")) {
+					index = key.charAt(0) - '0';
+					String values[] = value.split(":");
+					if (values[0].equals("red"))
+						LightColour[index] = "R";
+					else if (values[0].equals("green"))
+						LightColour[index] = "G";
+					else if (values[0].equals("white"))
+						LightColour[index] = "W";
+					if (values.length > 1)
+						Bearing1[index] = values[1];
+					if (values.length > 2)
+						Bearing2[index] = values[2];
+					if (values.length > 3)
+						Radius[index] = values[3];
+				} else {
+					index = 0;
+				}
+				if (index != 0)
+					setSectored(true);
+				if (key.equals("colour")) {
+					if (value.equals("red"))
+						LightColour[index] = "R";
+					else if (value.equals("green"))
+						LightColour[index] = "G";
+					else if (value.equals("white"))
+						LightColour[index] = "W";
+				} else if (key.equals("character")) {
+					LightChar[index] = value;
+				} else if (key.equals("group")) {
+					LightGroup[index] = value;
+				} else if (key.equals("period")) {
+					LightPeriod[index] = value;
+				} else if (key.equals("height")) {
+					Height[index] = value;
+				} else if (key.equals("range")) {
+					Range[index] = value;
+				}
+			}
+		}
+		setSectorIndex(0);
+		dlg.cbM01Sector.setSelectedIndex(0);
+		dlg.cM01Fired.setSelected(isFired());
+		dlg.rbM01Fired1.setSelected(!isSectored());
+		dlg.rbM01FiredN.setSelected(isSectored());
+		dlg.cbM01Kennung.setSelectedItem(getLightChar());
+		dlg.tfM01Height.setText(getHeight());
+		dlg.tfM01Range.setText(getRange());
+		dlg.tfM01Group.setText(getLightGroup());
+		dlg.tfM01RepeatTime.setText(getLightPeriod());
+		dlg.cbM01Colour.setSelectedItem(getLightColour());
+	}
+
+	public void parseFogRadar(Map<String, String> k) {
+		String str;
+		setFog(false);
+		setRadar(false);
+		setRacon(false);
+		if (k.containsKey("seamark:fog_signal")
+				|| k.containsKey("seamark:fog_signal:category")
+				|| k.containsKey("seamark:fog_signal:group")
+				|| k.containsKey("seamark:fog_signal:period")) {
+			setFog(true);
+			if (k.containsKey("seamark:fog_signal:category")) {
+				str = k.get("seamark:fog_signal:category");
+				if (str.equals("horn"))
+					setFogSound(FOG_HORN);
+				else if (str.equals("siren"))
+					setFogSound(FOG_SIREN);
+				else if (str.equals("diaphone"))
+					setFogSound(FOG_DIA);
+				else if (str.equals("bell"))
+					setFogSound(FOG_BELL);
+				else if (str.equals("whis"))
+					setFogSound(FOG_WHIS);
+				else if (str.equals("gong"))
+					setFogSound(FOG_GONG);
+				else if (str.equals("explosive"))
+					setFogSound(FOG_EXPLOS);
+				else
+					setFogSound(UNKNOWN_FOG);
+			}
+			if (k.containsKey("seamark:fog_signal:group"))
+				setFogGroup(k.get("seamark:fog_signal:group"));
+			if (k.containsKey("seamark:fog_signal:period"))
+				setFogPeriod(k.get("seamark:fog_signal:period"));
+		}
+		dlg.cM01Fog.setSelected(hasFog());
+		dlg.cbM01Fog.setSelectedIndex(getFogSound());
+		dlg.tfM01FogGroup.setText(getFogGroup());
+		dlg.tfM01FogPeriod.setText(getFogPeriod());
+
+		if (k.containsKey("seamark:radar_transponder")
+				|| k.containsKey("seamark:radar_transponder:category")
+				|| k.containsKey("seamark:radar_transponder:group")) {
+			setRacon(true);
+			if (k.containsKey("seamark:radar_transponder:category")) {
+				str = k.get("seamark:radar_transponder:category");
+				if (str.equals("racon"))
+					setRaType(RATYPE_RACON);
+				else if (str.equals("ramark"))
+					setRaType(RATYPE_RAMARK);
+				else if (str.equals("leading"))
+					setRaType(RATYPE_LEADING);
+				else
+					setRaType(UNKNOWN_RATYPE);
+			}
+			if (k.containsKey("seamark:radar_transponder:group"))
+				setRaconGroup(k.get("seamark:radar_transponder:group"));
+		} else if (k.containsKey("seamark:radar_reflector"))
+			setRadar(true);
+		dlg.cM01Radar.setSelected(hasRadar());
+		dlg.cM01Racon.setSelected(hasRacon());
+		dlg.cbM01Racon.setSelectedIndex(getRaType());
+		dlg.tfM01Racon.setText(getRaconGroup());
+	}
+
+	public void paintSign() {
+
+		if (dlg.paintlock)
+			return;
+		else
+			dlg.paintlock = true;
+
+		dlg.lM01Icon.setIcon(null);
+		dlg.lM02Icon.setIcon(null);
+		dlg.lM03Icon.setIcon(null);
+		dlg.lM04Icon.setIcon(null);
+		dlg.lM05Icon.setIcon(null);
+		dlg.lM06Icon.setIcon(null);
+		dlg.lM01NameMark.setText("");
+		dlg.lM01FireMark.setText("");
+		dlg.lM01FogMark.setText("");
+		dlg.lM01RadarMark.setText("");
+
+		dlg.rbM01RegionA.setSelected(!getRegion());
+		dlg.rbM01RegionB.setSelected(getRegion());
+
+		if (isValid()) {
+			dlg.lM01NameMark.setText(getName());
+
+			dlg.bM01Save.setEnabled(true);
+
+			dlg.cM01TopMark.setSelected(hasTopMark());
+			dlg.cM01Fired.setSelected(isFired());
+
+			dlg.tfM01RepeatTime.setText(getLightPeriod());
+
+			dlg.tfM01Name.setText(getName());
+			dlg.tfM01Name.setEnabled(true);
+
+			if (hasRadar()) {
+				dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Radar_Reflector_355.png")));
+			}
+
+			else if (hasRacon()) {
+				dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Radar_Station.png")));
+				if (getRaType() != 0) {
+					String c = (String) dlg.cbM01Racon.getSelectedItem();
+					if ((getRaType() == RATYPE_RACON) && !getRaconGroup().isEmpty())
+						c += ("(" + getRaconGroup() + ")");
+					dlg.lM01RadarMark.setText(c);
+				}
+				dlg.cbM01Racon.setVisible(true);
+				if (getRaType() == RATYPE_RACON) {
+					dlg.lM01Racon.setVisible(true);
+					dlg.tfM01Racon.setVisible(true);
+					dlg.tfM01Racon.setEnabled(true);
+				} else {
+					dlg.lM01Racon.setVisible(false);
+					dlg.tfM01Racon.setVisible(false);
+				}
+			} else {
+				dlg.cbM01Racon.setVisible(false);
+				dlg.lM01Racon.setVisible(false);
+				dlg.tfM01Racon.setVisible(false);
+			}
+
+			if (hasFog()) {
+				dlg.lM05Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Fog_Signal.png")));
+				if (getFogSound() != 0) {
+					String c = (String) dlg.cbM01Fog.getSelectedItem();
+					if (!getFogGroup().isEmpty())
+						c += ("(" + getFogGroup() + ")");
+					if (!getFogPeriod().isEmpty())
+						c += (" " + getFogPeriod() + "s");
+					dlg.lM01FogMark.setText(c);
+				}
+				dlg.cbM01Fog.setVisible(true);
+				if (getFogSound() == 0) {
+					dlg.lM01FogGroup.setVisible(false);
+					dlg.tfM01FogGroup.setVisible(false);
+					dlg.lM01FogPeriod.setVisible(false);
+					dlg.tfM01FogPeriod.setVisible(false);
+				} else {
+					dlg.lM01FogGroup.setVisible(true);
+					dlg.tfM01FogGroup.setVisible(true);
+					dlg.lM01FogPeriod.setVisible(true);
+					dlg.tfM01FogPeriod.setVisible(true);
+				}
+			} else {
+				dlg.cbM01Fog.setVisible(false);
+				dlg.lM01FogGroup.setVisible(false);
+				dlg.tfM01FogGroup.setVisible(false);
+				dlg.lM01FogPeriod.setVisible(false);
+				dlg.tfM01FogPeriod.setVisible(false);
+			}
+
+			if (isFired()) {
+				String lp, c;
+				String tmp = null;
+				int i1;
+
+				String col = getLightColour();
+				if (col.equals("W")) {
+					dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Light_White_120.png")));
+					dlg.cbM01Colour.setSelectedIndex(WHITE_LIGHT);
+				} else if (col.equals("R")) {
+					dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Light_Red_120.png")));
+					dlg.cbM01Colour.setSelectedIndex(RED_LIGHT);
+				} else if (col.equals("G")) {
+					dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Light_Green_120.png")));
+					dlg.cbM01Colour.setSelectedIndex(GREEN_LIGHT);
+				} else {
+					dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Light_Magenta_120.png")));
+					dlg.cbM01Colour.setSelectedIndex(UNKNOWN_COLOUR);
+				}
+
+				c = getLightChar();
+				if (c.contains("+")) {
+					i1 = c.indexOf("+");
+					tmp = c.substring(i1, c.length());
+					c = c.substring(0, i1);
+					if (!getLightGroup().isEmpty()) {
+						c = c + "(" + getLightGroup() + ")";
+					}
+					if (tmp != null)
+						c = c + tmp;
+				}
+				dlg.cbM01Kennung.setSelectedItem(c);
+				if ((dlg.cbM01Kennung.getSelectedIndex() != 0)
+						&& (!getLightGroup().isEmpty())
+						|| (((String) dlg.cbM01Kennung.getSelectedItem()).contains("("))
+						&& !(((String) dlg.cbM01Kennung.getSelectedItem()).contains("+"))) {
+					c = c + "(" + getLightGroup() + ")";
+					dlg.cbM01Kennung.setSelectedItem(c);
+				}
+				c = c + " " + getLightColour();
+				lp = getLightPeriod();
+				if (!lp.isEmpty())
+					c = c + " " + lp + "s";
+				dlg.lM01FireMark.setText(c);
+				dlg.cM01Fired.setVisible(true);
+				dlg.lM01Kennung.setVisible(true);
+				dlg.cbM01Kennung.setVisible(true);
+				if (((String) dlg.cbM01Kennung.getSelectedItem()).contains("(")) {
+					dlg.tfM01Group.setVisible(false);
+					dlg.lM01Group.setVisible(false);
+				} else {
+					dlg.lM01Group.setVisible(true);
+					dlg.tfM01Group.setVisible(true);
+				}
+				dlg.tfM01Group.setText(getLightGroup());
+				dlg.lM01RepeatTime.setVisible(true);
+				dlg.tfM01RepeatTime.setVisible(true);
+				if (isSectored()) {
+					dlg.rbM01Fired1.setSelected(false);
+					dlg.rbM01FiredN.setSelected(true);
+					if ((getSectorIndex() != 0) && (!LightChar[0].isEmpty()))
+						dlg.cbM01Kennung.setEnabled(false);
+					else
+						dlg.cbM01Kennung.setEnabled(true);
+					dlg.cbM01Kennung.setSelectedItem(getLightChar());
+					if ((getSectorIndex() != 0) && (!LightGroup[0].isEmpty()))
+						dlg.tfM01Group.setEnabled(false);
+					else
+						dlg.tfM01Group.setEnabled(true);
+					dlg.tfM01Group.setText(getLightGroup());
+					if ((getSectorIndex() != 0) && (!LightPeriod[0].isEmpty()))
+						dlg.tfM01RepeatTime.setEnabled(false);
+					else
+						dlg.tfM01RepeatTime.setEnabled(true);
+					dlg.tfM01RepeatTime.setText(getLightPeriod());
+					if ((getSectorIndex() != 0) && (!Height[0].isEmpty()))
+						dlg.tfM01Height.setEnabled(false);
+					else
+						dlg.tfM01Height.setEnabled(true);
+					dlg.tfM01Height.setText(getHeight());
+					if ((getSectorIndex() != 0) && (!Range[0].isEmpty()))
+						dlg.tfM01Range.setEnabled(false);
+					else
+						dlg.tfM01Range.setEnabled(true);
+					dlg.tfM01Range.setText(getRange());
+					dlg.lM01Sector.setVisible(true);
+					dlg.cbM01Sector.setVisible(true);
+					if (getSectorIndex() == 0) {
+						dlg.lM01Colour.setVisible(false);
+						dlg.cbM01Colour.setVisible(false);
+						dlg.lM01Bearing.setVisible(false);
+						dlg.tfM01Bearing.setVisible(false);
+						dlg.tfM02Bearing.setVisible(false);
+						dlg.tfM01Radius.setVisible(false);
+					} else {
+						dlg.lM01Colour.setVisible(true);
+						dlg.cbM01Colour.setVisible(true);
+						dlg.lM01Bearing.setVisible(true);
+						dlg.tfM01Bearing.setVisible(true);
+						dlg.tfM01Bearing.setText(getBearing1());
+						dlg.tfM02Bearing.setVisible(true);
+						dlg.tfM02Bearing.setText(getBearing2());
+						dlg.tfM01Radius.setVisible(true);
+						dlg.tfM01Radius.setText(getRadius());
+					}
+				} else {
+					dlg.rbM01FiredN.setSelected(false);
+					dlg.rbM01Fired1.setSelected(true);
+					dlg.cbM01Kennung.setEnabled(true);
+					dlg.tfM01Group.setEnabled(true);
+					dlg.tfM01RepeatTime.setEnabled(true);
+					dlg.tfM01Height.setEnabled(true);
+					dlg.tfM01Range.setEnabled(true);
+					dlg.lM01Colour.setVisible(true);
+					dlg.cbM01Colour.setVisible(true);
+					dlg.lM01Sector.setVisible(false);
+					dlg.cbM01Sector.setVisible(false);
+					dlg.lM01Bearing.setVisible(false);
+					dlg.tfM01Bearing.setVisible(false);
+					dlg.tfM02Bearing.setVisible(false);
+					dlg.tfM01Radius.setVisible(false);
+				}
+			} else {
+				dlg.lM01FireMark.setText("");
+				dlg.rbM01Fired1.setVisible(false);
+				dlg.rbM01FiredN.setVisible(false);
+				dlg.cbM01Kennung.setVisible(false);
+				dlg.lM01Kennung.setVisible(false);
+				dlg.tfM01Height.setVisible(false);
+				dlg.lM01Height.setVisible(false);
+				dlg.tfM01Range.setVisible(false);
+				dlg.lM01Range.setVisible(false);
+				dlg.cbM01Colour.setVisible(false);
+				dlg.lM01Colour.setVisible(false);
+				dlg.cbM01Sector.setVisible(false);
+				dlg.lM01Sector.setVisible(false);
+				dlg.tfM01Group.setVisible(false);
+				dlg.lM01Group.setVisible(false);
+				dlg.tfM01RepeatTime.setVisible(false);
+				dlg.lM01RepeatTime.setVisible(false);
+				dlg.tfM01Bearing.setVisible(false);
+				dlg.lM01Bearing.setVisible(false);
+				dlg.tfM02Bearing.setVisible(false);
+				dlg.tfM01Radius.setVisible(false);
+			}
+		} else {
+			dlg.bM01Save.setEnabled(false);
+			dlg.tfM01Name.setEnabled(false);
+			dlg.cM01TopMark.setVisible(false);
+			dlg.cbM01TopMark.setVisible(false);
+			dlg.cM01Radar.setVisible(false);
+			dlg.cM01Racon.setVisible(false);
+			dlg.cbM01Racon.setVisible(false);
+			dlg.tfM01Racon.setVisible(false);
+			dlg.lM01Racon.setVisible(false);
+			dlg.cM01Fog.setVisible(false);
+			dlg.cbM01Fog.setVisible(false);
+			dlg.tfM01FogGroup.setVisible(false);
+			dlg.lM01FogGroup.setVisible(false);
+			dlg.tfM01FogPeriod.setVisible(false);
+			dlg.lM01FogPeriod.setVisible(false);
+			dlg.cM01Fired.setVisible(false);
+			dlg.rbM01Fired1.setVisible(false);
+			dlg.rbM01FiredN.setVisible(false);
+			dlg.cbM01Kennung.setVisible(false);
+			dlg.lM01Kennung.setVisible(false);
+			dlg.tfM01Height.setVisible(false);
+			dlg.lM01Height.setVisible(false);
+			dlg.tfM01Range.setVisible(false);
+			dlg.lM01Range.setVisible(false);
+			dlg.cbM01Colour.setVisible(false);
+			dlg.lM01Colour.setVisible(false);
+			dlg.cbM01Sector.setVisible(false);
+			dlg.lM01Sector.setVisible(false);
+			dlg.tfM01Group.setVisible(false);
+			dlg.lM01Group.setVisible(false);
+			dlg.tfM01RepeatTime.setVisible(false);
+			dlg.lM01RepeatTime.setVisible(false);
+			dlg.tfM01Bearing.setVisible(false);
+			dlg.lM01Bearing.setVisible(false);
+			dlg.tfM02Bearing.setVisible(false);
+			dlg.tfM01Radius.setVisible(false);
+		}
+		dlg.paintlock = false;
+	}
+
+	public void saveSign(String type) {
+		delSeaMarkKeys(Node);
+
+		String str = dlg.tfM01Name.getText();
+		if (!str.isEmpty())
+			Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name",
+					str));
+		Main.main.undoRedo
+				.add(new ChangePropertyCommand(Node, "seamark:type", type));
+	}
+
+	protected void saveLightData() {
+		String colour;
+		if (dlg.cM01Fired.isSelected()) {
+			if (!(colour = LightColour[0]).isEmpty())
+				if (colour.equals("R")) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:colour", "red"));
+				} else if (colour.equals("G")) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:colour", "green"));
+				} else if (colour.equals("W")) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:colour", "white"));
+				}
+
+			if (!LightPeriod[0].isEmpty())
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:period", LightPeriod[0]));
+
+			if (!LightChar[0].isEmpty())
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:character", LightChar[0]));
+
+			if (!LightGroup[0].isEmpty())
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:group", LightGroup[0]));
+
+			if (!Height[0].isEmpty())
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:height", Height[0]));
+
+			if (!Range[0].isEmpty())
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:range", Range[0]));
+
+			for (int i = 1; i < 10; i++) {
+				if ((colour = LightColour[i]) != null)
+					if (colour.equals("R")) {
+						Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+								"seamark:light:" + i + ":colour", "red"));
+						if ((Bearing1[i] != null) && (Bearing2[i] != null)
+								&& (Radius[i] != null))
+							Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+									"seamark:light:" + i, "red:" + Bearing1[i] + ":"
+											+ Bearing2[i] + ":" + Radius[i]));
+					} else if (colour.equals("G")) {
+						Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+								"seamark:light:" + i + ":colour", "green"));
+						if ((Bearing1[i] != null) && (Bearing2[i] != null)
+								&& (Radius[i] != null))
+							Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+									"seamark:light:" + i, "green:" + Bearing1[i] + ":"
+											+ Bearing2[i] + ":" + Radius[i]));
+					} else if (colour.equals("W")) {
+						Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+								"seamark:light:" + i + ":colour", "white"));
+						if ((Bearing1[i] != null) && (Bearing2[i] != null)
+								&& (Radius[i] != null))
+							Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+									"seamark:light:" + i, "white:" + Bearing1[i] + ":"
+											+ Bearing2[i] + ":" + Radius[i]));
+					}
+
+				if (LightPeriod[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":period", LightPeriod[i]));
+
+				if (LightChar[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":character", LightChar[i]));
+
+				if (LightGroup[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":group", LightGroup[i]));
+
+				if (Height[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":height", Height[i]));
+
+				if (Range[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":range", Range[i]));
+
+				if (Bearing1[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":sector_start", Bearing1[i]));
+
+				if (Bearing2[i] != null)
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:light:" + i + ":sector_end", Bearing2[i]));
+			}
+		}
+	}
+
+	protected void saveTopMarkData(String shape, String colour) {
+		if (dlg.cM01TopMark.isSelected()) {
+			Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+					"seamark:topmark:shape", shape));
+			Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+					"seamark:topmark:colour", colour));
+		}
+	}
+
+	protected void saveRadarFogData() {
+		if (hasRadar()) {
+			Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+					"seamark:radar_reflector", "yes"));
+		}
+		if (hasRacon()) {
+			switch (RaType) {
+			case RATYPE_RACON:
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:radar_transponder:category", "racon"));
+				if (!getRaconGroup().isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:radar_transponder:group", getRaconGroup()));
+				break;
+			case RATYPE_RAMARK:
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:radar_transponder:category", "ramark"));
+				break;
+			case RATYPE_LEADING:
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:radar_transponder:category", "leading"));
+				break;
+			default:
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:radar_transponder", "yes"));
+			}
+		}
+		if (hasFog()) {
+			if (getFogSound() == 0) {
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:fog_signal", "yes"));
+			} else {
+				switch (getFogSound()) {
+				case FOG_HORN:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "horn"));
+					break;
+				case FOG_SIREN:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "siren"));
+					break;
+				case FOG_DIA:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "diaphone"));
+					break;
+				case FOG_BELL:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "bell"));
+					break;
+				case FOG_WHIS:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "whistle"));
+					break;
+				case FOG_GONG:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "gong"));
+					break;
+				case FOG_EXPLOS:
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:category", "explosive"));
+					break;
+				}
+				if (!getFogGroup().isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:group", getFogGroup()));
+				if (!getFogPeriod().isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+							"seamark:fog_signal:period", getFogPeriod()));
+			}
+		}
+	}
+
+	public void refreshStyles() {
+	}
+
+	public void refreshLights() {
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Fl"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("LFl"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Iso"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("F"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("FFl"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("IQ"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("VQ"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("IVQ"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("UQ"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("IUQ"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Mo"); //$NON-NLS-1$
+		dlg.cbM01Kennung.setSelectedIndex(0);
+	}
+
+	public void resetMask() {
+		setRegion(Main.pref.get("tomsplugin.IALA").equals("B"));
+
+		dlg.lM01Icon.setIcon(null);
+		dlg.lM02Icon.setIcon(null);
+		dlg.lM03Icon.setIcon(null);
+		dlg.lM04Icon.setIcon(null);
+		dlg.lM05Icon.setIcon(null);
+		dlg.lM06Icon.setIcon(null);
+
+		dlg.rbM01RegionA.setEnabled(false);
+		dlg.rbM01RegionB.setEnabled(false);
+		dlg.lM01FireMark.setText("");
+		dlg.cbM01CatOfMark.setVisible(false);
+		dlg.lM01CatOfMark.setVisible(false);
+		setBuoyIndex(0);
+		dlg.cbM01StyleOfMark.setVisible(false);
+		dlg.lM01StyleOfMark.setVisible(false);
+		setStyleIndex(0);
+		dlg.tfM01Name.setText("");
+		dlg.tfM01Name.setEnabled(false);
+		setName("");
+		dlg.cM01TopMark.setSelected(false);
+		dlg.cM01TopMark.setVisible(false);
+		dlg.cbM01TopMark.setVisible(false);
+		setTopMark(false);
+		dlg.cM01Radar.setSelected(false);
+		dlg.cM01Radar.setVisible(false);
+		setRadar(false);
+		dlg.cM01Racon.setSelected(false);
+		dlg.cM01Racon.setVisible(false);
+		dlg.cbM01Racon.setVisible(false);
+		dlg.tfM01Racon.setText("");
+		dlg.tfM01Racon.setVisible(false);
+		dlg.lM01Racon.setVisible(false);
+		setRacon(false);
+		setRaType(0);
+		dlg.cM01Fog.setSelected(false);
+		dlg.cM01Fog.setVisible(false);
+		dlg.cbM01Fog.setVisible(false);
+		setFogSound(0);
+		dlg.tfM01FogGroup.setText("");
+		dlg.tfM01FogGroup.setVisible(false);
+		dlg.lM01FogGroup.setVisible(false);
+		dlg.tfM01FogPeriod.setText("");
+		dlg.tfM01FogPeriod.setVisible(false);
+		dlg.lM01FogPeriod.setVisible(false);
+		setFog(false);
+		dlg.cM01Fired.setSelected(false);
+		dlg.cM01Fired.setVisible(false);
+		setFired(false);
+		dlg.rbM01Fired1.setVisible(false);
+		dlg.rbM01Fired1.setSelected(true);
+		dlg.rbM01FiredN.setVisible(false);
+		dlg.rbM01FiredN.setSelected(false);
+		setSectored(false);
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.setVisible(false);
+		dlg.lM01Kennung.setVisible(false);
+		setLightChar("");
+		dlg.tfM01Height.setText("");
+		dlg.tfM01Height.setVisible(false);
+		dlg.lM01Height.setVisible(false);
+		setHeight("");
+		dlg.tfM01Range.setText("");
+		dlg.tfM01Range.setVisible(false);
+		dlg.lM01Range.setVisible(false);
+		setRange("");
+		dlg.cbM01Colour.setVisible(false);
+		dlg.lM01Colour.setVisible(false);
+		setLightColour("");
+		dlg.cbM01Sector.setVisible(false);
+		dlg.lM01Sector.setVisible(false);
+		setSectorIndex(0);
+		dlg.tfM01Group.setText("");
+		dlg.tfM01Group.setVisible(false);
+		dlg.lM01Group.setVisible(false);
+		setLightGroup("");
+		dlg.tfM01RepeatTime.setText("");
+		dlg.tfM01RepeatTime.setVisible(false);
+		dlg.lM01RepeatTime.setVisible(false);
+		setLightPeriod("");
+		dlg.tfM01Bearing.setText("");
+		dlg.tfM01Bearing.setVisible(false);
+		dlg.lM01Bearing.setVisible(false);
+		setBearing1("");
+		dlg.tfM02Bearing.setText("");
+		dlg.tfM02Bearing.setVisible(false);
+		setBearing2("");
+		dlg.tfM01Radius.setText("");
+		dlg.tfM01Radius.setVisible(false);
+		setRadius("");
+
+		dlg.bM01Save.setEnabled(false);
+	}
 
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 23269)
@@ -18,132 +18,132 @@
 public class BuoyCard extends Buoy {
 
-    public BuoyCard(SmpDialogAction dia, Node node) {
-        super(dia);
-
-        String str;
-        Map<String, String> keys;
-        keys = node.getKeys();
-        setNode(node);
-
-        resetMask();
-        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);
-
-        dlg.cbM01TypeOfMark.setSelectedIndex(CARDINAL);
-
-        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$
-                setBuoyIndex(CARD_NORTH);
-                setColour(BLACK_YELLOW);
-            } else if (col.equals("black;yellow;black")) { //$NON-NLS-1$
-                setBuoyIndex(CARD_EAST);
-                setColour(BLACK_YELLOW_BLACK);
-            } else if (col.equals("yellow;black")) { //$NON-NLS-1$
-                setBuoyIndex(CARD_SOUTH);
-                setColour(YELLOW_BLACK);
-            } else if (col.equals("yellow;black;yellow")) { //$NON-NLS-1$
-                setBuoyIndex(CARD_WEST);
-                setColour(YELLOW_BLACK_YELLOW);
-            }
-        } else if (cat.equals("north")) { //$NON-NLS-1$
-            setBuoyIndex(CARD_NORTH);
-            setColour(BLACK_YELLOW);
-        } else if (cat.equals("east")) { //$NON-NLS-1$
-            setBuoyIndex(CARD_EAST);
-            setColour(BLACK_YELLOW_BLACK);
-        } else if (cat.equals("south")) { //$NON-NLS-1$
-            setBuoyIndex(CARD_SOUTH);
-            setColour(YELLOW_BLACK);
-        } else if (cat.equals("west")) { //$NON-NLS-1$
-            setBuoyIndex(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);
-
-        refreshLights();
-        parseLights(keys);
-        parseFogRadar(keys);
-
-        dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
-        dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-        dlg.tfM01Name.setText(getName());
-        dlg.cM01TopMark.setSelected(hasTopMark());
-    }
+	public BuoyCard(SmpDialogAction dia, Node node) {
+		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
+
+		resetMask();
+		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);
+
+		dlg.cbM01TypeOfMark.setSelectedIndex(CARDINAL);
+
+		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$
+				setBuoyIndex(CARD_NORTH);
+				setColour(BLACK_YELLOW);
+			} else if (col.equals("black;yellow;black")) { //$NON-NLS-1$
+				setBuoyIndex(CARD_EAST);
+				setColour(BLACK_YELLOW_BLACK);
+			} else if (col.equals("yellow;black")) { //$NON-NLS-1$
+				setBuoyIndex(CARD_SOUTH);
+				setColour(YELLOW_BLACK);
+			} else if (col.equals("yellow;black;yellow")) { //$NON-NLS-1$
+				setBuoyIndex(CARD_WEST);
+				setColour(YELLOW_BLACK_YELLOW);
+			}
+		} else if (cat.equals("north")) { //$NON-NLS-1$
+			setBuoyIndex(CARD_NORTH);
+			setColour(BLACK_YELLOW);
+		} else if (cat.equals("east")) { //$NON-NLS-1$
+			setBuoyIndex(CARD_EAST);
+			setColour(BLACK_YELLOW_BLACK);
+		} else if (cat.equals("south")) { //$NON-NLS-1$
+			setBuoyIndex(CARD_SOUTH);
+			setColour(YELLOW_BLACK);
+		} else if (cat.equals("west")) { //$NON-NLS-1$
+			setBuoyIndex(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);
+
+		refreshLights();
+		parseLights(keys);
+		parseFogRadar(keys);
+
+		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
+	}
 
 	public void refreshLights() {
-        dlg.cbM01Kennung.removeAllItems();
-        dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
-        dlg.cbM01Kennung.setSelectedIndex(0);
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
+		dlg.cbM01Kennung.setSelectedIndex(0);
 
 		switch (getBuoyIndex()) {
@@ -165,9 +165,9 @@
 			break;
 		}
-    }
-
-    public boolean isValid() {
-        return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
-    }
+	}
+
+	public boolean isValid() {
+		return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
+	}
 
 	public void setLightColour() {
@@ -180,5 +180,5 @@
 		super.paintSign();
 
-        dlg.sM01StatusBar.setText(getErrMsg());
+		dlg.sM01StatusBar.setText(getErrMsg());
 
 		if (isValid()) {
@@ -223,189 +223,189 @@
 				image += "_Pillar"; //$NON-NLS-1$
 				break;
-            case SeaMark.CARD_SPAR:
-                image += "_Spar"; //$NON-NLS-1$
-                break;
-            case SeaMark.CARD_BEACON:
-                image += "_Beacon"; //$NON-NLS-1$
-                break;
-            case SeaMark.CARD_TOWER:
-                image += "_Tower"; //$NON-NLS-1$
-                break;
-            case SeaMark.CARD_FLOAT:
-                image += "_Float"; //$NON-NLS-1$
-                break;
-            default:
-                return;
-            }
-
-            switch (getBuoyIndex()) {
-            case CARD_NORTH:
-                image += "_North"; //$NON-NLS-1$
-                break;
-            case CARD_EAST:
-                image += "_East"; //$NON-NLS-1$
-                break;
-            case CARD_SOUTH:
-                image += "_South"; //$NON-NLS-1$
-                break;
-            case CARD_WEST:
-                image += "_West"; //$NON-NLS-1$
-                break;
-            default:
-                return;
-            }
-
-            if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$
-                image += ".png"; //$NON-NLS-1$
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-
-            } else
-                dlg.lM01Icon.setIcon(null);
-        }
-    }
-
-    public void saveSign() {
-        Node node = getNode();
-        if (node == null) {
-            return;
-        }
-
-        String shape = ""; //$NON-NLS-1$
-
-        switch (getStyleIndex()) {
-        case CARD_PILLAR:
-            super.saveSign("buoy_cardinal"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_cardinal:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case CARD_SPAR:
-            super.saveSign("buoy_cardinal"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_cardinal:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case CARD_BEACON:
-            super.saveSign("beacon_cardinal"); //$NON-NLS-1$
-            break;
-        case CARD_TOWER:
-            super.saveSign("beacon_cardinal"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_cardinal:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case CARD_FLOAT:
-            super.saveSign("light_float"); //$NON-NLS-1$
-            break;
-        default:
-        }
-
-        switch (getStyleIndex()) {
-        case CARD_PILLAR:
-        case CARD_SPAR:
-            switch (getBuoyIndex()) {
-            case SeaMark.CARD_NORTH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones up"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_EAST:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones base together"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_SOUTH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones down"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_WEST:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones point together"; //$NON-NLS-1$
-                break;
-            }
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case CARD_BEACON:
-        case CARD_TOWER:
-            switch (getBuoyIndex()) {
-            case SeaMark.CARD_NORTH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones up"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_EAST:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones base together"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_SOUTH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones down"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_WEST:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones point together"; //$NON-NLS-1$
-                break;
-            }
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case CARD_FLOAT:
-            switch (getBuoyIndex()) {
-            case SeaMark.CARD_NORTH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:light_float:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones up"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_EAST:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:light_float:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones base together"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_SOUTH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:light_float:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones down"; //$NON-NLS-1$
-                break;
-
-            case SeaMark.CARD_WEST:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:light_float:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-                shape = "2 cones point together"; //$NON-NLS-1$
-                break;
-            }
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        }
-        saveTopMarkData(shape, "black"); //$NON-NLS-1$
-        saveLightData(); //$NON-NLS-1$
-        saveRadarFogData();
-    }
+			case SeaMark.CARD_SPAR:
+				image += "_Spar"; //$NON-NLS-1$
+				break;
+			case SeaMark.CARD_BEACON:
+				image += "_Beacon"; //$NON-NLS-1$
+				break;
+			case SeaMark.CARD_TOWER:
+				image += "_Tower"; //$NON-NLS-1$
+				break;
+			case SeaMark.CARD_FLOAT:
+				image += "_Float"; //$NON-NLS-1$
+				break;
+			default:
+				return;
+			}
+
+			switch (getBuoyIndex()) {
+			case CARD_NORTH:
+				image += "_North"; //$NON-NLS-1$
+				break;
+			case CARD_EAST:
+				image += "_East"; //$NON-NLS-1$
+				break;
+			case CARD_SOUTH:
+				image += "_South"; //$NON-NLS-1$
+				break;
+			case CARD_WEST:
+				image += "_West"; //$NON-NLS-1$
+				break;
+			default:
+				return;
+			}
+
+			if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$
+				image += ".png"; //$NON-NLS-1$
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+
+			} else
+				dlg.lM01Icon.setIcon(null);
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+		if (node == null) {
+			return;
+		}
+
+		String shape = ""; //$NON-NLS-1$
+
+		switch (getStyleIndex()) {
+		case CARD_PILLAR:
+			super.saveSign("buoy_cardinal"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_cardinal:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case CARD_SPAR:
+			super.saveSign("buoy_cardinal"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_cardinal:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case CARD_BEACON:
+			super.saveSign("beacon_cardinal"); //$NON-NLS-1$
+			break;
+		case CARD_TOWER:
+			super.saveSign("beacon_cardinal"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_cardinal:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case CARD_FLOAT:
+			super.saveSign("light_float"); //$NON-NLS-1$
+			break;
+		default:
+		}
+
+		switch (getStyleIndex()) {
+		case CARD_PILLAR:
+		case CARD_SPAR:
+			switch (getBuoyIndex()) {
+			case SeaMark.CARD_NORTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones up"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_EAST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones base together"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_SOUTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones down"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_WEST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones point together"; //$NON-NLS-1$
+				break;
+			}
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case CARD_BEACON:
+		case CARD_TOWER:
+			switch (getBuoyIndex()) {
+			case SeaMark.CARD_NORTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones up"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_EAST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones base together"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_SOUTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones down"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_WEST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones point together"; //$NON-NLS-1$
+				break;
+			}
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case CARD_FLOAT:
+			switch (getBuoyIndex()) {
+			case SeaMark.CARD_NORTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones up"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_EAST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones base together"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_SOUTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones down"; //$NON-NLS-1$
+				break;
+
+			case SeaMark.CARD_WEST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+				shape = "2 cones point together"; //$NON-NLS-1$
+				break;
+			}
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		}
+		saveTopMarkData(shape, "black"); //$NON-NLS-1$
+		saveLightData(); //$NON-NLS-1$
+		saveRadarFogData();
+	}
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 23269)
@@ -17,95 +17,95 @@
 
 public class BuoyIsol extends Buoy {
-    public BuoyIsol(SmpDialogAction dia, Node node) {
-        super(dia);
-
-        String str;
-        Map<String, String> keys;
-        keys = node.getKeys();
-        setNode(node);
-
-        resetMask();
-
-        dlg.cbM01TypeOfMark.setSelectedIndex(ISOLATED_DANGER);
-
-        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);
-
-        setBuoyIndex(ISOLATED_DANGER);
-        setColour(SeaMark.BLACK_RED_BLACK);
-        setLightColour("W"); //$NON-NLS-1$
-        setTopMark(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_isolated_danger:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:buoy_isolated_danger:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:beacon_isolated_danger:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:beacon_isolated_danger: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$
-
-        if (keys.containsKey("seamark:buoy_isolated_danger:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:buoy_isolated_danger:shape"); //$NON-NLS-1$
-
-            if (str.equals("pillar")) //$NON-NLS-1$
-                setStyleIndex(ISOL_PILLAR);
-            else if (str.equals("spar")) //$NON-NLS-1$
-                setStyleIndex(ISOL_SPAR);
-        } else if (keys.containsKey("seamark:beacon_isolated_danger:colour")) { //$NON-NLS-1$
-            if (keys.containsKey("seamark:beacon_isolated_danger:shape")) { //$NON-NLS-1$
-                str = keys.get("seamark:beacon_isolated_danger:shape"); //$NON-NLS-1$
-
-                if (str.equals("tower")) //$NON-NLS-1$
-                    setStyleIndex(ISOL_TOWER);
-                else
-                    setStyleIndex(ISOL_BEACON);
-            } else
-                setStyleIndex(ISOL_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);
-        dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-
-        if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$
-            setTopMark(true);
-        }
-
-        refreshLights();
-        parseLights(keys);
-        parseFogRadar(keys);
-
-        dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-        dlg.tfM01Name.setText(getName());
-        dlg.cM01TopMark.setSelected(hasTopMark());
-    }
-
-    public void refreshLights() {
-        dlg.cbM01Kennung.removeAllItems();
-        dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Fl(2)"); //$NON-NLS-1$
-        dlg.cbM01Kennung.setSelectedIndex(0);
-    }
-
-    public boolean isValid() {
-        return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
-    }
+	public BuoyIsol(SmpDialogAction dia, Node node) {
+		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
+
+		resetMask();
+
+		dlg.cbM01TypeOfMark.setSelectedIndex(ISOLATED_DANGER);
+
+		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);
+
+		setBuoyIndex(ISOLATED_DANGER);
+		setColour(SeaMark.BLACK_RED_BLACK);
+		setLightColour("W"); //$NON-NLS-1$
+		setTopMark(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_isolated_danger:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:buoy_isolated_danger:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:beacon_isolated_danger:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:beacon_isolated_danger: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$
+
+		if (keys.containsKey("seamark:buoy_isolated_danger:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:buoy_isolated_danger:shape"); //$NON-NLS-1$
+
+			if (str.equals("pillar")) //$NON-NLS-1$
+				setStyleIndex(ISOL_PILLAR);
+			else if (str.equals("spar")) //$NON-NLS-1$
+				setStyleIndex(ISOL_SPAR);
+		} else if (keys.containsKey("seamark:beacon_isolated_danger:colour")) { //$NON-NLS-1$
+			if (keys.containsKey("seamark:beacon_isolated_danger:shape")) { //$NON-NLS-1$
+				str = keys.get("seamark:beacon_isolated_danger:shape"); //$NON-NLS-1$
+
+				if (str.equals("tower")) //$NON-NLS-1$
+					setStyleIndex(ISOL_TOWER);
+				else
+					setStyleIndex(ISOL_BEACON);
+			} else
+				setStyleIndex(ISOL_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);
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+
+		if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$
+			setTopMark(true);
+		}
+
+		refreshLights();
+		parseLights(keys);
+		parseFogRadar(keys);
+
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
+	}
+
+	public void refreshLights() {
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Fl(2)"); //$NON-NLS-1$
+		dlg.cbM01Kennung.setSelectedIndex(0);
+	}
+
+	public boolean isValid() {
+		return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
+	}
 
 	public void setLightColour() {
@@ -117,7 +117,7 @@
 			return;
 
-        super.paintSign();
-
-        dlg.sM01StatusBar.setText(getErrMsg());
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
 
 		if (isValid()) {
@@ -153,100 +153,100 @@
 			}
 
-            String image = "/images/Cardinal"; //$NON-NLS-1$
-
-            switch (getStyleIndex()) {
-            case ISOL_PILLAR:
-                image += "_Pillar_Single"; //$NON-NLS-1$
-                break;
-            case ISOL_SPAR:
-                image += "_Spar_Single"; //$NON-NLS-1$
-                break;
-            case ISOL_BEACON:
-                image += "_Beacon_Single"; //$NON-NLS-1$
-                break;
-            case ISOL_TOWER:
-                image += "_Tower_Single"; //$NON-NLS-1$
-                break;
-            case ISOL_FLOAT:
-                image += "_Float_Single"; //$NON-NLS-1$
-                break;
-            default:
-            }
-
-            if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$
-                image += ".png"; //$NON-NLS-1$
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-            } else
-                dlg.lM01Icon.setIcon(null);
-        } else {
-            dlg.tfM01Name.setEnabled(false);
-            dlg.tfM01Name.setText(""); //$NON-NLS-1$
-            dlg.cM01TopMark.setVisible(false);
-            dlg.cM01Radar.setVisible(false);
-            dlg.cM01Racon.setVisible(false);
-            dlg.cM01Fog.setVisible(false);
-            dlg.cM01Fired.setVisible(false);
-        }
-    }
-
-    public void saveSign() {
-        Node node = getNode();
-
-        if (node == null) {
-            return;
-        }
-
-        switch (getStyleIndex()) {
-        case ISOL_PILLAR:
-            super.saveSign("buoy_isolated_danger"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_isolated_danger:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case ISOL_SPAR:
-            super.saveSign("buoy_isolated_danger"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_isolated_danger:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case ISOL_BEACON:
-            super.saveSign("beacon_isolated_danger"); //$NON-NLS-1$
-            break;
-        case ISOL_TOWER:
-            super.saveSign("beacon_isolated_danger"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_isolated_danger:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case ISOL_FLOAT:
-            super.saveSign("light_float"); //$NON-NLS-1$
-            break;
-        default:
-        }
-
-        switch (getStyleIndex()) {
-        case ISOL_PILLAR:
-        case ISOL_SPAR:
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_isolated_danger:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case ISOL_BEACON:
-        case ISOL_TOWER:
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_isolated_danger:colour_pattern", //$NON-NLS-1$
-                    "horizontal stripes")); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_isolated_danger:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case ISOL_FLOAT:
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:light_float:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        }
-
-        saveTopMarkData("2 spheres", "black"); //$NON-NLS-1$ //$NON-NLS-2$
-        saveLightData(); //$NON-NLS-1$
-        saveRadarFogData();
-    }
+			String image = "/images/Cardinal"; //$NON-NLS-1$
+
+			switch (getStyleIndex()) {
+			case ISOL_PILLAR:
+				image += "_Pillar_Single"; //$NON-NLS-1$
+				break;
+			case ISOL_SPAR:
+				image += "_Spar_Single"; //$NON-NLS-1$
+				break;
+			case ISOL_BEACON:
+				image += "_Beacon_Single"; //$NON-NLS-1$
+				break;
+			case ISOL_TOWER:
+				image += "_Tower_Single"; //$NON-NLS-1$
+				break;
+			case ISOL_FLOAT:
+				image += "_Float_Single"; //$NON-NLS-1$
+				break;
+			default:
+			}
+
+			if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$
+				image += ".png"; //$NON-NLS-1$
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+			} else
+				dlg.lM01Icon.setIcon(null);
+		} else {
+			dlg.tfM01Name.setEnabled(false);
+			dlg.tfM01Name.setText(""); //$NON-NLS-1$
+			dlg.cM01TopMark.setVisible(false);
+			dlg.cM01Radar.setVisible(false);
+			dlg.cM01Racon.setVisible(false);
+			dlg.cM01Fog.setVisible(false);
+			dlg.cM01Fired.setVisible(false);
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+			super.saveSign("buoy_isolated_danger"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case ISOL_SPAR:
+			super.saveSign("buoy_isolated_danger"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case ISOL_BEACON:
+			super.saveSign("beacon_isolated_danger"); //$NON-NLS-1$
+			break;
+		case ISOL_TOWER:
+			super.saveSign("beacon_isolated_danger"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_isolated_danger:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case ISOL_FLOAT:
+			super.saveSign("light_float"); //$NON-NLS-1$
+			break;
+		default:
+		}
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+		case ISOL_SPAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case ISOL_BEACON:
+		case ISOL_TOWER:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_isolated_danger:colour_pattern", //$NON-NLS-1$
+					"horizontal stripes")); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_isolated_danger:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case ISOL_FLOAT:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		}
+
+		saveTopMarkData("2 spheres", "black"); //$NON-NLS-1$ //$NON-NLS-2$
+		saveLightData(); //$NON-NLS-1$
+		saveRadarFogData();
+	}
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 23269)
@@ -16,321 +16,321 @@
 
 public class BuoyLat extends Buoy {
-    public BuoyLat(SmpDialogAction dia, Node node) {
-        super(dia);
-
-        String str;
-        Map<String, String> keys;
-        keys = node.getKeys();
-        setNode(node);
-
-        resetMask();
-
-        dlg.cbM01CatOfMark.removeAllItems();
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.152")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.153")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.154")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.155")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.156")); //$NON-NLS-1$
-
-        dlg.rbM01RegionA.setEnabled(true);
-        dlg.rbM01RegionB.setEnabled(true);
-        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.setEnabled(true);
-
-        dlg.cbM01TypeOfMark.setSelectedIndex(LATERAL);
-
-        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_lateral:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:buoy_lateral:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:beacon_lateral:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:beacon_lateral: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$
-        String top = ""; //$NON-NLS-1$
-
-        if (getStyleIndex() != LAT_PERCH) {
-            if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$
-                top = keys.get("seamark:topmark:shape"); //$NON-NLS-1$
-                setTopMark(true);
-            }
-            if (keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$
-                setTopMark(true);
-            }
-        }
-
-        if (keys.containsKey("seamark:buoy_lateral:colour")) //$NON-NLS-1$
-            col = keys.get("seamark:buoy_lateral:colour"); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:beacon_lateral:colour")) //$NON-NLS-1$
-            col = keys.get("seamark:beacon_lateral: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 (keys.containsKey("seamark:buoy_lateral:category")) //$NON-NLS-1$
-            cat = keys.get("seamark:buoy_lateral:category"); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:beacon_lateral:category")) //$NON-NLS-1$
-            cat = keys.get("seamark:beacon_lateral:category"); //$NON-NLS-1$
-
-        if (cat.isEmpty()) { //$NON-NLS-1$
-            if (col.equals("red")) { //$NON-NLS-1$
-                setColour(RED);
-                if (top.equals("cylinder")) { //$NON-NLS-1$
-                    setBuoyIndex(PORT_HAND);
-                    setRegion(IALA_A);
-                } else if (top.equals("cone, point up")) { //$NON-NLS-1$
-                    setBuoyIndex(STARBOARD_HAND);
-                    setRegion(IALA_B);
-                } else {
-                    if (getRegion() == IALA_A)
-                        setBuoyIndex(PORT_HAND);
-                    else
-                        setBuoyIndex(STARBOARD_HAND);
-                }
-            } else if (col.equals("green")) { //$NON-NLS-1$
-                setColour(GREEN);
-                if (top.equals("cone, point up")) { //$NON-NLS-1$
-                    setBuoyIndex(STARBOARD_HAND);
-                    setRegion(IALA_A);
-                } else if (top.equals("cylinder")) { //$NON-NLS-1$
-                    setBuoyIndex(PORT_HAND);
-                    setRegion(IALA_B);
-                } else {
-                    if (getRegion() == IALA_A)
-                        setBuoyIndex(STARBOARD_HAND);
-                    else
-                        setBuoyIndex(PORT_HAND);
-                }
-            } else if (col.equals("red;green;red")) { //$NON-NLS-1$
-                setColour(RED_GREEN_RED);
-                if (top.equals("cylinder")) { //$NON-NLS-1$
-                    setBuoyIndex(PREF_PORT_HAND);
-                    setRegion(IALA_A);
-                } else if (top.equals("cone, point up")) { //$NON-NLS-1$
-                    setBuoyIndex(PREF_STARBOARD_HAND);
-                    setRegion(IALA_B);
-                } else {
-                    if (getRegion() == IALA_A)
-                        setBuoyIndex(PREF_PORT_HAND);
-                    else
-                        setBuoyIndex(PREF_STARBOARD_HAND);
-                }
-            } else if (col.equals("green;red;green")) { //$NON-NLS-1$
-                setColour(GREEN_RED_GREEN);
-                if (top.equals("cone, point up")) { //$NON-NLS-1$
-                    setBuoyIndex(PREF_STARBOARD_HAND);
-                    setRegion(IALA_A);
-                } else if (top.equals("cylinder")) { //$NON-NLS-1$
-                    setBuoyIndex(PREF_PORT_HAND);
-                    setRegion(IALA_B);
-                } else {
-                    if (getRegion() == IALA_A)
-                        setBuoyIndex(PREF_STARBOARD_HAND);
-                    else
-                        setBuoyIndex(PREF_PORT_HAND);
-                }
-            }
-        } else if (cat.equals("port")) { //$NON-NLS-1$
-
-            setBuoyIndex(PORT_HAND);
-
-            if (col.equals("red")) { //$NON-NLS-1$
-                setRegion(IALA_A);
-                setColour(RED);
-            } else if (col.equals("green")) { //$NON-NLS-1$
-                setRegion(IALA_B);
-                setColour(GREEN);
-            } else {
-                if (getRegion() == IALA_A)
-                    setColour(RED);
-                else
-                    setColour(GREEN);
-            }
-        } else if (cat.equals("starboard")) { //$NON-NLS-1$
-
-            setBuoyIndex(STARBOARD_HAND);
-
-            if (col.equals("green")) { //$NON-NLS-1$
-                setRegion(IALA_A);
-                setColour(GREEN);
-            } else if (col.equals("red")) { //$NON-NLS-1$
-                setRegion(IALA_B);
-                setColour(RED);
-            } else {
-                if (getRegion() == IALA_A)
-                    setColour(GREEN);
-                else
-                    setColour(RED);
-            }
-        } else if (cat.equals("preferred_channel_port")) { //$NON-NLS-1$
-
-            setBuoyIndex(PREF_PORT_HAND);
-
-            if (col.equals("red;green;red")) { //$NON-NLS-1$
-                setRegion(IALA_A);
-                setColour(RED_GREEN_RED);
-            } else if (col.equals("green;red;green")) { //$NON-NLS-1$
-                setRegion(IALA_B);
-                setColour(GREEN_RED_GREEN);
-            } else {
-                if (getRegion() == IALA_A)
-                    setColour(RED_GREEN_RED);
-                else
-                    setColour(GREEN_RED_GREEN);
-            }
-
-        } else if (cat.equals("preferred_channel_starboard")) { //$NON-NLS-1$
-
-            setBuoyIndex(PREF_STARBOARD_HAND);
-
-            if (col.equals("green;red;green")) { //$NON-NLS-1$
-                setRegion(IALA_A);
-                setColour(GREEN_RED_GREEN);
-            } else if (col.equals("red;green;red")) { //$NON-NLS-1$
-                setRegion(IALA_B);
-                setColour(RED_GREEN_RED);
-            } else {
-                if (getRegion() == IALA_A)
-                    setColour(GREEN_RED_GREEN);
-                else
-                    setColour(RED_GREEN_RED);
-            }
-        }
-
-        if (keys.containsKey("seamark:buoy_lateral:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:buoy_lateral:shape"); //$NON-NLS-1$
-
-            switch (getBuoyIndex()) {
-            case PORT_HAND:
-                if (str.equals("can")) //$NON-NLS-1$
-                    setStyleIndex(LAT_CAN);
-                else if (str.equals("pillar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_PILLAR);
-                else if (str.equals("spar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_SPAR);
-                break;
-
-            case PREF_PORT_HAND:
-                if (str.equals("can")) //$NON-NLS-1$
-                    setStyleIndex(LAT_CAN);
-                else if (str.equals("pillar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_PILLAR);
-                else if (str.equals("spar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_SPAR);
-                break;
-
-            case STARBOARD_HAND:
-                if (str.equals("conical")) //$NON-NLS-1$
-                    setStyleIndex(LAT_CONE);
-                else if (str.equals("pillar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_PILLAR);
-                else if (str.equals("spar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_SPAR);
-                break;
-
-            case PREF_STARBOARD_HAND:
-                if (str.equals("conical")) //$NON-NLS-1$
-                    setStyleIndex(LAT_CONE);
-                else if (str.equals("pillar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_PILLAR);
-                else if (str.equals("spar")) //$NON-NLS-1$
-                    setStyleIndex(LAT_SPAR);
-                break;
-            }
-        } else if (keys.containsKey("seamark:beacon_lateral:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:beacon_lateral:shape"); //$NON-NLS-1$
-            if (str.equals("tower")) //$NON-NLS-1$
-                setStyleIndex(LAT_TOWER);
-            else if (str.equals("perch")) //$NON-NLS-1$
-                setStyleIndex(LAT_PERCH);
-            else
-                setStyleIndex(LAT_BEACON);
-        } else if (keys.containsKey("seamark:type") //$NON-NLS-1$
-                && (keys.get("seamark:type").equals("beacon_lateral"))) { //$NON-NLS-1$ //$NON-NLS-2$
-            setStyleIndex(LAT_BEACON);
-        } else if (keys.containsKey("seamark:type") //$NON-NLS-1$
-                && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$
-            setStyleIndex(LAT_FLOAT);
-        }
-
-        refreshStyles();
-        refreshLights();
-        setLightColour();
-        parseLights(keys);
-        parseFogRadar(keys);
-
-        dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
-        dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-        dlg.tfM01Name.setText(getName());
-        dlg.cM01TopMark.setSelected(hasTopMark());
-    }
-
-    public void refreshStyles() {
-        int type = getBuoyIndex();
-        int style = getStyleIndex();
-
-        dlg.cbM01StyleOfMark.removeAllItems();
-        dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.213")); //$NON-NLS-1$
-
-        switch (type) {
-        case PORT_HAND:
-            dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.02")); //$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.addItem(Messages.getString("Buoy.10")); //$NON-NLS-1$
-            break;
-        case STARBOARD_HAND:
-            dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$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.addItem(Messages.getString("Buoy.10")); //$NON-NLS-1$
-            break;
-        case PREF_PORT_HAND:
-            dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.02")); //$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$
-            break;
-        case PREF_STARBOARD_HAND:
-            dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$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$
-            break;
+	public BuoyLat(SmpDialogAction dia, Node node) {
+		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
+
+		resetMask();
+
+		dlg.cbM01CatOfMark.removeAllItems();
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.152")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.153")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.154")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.155")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.156")); //$NON-NLS-1$
+
+		dlg.rbM01RegionA.setEnabled(true);
+		dlg.rbM01RegionB.setEnabled(true);
+		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.setEnabled(true);
+
+		dlg.cbM01TypeOfMark.setSelectedIndex(LATERAL);
+
+		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_lateral:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:buoy_lateral:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:beacon_lateral:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:beacon_lateral: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$
+		String top = ""; //$NON-NLS-1$
+
+		if (getStyleIndex() != LAT_PERCH) {
+			if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$
+				top = keys.get("seamark:topmark:shape"); //$NON-NLS-1$
+				setTopMark(true);
+			}
+			if (keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$
+				setTopMark(true);
+			}
 		}
 
-        if (style >= dlg.cbM01StyleOfMark.getItemCount())
-            style = 0;
-        setStyleIndex(style);
-        dlg.cbM01StyleOfMark.setSelectedIndex(style);
-        dlg.cbM01StyleOfMark.setVisible(true);
-        dlg.lM01StyleOfMark.setVisible(true);
-    }
+		if (keys.containsKey("seamark:buoy_lateral:colour")) //$NON-NLS-1$
+			col = keys.get("seamark:buoy_lateral:colour"); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:beacon_lateral:colour")) //$NON-NLS-1$
+			col = keys.get("seamark:beacon_lateral: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 (keys.containsKey("seamark:buoy_lateral:category")) //$NON-NLS-1$
+			cat = keys.get("seamark:buoy_lateral:category"); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:beacon_lateral:category")) //$NON-NLS-1$
+			cat = keys.get("seamark:beacon_lateral:category"); //$NON-NLS-1$
+
+		if (cat.isEmpty()) { //$NON-NLS-1$
+			if (col.equals("red")) { //$NON-NLS-1$
+				setColour(RED);
+				if (top.equals("cylinder")) { //$NON-NLS-1$
+					setBuoyIndex(PORT_HAND);
+					setRegion(IALA_A);
+				} else if (top.equals("cone, point up")) { //$NON-NLS-1$
+					setBuoyIndex(STARBOARD_HAND);
+					setRegion(IALA_B);
+				} else {
+					if (getRegion() == IALA_A)
+						setBuoyIndex(PORT_HAND);
+					else
+						setBuoyIndex(STARBOARD_HAND);
+				}
+			} else if (col.equals("green")) { //$NON-NLS-1$
+				setColour(GREEN);
+				if (top.equals("cone, point up")) { //$NON-NLS-1$
+					setBuoyIndex(STARBOARD_HAND);
+					setRegion(IALA_A);
+				} else if (top.equals("cylinder")) { //$NON-NLS-1$
+					setBuoyIndex(PORT_HAND);
+					setRegion(IALA_B);
+				} else {
+					if (getRegion() == IALA_A)
+						setBuoyIndex(STARBOARD_HAND);
+					else
+						setBuoyIndex(PORT_HAND);
+				}
+			} else if (col.equals("red;green;red")) { //$NON-NLS-1$
+				setColour(RED_GREEN_RED);
+				if (top.equals("cylinder")) { //$NON-NLS-1$
+					setBuoyIndex(PREF_PORT_HAND);
+					setRegion(IALA_A);
+				} else if (top.equals("cone, point up")) { //$NON-NLS-1$
+					setBuoyIndex(PREF_STARBOARD_HAND);
+					setRegion(IALA_B);
+				} else {
+					if (getRegion() == IALA_A)
+						setBuoyIndex(PREF_PORT_HAND);
+					else
+						setBuoyIndex(PREF_STARBOARD_HAND);
+				}
+			} else if (col.equals("green;red;green")) { //$NON-NLS-1$
+				setColour(GREEN_RED_GREEN);
+				if (top.equals("cone, point up")) { //$NON-NLS-1$
+					setBuoyIndex(PREF_STARBOARD_HAND);
+					setRegion(IALA_A);
+				} else if (top.equals("cylinder")) { //$NON-NLS-1$
+					setBuoyIndex(PREF_PORT_HAND);
+					setRegion(IALA_B);
+				} else {
+					if (getRegion() == IALA_A)
+						setBuoyIndex(PREF_STARBOARD_HAND);
+					else
+						setBuoyIndex(PREF_PORT_HAND);
+				}
+			}
+		} else if (cat.equals("port")) { //$NON-NLS-1$
+
+			setBuoyIndex(PORT_HAND);
+
+			if (col.equals("red")) { //$NON-NLS-1$
+				setRegion(IALA_A);
+				setColour(RED);
+			} else if (col.equals("green")) { //$NON-NLS-1$
+				setRegion(IALA_B);
+				setColour(GREEN);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(RED);
+				else
+					setColour(GREEN);
+			}
+		} else if (cat.equals("starboard")) { //$NON-NLS-1$
+
+			setBuoyIndex(STARBOARD_HAND);
+
+			if (col.equals("green")) { //$NON-NLS-1$
+				setRegion(IALA_A);
+				setColour(GREEN);
+			} else if (col.equals("red")) { //$NON-NLS-1$
+				setRegion(IALA_B);
+				setColour(RED);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(GREEN);
+				else
+					setColour(RED);
+			}
+		} else if (cat.equals("preferred_channel_port")) { //$NON-NLS-1$
+
+			setBuoyIndex(PREF_PORT_HAND);
+
+			if (col.equals("red;green;red")) { //$NON-NLS-1$
+				setRegion(IALA_A);
+				setColour(RED_GREEN_RED);
+			} else if (col.equals("green;red;green")) { //$NON-NLS-1$
+				setRegion(IALA_B);
+				setColour(GREEN_RED_GREEN);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(RED_GREEN_RED);
+				else
+					setColour(GREEN_RED_GREEN);
+			}
+
+		} else if (cat.equals("preferred_channel_starboard")) { //$NON-NLS-1$
+
+			setBuoyIndex(PREF_STARBOARD_HAND);
+
+			if (col.equals("green;red;green")) { //$NON-NLS-1$
+				setRegion(IALA_A);
+				setColour(GREEN_RED_GREEN);
+			} else if (col.equals("red;green;red")) { //$NON-NLS-1$
+				setRegion(IALA_B);
+				setColour(RED_GREEN_RED);
+			} else {
+				if (getRegion() == IALA_A)
+					setColour(GREEN_RED_GREEN);
+				else
+					setColour(RED_GREEN_RED);
+			}
+		}
+
+		if (keys.containsKey("seamark:buoy_lateral:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:buoy_lateral:shape"); //$NON-NLS-1$
+
+			switch (getBuoyIndex()) {
+			case PORT_HAND:
+				if (str.equals("can")) //$NON-NLS-1$
+					setStyleIndex(LAT_CAN);
+				else if (str.equals("pillar")) //$NON-NLS-1$
+					setStyleIndex(LAT_PILLAR);
+				else if (str.equals("spar")) //$NON-NLS-1$
+					setStyleIndex(LAT_SPAR);
+				break;
+
+			case PREF_PORT_HAND:
+				if (str.equals("can")) //$NON-NLS-1$
+					setStyleIndex(LAT_CAN);
+				else if (str.equals("pillar")) //$NON-NLS-1$
+					setStyleIndex(LAT_PILLAR);
+				else if (str.equals("spar")) //$NON-NLS-1$
+					setStyleIndex(LAT_SPAR);
+				break;
+
+			case STARBOARD_HAND:
+				if (str.equals("conical")) //$NON-NLS-1$
+					setStyleIndex(LAT_CONE);
+				else if (str.equals("pillar")) //$NON-NLS-1$
+					setStyleIndex(LAT_PILLAR);
+				else if (str.equals("spar")) //$NON-NLS-1$
+					setStyleIndex(LAT_SPAR);
+				break;
+
+			case PREF_STARBOARD_HAND:
+				if (str.equals("conical")) //$NON-NLS-1$
+					setStyleIndex(LAT_CONE);
+				else if (str.equals("pillar")) //$NON-NLS-1$
+					setStyleIndex(LAT_PILLAR);
+				else if (str.equals("spar")) //$NON-NLS-1$
+					setStyleIndex(LAT_SPAR);
+				break;
+			}
+		} else if (keys.containsKey("seamark:beacon_lateral:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:beacon_lateral:shape"); //$NON-NLS-1$
+			if (str.equals("tower")) //$NON-NLS-1$
+				setStyleIndex(LAT_TOWER);
+			else if (str.equals("perch")) //$NON-NLS-1$
+				setStyleIndex(LAT_PERCH);
+			else
+				setStyleIndex(LAT_BEACON);
+		} else if (keys.containsKey("seamark:type") //$NON-NLS-1$
+				&& (keys.get("seamark:type").equals("beacon_lateral"))) { //$NON-NLS-1$ //$NON-NLS-2$
+			setStyleIndex(LAT_BEACON);
+		} else if (keys.containsKey("seamark:type") //$NON-NLS-1$
+				&& (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$
+			setStyleIndex(LAT_FLOAT);
+		}
+
+		refreshStyles();
+		refreshLights();
+		setLightColour();
+		parseLights(keys);
+		parseFogRadar(keys);
+
+		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
+	}
+
+	public void refreshStyles() {
+		int type = getBuoyIndex();
+		int style = getStyleIndex();
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.213")); //$NON-NLS-1$
+
+		switch (type) {
+		case PORT_HAND:
+			dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.02")); //$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.addItem(Messages.getString("Buoy.10")); //$NON-NLS-1$
+			break;
+		case STARBOARD_HAND:
+			dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$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.addItem(Messages.getString("Buoy.10")); //$NON-NLS-1$
+			break;
+		case PREF_PORT_HAND:
+			dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.02")); //$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$
+			break;
+		case PREF_STARBOARD_HAND:
+			dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$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$
+			break;
+		}
+
+		if (style >= dlg.cbM01StyleOfMark.getItemCount())
+			style = 0;
+		setStyleIndex(style);
+		dlg.cbM01StyleOfMark.setSelectedIndex(style);
+		dlg.cbM01StyleOfMark.setVisible(true);
+		dlg.lM01StyleOfMark.setVisible(true);
+	}
 
 	public void refreshLights() {
@@ -361,9 +361,9 @@
 		super.paintSign();
 
-        dlg.sM01StatusBar.setText(getErrMsg());
-
-        if (isValid()) {
-            dlg.tfM01Name.setEnabled(true);
-            dlg.tfM01Name.setText(getName());
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		if (isValid()) {
+			dlg.tfM01Name.setEnabled(true);
+			dlg.tfM01Name.setText(getName());
 
 			boolean region = getRegion();
@@ -413,656 +413,656 @@
 			}
 
-            String image = "/images/Lateral"; //$NON-NLS-1$
-
-            switch (getBuoyIndex()) {
-            case PORT_HAND:
-                if (region == IALA_A)
-                    switch (style) {
-                    case LAT_CAN:
-                        image += "_Can_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_PERCH:
-                        image += "_Perch_Port"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                else
-                    switch (style) {
-                    case LAT_CAN:
-                        image += "_Can_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_PERCH:
-                        image += "_Perch_Port"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                break;
-
-            case STARBOARD_HAND:
-                if (region == IALA_A)
-                    switch (style) {
-                    case LAT_CONE:
-                        image += "_Cone_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_PERCH:
-                        image += "_Perch_Starboard"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                else
-                    switch (style) {
-                    case LAT_CONE:
-                        image += "_Cone_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_PERCH:
-                        image += "_Perch_Starboard"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                break;
-
-            case PREF_PORT_HAND:
-                if (region == IALA_A)
-                    switch (style) {
-                    case LAT_CAN:
-                        image += "_Can_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                else
-                    switch (style) {
-                    case LAT_CAN:
-                        image += "_Can_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                break;
-
-            case PREF_STARBOARD_HAND:
-                if (region == IALA_A)
-                    switch (style) {
-                    case LAT_CONE:
-                        image += "_Cone_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Green_Red_Green"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                else
-                    switch (style) {
-                    case LAT_CONE:
-                        image += "_Cone_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_PILLAR:
-                        image += "_Pillar_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_SPAR:
-                        image += "_Spar_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_BEACON:
-                        image += "_Beacon_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_TOWER:
-                        image += "_Tower_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    case LAT_FLOAT:
-                        image += "_Float_Red_Green_Red"; //$NON-NLS-1$
-                        break;
-                    default:
-                    }
-                break;
-
-            default:
-            }
-
-            if (!image.equals("/images/Lateral")) { //$NON-NLS-1$
-
-                image += ".png"; //$NON-NLS-1$
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-
-                if (hasTopMark()) {
-                    image = "";
-                    switch (getBuoyIndex()) {
-                    case PORT_HAND:
-                    case PREF_PORT_HAND:
-                        if (region == IALA_A)
-                            switch (style) {
-                            case LAT_CAN:
-                                image = "/images/Top_Can_Red_Buoy_Small.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_PILLAR:
-                            case LAT_SPAR:
-                                image = "/images/Top_Can_Red_Buoy.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_BEACON:
-                            case LAT_TOWER:
-                                image = "/images/Top_Can_Red_Beacon.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_FLOAT:
-                                image = "/images/Top_Can_Red_Float.png"; //$NON-NLS-1$
-                                break;
-                            }
-                        else
-                            switch (style) {
-                            case LAT_CAN:
-                                image = "/images/Top_Can_Green_Buoy_Small.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_PILLAR:
-                            case LAT_SPAR:
-                                image = "/images/Top_Can_Green_Buoy.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_BEACON:
-                            case LAT_TOWER:
-                                image = "/images/Top_Can_Green_Beacon.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_FLOAT:
-                                image = "/images/Top_Can_Green_Float.png"; //$NON-NLS-1$
-                                break;
-                            }
-                        break;
-
-                    case STARBOARD_HAND:
-                    case PREF_STARBOARD_HAND:
-                        if (region == IALA_A)
-                            switch (style) {
-                            case LAT_CONE:
-                                image = "/images/Top_Cone_Green_Buoy_Small.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_PILLAR:
-                            case LAT_SPAR:
-                                image = "/images/Top_Cone_Green_Buoy.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_BEACON:
-                            case LAT_TOWER:
-                                image = "/images/Top_Cone_Green_Beacon.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_FLOAT:
-                                image = "/images/Top_Cone_Green_Float.png"; //$NON-NLS-1$
-                                break;
-                            }
-                        else
-                            switch (style) {
-                            case LAT_CONE:
-                                image = "/images/Top_Cone_Red_Buoy_Small.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_PILLAR:
-                            case LAT_SPAR:
-                                image = "/images/Top_Cone_Red_Buoy.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_BEACON:
-                            case LAT_TOWER:
-                                image = "/images/Top_Cone_Red_Beacon.png"; //$NON-NLS-1$
-                                break;
-                            case LAT_FLOAT:
-                                image = "/images/Top_Cone_Red_Float.png"; //$NON-NLS-1$
-                                break;
-                            }
-                        break;
-                    }
-                    if (!image.isEmpty())
-                        dlg.lM06Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-                }
-            } else
-                dlg.lM01Icon.setIcon(null);
-        }
-    }
-
-    public void saveSign() {
-        Node node = getNode();
-
-        if (node == null) {
-            return;
-        }
-
-        int cat = getBuoyIndex();
-        String shape = ""; //$NON-NLS-1$
-        String colour = ""; //$NON-NLS-1$
-
-        switch (cat) {
-
-        case PORT_HAND:
-            switch (getStyleIndex()) {
-            case LAT_CAN:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "can")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_PILLAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_SPAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_BEACON:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                break;
-            case LAT_TOWER:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_FLOAT:
-                super.saveSign("light_float"); //$NON-NLS-1$
-                break;
-            case LAT_PERCH:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "perch")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            default:
-            }
-            switch (getStyleIndex()) {
-            case LAT_CAN:
-            case LAT_PILLAR:
-            case LAT_SPAR:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_PERCH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_BEACON:
-            case LAT_TOWER:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_FLOAT:
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                }
-                break;
-            }
-            shape = "cylinder"; //$NON-NLS-1$
-            break;
-
-        case PREF_PORT_HAND:
-            switch (getStyleIndex()) {
-            case LAT_CAN:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "can")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_PILLAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_SPAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_BEACON:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                break;
-            case LAT_TOWER:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_FLOAT:
-                super.saveSign("light_float"); //$NON-NLS-1$
-                break;
-            default:
-            }
-            switch (getStyleIndex()) {
-            case LAT_CAN:
-            case LAT_PILLAR:
-            case LAT_SPAR:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:category", "preferred_channel_port")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_BEACON:
-            case LAT_TOWER:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:category", "preferred_channel_port")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_FLOAT:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                }
-                break;
-            }
-            shape = "cylinder"; //$NON-NLS-1$
-            break;
-
-        case STARBOARD_HAND:
-            switch (getStyleIndex()) {
-            case LAT_CONE:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "conical")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_PILLAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_SPAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_BEACON:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_TOWER:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_FLOAT:
-                super.saveSign("light_float"); //$NON-NLS-1$
-                break;
-            case LAT_PERCH:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "perch")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            default:
-            }
-            switch (getStyleIndex()) {
-            case LAT_CAN:
-            case LAT_PILLAR:
-            case LAT_SPAR:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_BEACON:
-            case LAT_TOWER:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_FLOAT:
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_PERCH:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            }
-            shape = "cone, point up"; //$NON-NLS-1$
-            break;
-
-        case PREF_STARBOARD_HAND:
-            switch (getStyleIndex()) {
-            case LAT_CONE:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "conical")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_PILLAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_SPAR:
-                super.saveSign("buoy_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_BEACON:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_TOWER:
-                super.saveSign("beacon_lateral"); //$NON-NLS-1$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-                break;
-            case LAT_FLOAT:
-                super.saveSign("light_float"); //$NON-NLS-1$
-                break;
-            default:
-            }
-            switch (getStyleIndex()) {
-            case LAT_CAN:
-            case LAT_PILLAR:
-            case LAT_SPAR:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:category", "preferred_channel_starboard")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:buoy_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:buoy_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_BEACON:
-            case LAT_TOWER:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:category", "preferred_channel_starboard")); //$NON-NLS-1$ //$NON-NLS-2$
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:beacon_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:beacon_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                }
-                break;
-            case LAT_FLOAT:
-                Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                        "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-                if (getRegion() == IALA_A) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "green"; //$NON-NLS-1$
-                } else {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                            "seamark:light_float:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
-                    colour = "red"; //$NON-NLS-1$
-                }
-                break;
-            }
-            shape = "cone, point up"; //$NON-NLS-1$
-            break;
-
-        default:
-        }
-        saveTopMarkData(shape, colour);
-        saveLightData();
-        saveRadarFogData();
-
-        Main.pref.put("tomsplugin.IALA", getRegion() ? "B" : "A"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-    }
+			String image = "/images/Lateral"; //$NON-NLS-1$
+
+			switch (getBuoyIndex()) {
+			case PORT_HAND:
+				if (region == IALA_A)
+					switch (style) {
+					case LAT_CAN:
+						image += "_Can_Red"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Red"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Red"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Red"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Red"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Red"; //$NON-NLS-1$
+						break;
+					case LAT_PERCH:
+						image += "_Perch_Port"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				else
+					switch (style) {
+					case LAT_CAN:
+						image += "_Can_Green"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Green"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Green"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Green"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Green"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Green"; //$NON-NLS-1$
+						break;
+					case LAT_PERCH:
+						image += "_Perch_Port"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				break;
+
+			case STARBOARD_HAND:
+				if (region == IALA_A)
+					switch (style) {
+					case LAT_CONE:
+						image += "_Cone_Green"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Green"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Green"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Green"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Green"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Green"; //$NON-NLS-1$
+						break;
+					case LAT_PERCH:
+						image += "_Perch_Starboard"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				else
+					switch (style) {
+					case LAT_CONE:
+						image += "_Cone_Red"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Red"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Red"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Red"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Red"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Red"; //$NON-NLS-1$
+						break;
+					case LAT_PERCH:
+						image += "_Perch_Starboard"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				break;
+
+			case PREF_PORT_HAND:
+				if (region == IALA_A)
+					switch (style) {
+					case LAT_CAN:
+						image += "_Can_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				else
+					switch (style) {
+					case LAT_CAN:
+						image += "_Can_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				break;
+
+			case PREF_STARBOARD_HAND:
+				if (region == IALA_A)
+					switch (style) {
+					case LAT_CONE:
+						image += "_Cone_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Green_Red_Green"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				else
+					switch (style) {
+					case LAT_CONE:
+						image += "_Cone_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_PILLAR:
+						image += "_Pillar_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_SPAR:
+						image += "_Spar_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_BEACON:
+						image += "_Beacon_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_TOWER:
+						image += "_Tower_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					case LAT_FLOAT:
+						image += "_Float_Red_Green_Red"; //$NON-NLS-1$
+						break;
+					default:
+					}
+				break;
+
+			default:
+			}
+
+			if (!image.equals("/images/Lateral")) { //$NON-NLS-1$
+
+				image += ".png"; //$NON-NLS-1$
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+
+				if (hasTopMark()) {
+					image = "";
+					switch (getBuoyIndex()) {
+					case PORT_HAND:
+					case PREF_PORT_HAND:
+						if (region == IALA_A)
+							switch (style) {
+							case LAT_CAN:
+								image = "/images/Top_Can_Red_Buoy_Small.png"; //$NON-NLS-1$
+								break;
+							case LAT_PILLAR:
+							case LAT_SPAR:
+								image = "/images/Top_Can_Red_Buoy.png"; //$NON-NLS-1$
+								break;
+							case LAT_BEACON:
+							case LAT_TOWER:
+								image = "/images/Top_Can_Red_Beacon.png"; //$NON-NLS-1$
+								break;
+							case LAT_FLOAT:
+								image = "/images/Top_Can_Red_Float.png"; //$NON-NLS-1$
+								break;
+							}
+						else
+							switch (style) {
+							case LAT_CAN:
+								image = "/images/Top_Can_Green_Buoy_Small.png"; //$NON-NLS-1$
+								break;
+							case LAT_PILLAR:
+							case LAT_SPAR:
+								image = "/images/Top_Can_Green_Buoy.png"; //$NON-NLS-1$
+								break;
+							case LAT_BEACON:
+							case LAT_TOWER:
+								image = "/images/Top_Can_Green_Beacon.png"; //$NON-NLS-1$
+								break;
+							case LAT_FLOAT:
+								image = "/images/Top_Can_Green_Float.png"; //$NON-NLS-1$
+								break;
+							}
+						break;
+
+					case STARBOARD_HAND:
+					case PREF_STARBOARD_HAND:
+						if (region == IALA_A)
+							switch (style) {
+							case LAT_CONE:
+								image = "/images/Top_Cone_Green_Buoy_Small.png"; //$NON-NLS-1$
+								break;
+							case LAT_PILLAR:
+							case LAT_SPAR:
+								image = "/images/Top_Cone_Green_Buoy.png"; //$NON-NLS-1$
+								break;
+							case LAT_BEACON:
+							case LAT_TOWER:
+								image = "/images/Top_Cone_Green_Beacon.png"; //$NON-NLS-1$
+								break;
+							case LAT_FLOAT:
+								image = "/images/Top_Cone_Green_Float.png"; //$NON-NLS-1$
+								break;
+							}
+						else
+							switch (style) {
+							case LAT_CONE:
+								image = "/images/Top_Cone_Red_Buoy_Small.png"; //$NON-NLS-1$
+								break;
+							case LAT_PILLAR:
+							case LAT_SPAR:
+								image = "/images/Top_Cone_Red_Buoy.png"; //$NON-NLS-1$
+								break;
+							case LAT_BEACON:
+							case LAT_TOWER:
+								image = "/images/Top_Cone_Red_Beacon.png"; //$NON-NLS-1$
+								break;
+							case LAT_FLOAT:
+								image = "/images/Top_Cone_Red_Float.png"; //$NON-NLS-1$
+								break;
+							}
+						break;
+					}
+					if (!image.isEmpty())
+						dlg.lM06Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+				}
+			} else
+				dlg.lM01Icon.setIcon(null);
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		int cat = getBuoyIndex();
+		String shape = ""; //$NON-NLS-1$
+		String colour = ""; //$NON-NLS-1$
+
+		switch (cat) {
+
+		case PORT_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "can")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float"); //$NON-NLS-1$
+				break;
+			case LAT_PERCH:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "perch")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_PERCH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_FLOAT:
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				}
+				break;
+			}
+			shape = "cylinder"; //$NON-NLS-1$
+			break;
+
+		case PREF_PORT_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "can")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float"); //$NON-NLS-1$
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "preferred_channel_port")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "preferred_channel_port")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				}
+				break;
+			}
+			shape = "cylinder"; //$NON-NLS-1$
+			break;
+
+		case STARBOARD_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CONE:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "conical")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float"); //$NON-NLS-1$
+				break;
+			case LAT_PERCH:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "perch")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_FLOAT:
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_PERCH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			}
+			shape = "cone, point up"; //$NON-NLS-1$
+			break;
+
+		case PREF_STARBOARD_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CONE:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "conical")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral"); //$NON-NLS-1$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+				break;
+			case LAT_FLOAT:
+				super.saveSign("light_float"); //$NON-NLS-1$
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "preferred_channel_starboard")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "preferred_channel_starboard")); //$NON-NLS-1$ //$NON-NLS-2$
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				}
+				break;
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+				if (getRegion() == IALA_A) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "green"; //$NON-NLS-1$
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:light_float:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$
+					colour = "red"; //$NON-NLS-1$
+				}
+				break;
+			}
+			shape = "cone, point up"; //$NON-NLS-1$
+			break;
+
+		default:
+		}
+		saveTopMarkData(shape, colour);
+		saveLightData();
+		saveRadarFogData();
+
+		Main.pref.put("tomsplugin.IALA", getRegion() ? "B" : "A"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+	}
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java	(revision 23269)
@@ -17,144 +17,144 @@
 
 public class BuoyNota extends Buoy {
-    public BuoyNota(SmpDialogAction dia, Node node) {
-        super(dia);
+	public BuoyNota(SmpDialogAction dia, Node node) {
+		super(dia);
 
-        Map<String, String> keys;
-        keys = node.getKeys();
-        setNode(node);
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
 
-        resetMask();
+		resetMask();
 
-        dlg.cbM01TypeOfMark.setSelectedIndex(LIGHT);
+		dlg.cbM01TypeOfMark.setSelectedIndex(LIGHT);
 
-        dlg.cbM01CatOfMark.setEnabled(true);
-        dlg.cbM01CatOfMark.setVisible(true);
-        dlg.lM01CatOfMark.setVisible(true);
+		dlg.cbM01CatOfMark.setEnabled(true);
+		dlg.cbM01CatOfMark.setVisible(true);
+		dlg.lM01CatOfMark.setVisible(true);
 
-        dlg.cbM01CatOfMark.removeAllItems();
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.206")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.207")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.208")); //$NON-NLS-1$
-        dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.209")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.removeAllItems();
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.206")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.207")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.208")); //$NON-NLS-1$
+		dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.209")); //$NON-NLS-1$
 
-        setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$
+		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("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:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:name")); //$NON-NLS-1$
 
-        if (keys.containsKey("seamark:landmark:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:landmark:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:light_major:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:light_major:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:light_minor:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:light_minor:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:light_vessel:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:light_vessel:name")); //$NON-NLS-1$
+		if (keys.containsKey("seamark:landmark:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:landmark:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:light_major:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:light_major:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:light_minor:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:light_minor:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:light_vessel:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:light_vessel:name")); //$NON-NLS-1$
 
-        if (keys.containsKey("seamark:type")) { //$NON-NLS-1$
-            String type = keys.get("seamark:type"); //$NON-NLS-1$
-            if (type.equals("landmark"))
-                setBuoyIndex(LIGHT_HOUSE);
-            else if (type.equals("light_major"))
-                setBuoyIndex(LIGHT_MAJOR);
-            else if (type.equals("light_minor"))
-                setBuoyIndex(LIGHT_MINOR);
-            else if (type.equals("light_vessel"))
-                setBuoyIndex(LIGHT_VESSEL);
-        }
+		if (keys.containsKey("seamark:type")) { //$NON-NLS-1$
+			String type = keys.get("seamark:type"); //$NON-NLS-1$
+			if (type.equals("landmark"))
+				setBuoyIndex(LIGHT_HOUSE);
+			else if (type.equals("light_major"))
+				setBuoyIndex(LIGHT_MAJOR);
+			else if (type.equals("light_minor"))
+				setBuoyIndex(LIGHT_MINOR);
+			else if (type.equals("light_vessel"))
+				setBuoyIndex(LIGHT_VESSEL);
+		}
 
-        refreshLights();
-        parseLights(keys);
-        parseFogRadar(keys);
-        setTopMark(false);
-        setFired(true);
+		refreshLights();
+		parseLights(keys);
+		parseFogRadar(keys);
+		setTopMark(false);
+		setFired(true);
 
-        dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
-        dlg.tfM01Name.setText(getName());
-        dlg.cM01Fired.setEnabled(false);
-        dlg.cM01Fired.setSelected(true);
-    }
+		dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(false);
+		dlg.cM01Fired.setSelected(true);
+	}
 
-    public boolean isValid() {
-        return (getBuoyIndex() > 0);
-    }
+	public boolean isValid() {
+		return (getBuoyIndex() > 0);
+	}
 
-    public void paintSign() {
-        if (dlg.paintlock)
-            return;
-        super.paintSign();
+	public void paintSign() {
+		if (dlg.paintlock)
+			return;
+		super.paintSign();
 
-        dlg.sM01StatusBar.setText(getErrMsg());
+		dlg.sM01StatusBar.setText(getErrMsg());
 
-        if (isValid()) {
-            dlg.cM01Radar.setVisible(true);
-            dlg.cM01Racon.setVisible(true);
-            dlg.cM01Fog.setVisible(true);
+		if (isValid()) {
+			dlg.cM01Radar.setVisible(true);
+			dlg.cM01Racon.setVisible(true);
+			dlg.cM01Fog.setVisible(true);
 
-            dlg.rbM01Fired1.setVisible(true);
-            dlg.rbM01FiredN.setVisible(true);
-            dlg.lM01Height.setVisible(true);
-            dlg.tfM01Height.setVisible(true);
-            dlg.lM01Range.setVisible(true);
-            dlg.tfM01Range.setVisible(true);
+			dlg.rbM01Fired1.setVisible(true);
+			dlg.rbM01FiredN.setVisible(true);
+			dlg.lM01Height.setVisible(true);
+			dlg.tfM01Height.setVisible(true);
+			dlg.lM01Range.setVisible(true);
+			dlg.tfM01Range.setVisible(true);
 
-            switch (getBuoyIndex()) {
-            case SeaMark.LIGHT_HOUSE:
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Light_House.png"))); //$NON-NLS-1$
-                break;
+			switch (getBuoyIndex()) {
+			case SeaMark.LIGHT_HOUSE:
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Light_House.png"))); //$NON-NLS-1$
+				break;
 
-            case SeaMark.LIGHT_MAJOR:
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Light_Major.png"))); //$NON-NLS-1$
-                break;
+			case SeaMark.LIGHT_MAJOR:
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Light_Major.png"))); //$NON-NLS-1$
+				break;
 
-            case SeaMark.LIGHT_MINOR:
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Light_Minor.png"))); //$NON-NLS-1$
-                break;
+			case SeaMark.LIGHT_MINOR:
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Light_Minor.png"))); //$NON-NLS-1$
+				break;
 
-            case SeaMark.LIGHT_VESSEL:
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
-                        "/images/Major_Float.png"))); //$NON-NLS-1$
-                break;
+			case SeaMark.LIGHT_VESSEL:
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Major_Float.png"))); //$NON-NLS-1$
+				break;
 
-            default:
-            }
-        }
-    }
+			default:
+			}
+		}
+	}
 
-    public void saveSign() {
-        Node node = getNode();
+	public void saveSign() {
+		Node node = getNode();
 
-        if (node == null) {
-            return;
-        }
+		if (node == null) {
+			return;
+		}
 
-        switch (getBuoyIndex()) {
-        case LIGHT_HOUSE:
-            super.saveSign("landmark"); //$NON-NLS-1$
-            break;
-        case LIGHT_MAJOR:
-            super.saveSign("light_major"); //$NON-NLS-1$
-            break;
-        case LIGHT_MINOR:
-            super.saveSign("light_minor"); //$NON-NLS-1$
-            break;
-        case LIGHT_VESSEL:
-            super.saveSign("light_vessel"); //$NON-NLS-1$
-            break;
-        default:
-        }
-        saveLightData(); //$NON-NLS-1$
-        saveRadarFogData();
-    }
+		switch (getBuoyIndex()) {
+		case LIGHT_HOUSE:
+			super.saveSign("landmark"); //$NON-NLS-1$
+			break;
+		case LIGHT_MAJOR:
+			super.saveSign("light_major"); //$NON-NLS-1$
+			break;
+		case LIGHT_MINOR:
+			super.saveSign("light_minor"); //$NON-NLS-1$
+			break;
+		case LIGHT_VESSEL:
+			super.saveSign("light_vessel"); //$NON-NLS-1$
+			break;
+		default:
+		}
+		saveLightData(); //$NON-NLS-1$
+		saveRadarFogData();
+	}
 
-    public void setLightColour() {
-    }
+	public void setLightColour() {
+	}
 
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 23269)
@@ -17,91 +17,91 @@
 
 public class BuoySaw extends Buoy {
-    public BuoySaw(SmpDialogAction dia, Node node) {
-        super(dia);
-
-        String str;
-        Map<String, String> keys;
-        keys = node.getKeys();
-        setNode(node);
-
-        resetMask();
-
-        dlg.cbM01TypeOfMark.setSelectedIndex(SAFE_WATER);
-
-        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.08")); //$NON-NLS-1$
-        dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$
-        dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$
-        dlg.cbM01StyleOfMark.setVisible(true);
-        dlg.lM01StyleOfMark.setVisible(true);
-
-        setBuoyIndex(SAFE_WATER);
-        setColour(SeaMark.RED_WHITE);
-        setLightColour("W"); //$NON-NLS-1$
-        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_safe_water:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:buoy_safe_water:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:beacon_safe_water:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:beacon_safe_water: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$
-
-        if (keys.containsKey("seamark:buoy_safe_water:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:buoy_safe_water:shape"); //$NON-NLS-1$
-
-            if (str.equals("pillar")) //$NON-NLS-1$
-                setStyleIndex(SAFE_PILLAR);
-            else if (str.equals("spar")) //$NON-NLS-1$
-                setStyleIndex(SAFE_SPAR);
-            else if (str.equals("sphere")) //$NON-NLS-1$
-                setStyleIndex(SAFE_SPHERE);
-        } else if ((keys.containsKey("seamark:type")) //$NON-NLS-1$
-                && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$
-            setStyleIndex(SAFE_FLOAT);
-        } else if ((keys.containsKey("seamark:type")) //$NON-NLS-1$
-                && (keys.get("seamark:type").equals("beacon_safe_water"))) { //$NON-NLS-1$ //$NON-NLS-2$
-            setStyleIndex(SAFE_BEACON);
-        }
-
-        if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
-            setStyleIndex(0);
-
-        if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$
-                || keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$
-            setTopMark(true);
-        }
-
-        refreshLights();
-        parseLights(keys);
-        parseFogRadar(keys);
-
-        dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-        dlg.tfM01Name.setText(getName());
-        dlg.cM01TopMark.setSelected(hasTopMark());
-    }
-
-    public void refreshLights() {
-        dlg.cbM01Kennung.removeAllItems();
-        dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Iso"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("LFl"); //$NON-NLS-1$
-        dlg.cbM01Kennung.addItem("Mo"); //$NON-NLS-1$
-        dlg.cbM01Kennung.setSelectedIndex(0);
-    }
-
-    public boolean isValid() {
-        return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
-    }
+	public BuoySaw(SmpDialogAction dia, Node node) {
+		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
+
+		resetMask();
+
+		dlg.cbM01TypeOfMark.setSelectedIndex(SAFE_WATER);
+
+		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.08")); //$NON-NLS-1$
+		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$
+		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$
+		dlg.cbM01StyleOfMark.setVisible(true);
+		dlg.lM01StyleOfMark.setVisible(true);
+
+		setBuoyIndex(SAFE_WATER);
+		setColour(SeaMark.RED_WHITE);
+		setLightColour("W"); //$NON-NLS-1$
+		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_safe_water:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:buoy_safe_water:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:beacon_safe_water:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:beacon_safe_water: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$
+
+		if (keys.containsKey("seamark:buoy_safe_water:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:buoy_safe_water:shape"); //$NON-NLS-1$
+
+			if (str.equals("pillar")) //$NON-NLS-1$
+				setStyleIndex(SAFE_PILLAR);
+			else if (str.equals("spar")) //$NON-NLS-1$
+				setStyleIndex(SAFE_SPAR);
+			else if (str.equals("sphere")) //$NON-NLS-1$
+				setStyleIndex(SAFE_SPHERE);
+		} else if ((keys.containsKey("seamark:type")) //$NON-NLS-1$
+				&& (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$
+			setStyleIndex(SAFE_FLOAT);
+		} else if ((keys.containsKey("seamark:type")) //$NON-NLS-1$
+				&& (keys.get("seamark:type").equals("beacon_safe_water"))) { //$NON-NLS-1$ //$NON-NLS-2$
+			setStyleIndex(SAFE_BEACON);
+		}
+
+		if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
+			setStyleIndex(0);
+
+		if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$
+				|| keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$
+			setTopMark(true);
+		}
+
+		refreshLights();
+		parseLights(keys);
+		parseFogRadar(keys);
+
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
+	}
+
+	public void refreshLights() {
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Iso"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("LFl"); //$NON-NLS-1$
+		dlg.cbM01Kennung.addItem("Mo"); //$NON-NLS-1$
+		dlg.cbM01Kennung.setSelectedIndex(0);
+	}
+
+	public boolean isValid() {
+		return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
+	}
 
 	public void setLightColour() {
@@ -114,5 +114,5 @@
 		super.paintSign();
 
-        dlg.sM01StatusBar.setText(getErrMsg());
+		dlg.sM01StatusBar.setText(getErrMsg());
 
 		if (isValid()) {
@@ -151,111 +151,111 @@
 			}
 
-            String image = "/images/Safe_Water"; //$NON-NLS-1$
-
-            switch (getStyleIndex()) {
-            case SAFE_PILLAR:
-                image += "_Pillar"; //$NON-NLS-1$
-                break;
-            case SAFE_SPAR:
-                image += "_Spar"; //$NON-NLS-1$
-                break;
-            case SAFE_SPHERE:
-                image += "_Sphere"; //$NON-NLS-1$
-                break;
-            case SAFE_BEACON:
-                image += "_Beacon"; //$NON-NLS-1$
-                break;
-            case SAFE_FLOAT:
-                image += "_Float"; //$NON-NLS-1$
-                break;
-            default:
-            }
-
-            if (!image.equals("/images/Safe_Water")) { //$NON-NLS-1$
-                image += ".png"; //$NON-NLS-1$
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-                if (hasTopMark()) {
-                    image = "";
-                    switch (getStyleIndex()) {
-                    case SAFE_PILLAR:
-                    case SAFE_SPAR:
-                        image = "/images/Top_Sphere_Red_Buoy.png"; //$NON-NLS-1$
-                        break;
-                    case SAFE_SPHERE:
-                        image = "/images/Top_Sphere_Red_Buoy_Small.png"; //$NON-NLS-1$
-                        break;
-                    case SAFE_BEACON:
-                        image = "/images/Top_Sphere_Red_Beacon.png"; //$NON-NLS-1$
-                        break;
-                    case SAFE_FLOAT:
-                        image = "/images/Top_Sphere_Red_Float.png"; //$NON-NLS-1$
-                        break;
-                    }
-                    if (!image.isEmpty())
-                        dlg.lM06Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-                }
-            } else
-                dlg.lM01Icon.setIcon(null);
-        }
-    }
-
-    public void saveSign() {
-        Node node = getNode();
-
-        if (node == null) {
-            return;
-        }
-
-        switch (getStyleIndex()) {
-        case SAFE_PILLAR:
-            super.saveSign("buoy_safe_water"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_safe_water:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SAFE_SPAR:
-            super.saveSign("buoy_safe_water"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_safe_water:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SAFE_SPHERE:
-            super.saveSign("buoy_safe_water"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_safe_water:shape", "sphere")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SAFE_BEACON:
-            super.saveSign("beacon_safe_water"); //$NON-NLS-1$
-            break;
-        case SAFE_FLOAT:
-            super.saveSign("light_float"); //$NON-NLS-1$
-            break;
-        default:
-        }
-
-        switch (getStyleIndex()) {
-        case SAFE_PILLAR:
-        case SAFE_SPAR:
-        case SAFE_SPHERE:
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_safe_water:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_safe_water:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SAFE_BEACON:
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_safe_water:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_safe_water:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SAFE_FLOAT:
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:light_float:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:light_float:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        default:
-        }
-        saveTopMarkData("sphere", "red"); //$NON-NLS-1$ //$NON-NLS-2$
-        saveLightData(); //$NON-NLS-1$
-        saveRadarFogData();
-    }
+			String image = "/images/Safe_Water"; //$NON-NLS-1$
+
+			switch (getStyleIndex()) {
+			case SAFE_PILLAR:
+				image += "_Pillar"; //$NON-NLS-1$
+				break;
+			case SAFE_SPAR:
+				image += "_Spar"; //$NON-NLS-1$
+				break;
+			case SAFE_SPHERE:
+				image += "_Sphere"; //$NON-NLS-1$
+				break;
+			case SAFE_BEACON:
+				image += "_Beacon"; //$NON-NLS-1$
+				break;
+			case SAFE_FLOAT:
+				image += "_Float"; //$NON-NLS-1$
+				break;
+			default:
+			}
+
+			if (!image.equals("/images/Safe_Water")) { //$NON-NLS-1$
+				image += ".png"; //$NON-NLS-1$
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+				if (hasTopMark()) {
+					image = "";
+					switch (getStyleIndex()) {
+					case SAFE_PILLAR:
+					case SAFE_SPAR:
+						image = "/images/Top_Sphere_Red_Buoy.png"; //$NON-NLS-1$
+						break;
+					case SAFE_SPHERE:
+						image = "/images/Top_Sphere_Red_Buoy_Small.png"; //$NON-NLS-1$
+						break;
+					case SAFE_BEACON:
+						image = "/images/Top_Sphere_Red_Beacon.png"; //$NON-NLS-1$
+						break;
+					case SAFE_FLOAT:
+						image = "/images/Top_Sphere_Red_Float.png"; //$NON-NLS-1$
+						break;
+					}
+					if (!image.isEmpty())
+						dlg.lM06Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+				}
+			} else
+				dlg.lM01Icon.setIcon(null);
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+			super.saveSign("buoy_safe_water"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SAFE_SPAR:
+			super.saveSign("buoy_safe_water"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SAFE_SPHERE:
+			super.saveSign("buoy_safe_water"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:shape", "sphere")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SAFE_BEACON:
+			super.saveSign("beacon_safe_water"); //$NON-NLS-1$
+			break;
+		case SAFE_FLOAT:
+			super.saveSign("light_float"); //$NON-NLS-1$
+			break;
+		default:
+		}
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+		case SAFE_SPAR:
+		case SAFE_SPHERE:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safe_water:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SAFE_BEACON:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_safe_water:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_safe_water:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SAFE_FLOAT:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		default:
+		}
+		saveTopMarkData("sphere", "red"); //$NON-NLS-1$ //$NON-NLS-2$
+		saveLightData(); //$NON-NLS-1$
+		saveRadarFogData();
+	}
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 23269)
@@ -17,121 +17,121 @@
 
 public class BuoySpec extends Buoy {
-    public BuoySpec(SmpDialogAction dia, Node node) {
-        super(dia);
-
-        String str;
-        Map<String, String> keys;
-        keys = node.getKeys();
-        setNode(node);
-
-        resetMask();
-
-        dlg.cbM01TypeOfMark.setSelectedIndex(SPECIAL_PURPOSE);
-
-        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.02")); //$NON-NLS-1$
-        dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$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.addItem(Messages.getString("Buoy.08")); //$NON-NLS-1$
-        dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.09")); //$NON-NLS-1$
-        dlg.cbM01StyleOfMark.setVisible(true);
-        dlg.lM01StyleOfMark.setVisible(true);
-
-        dlg.cbM01TopMark.removeAllItems();
-        dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.212"));
-        dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.210")); //$NON-NLS-1$
-        dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.211")); //$NON-NLS-1$
-
-        dlg.cM01TopMark.setEnabled(true);
-
-        setBuoyIndex(SPECIAL_PURPOSE);
-        setColour(SeaMark.YELLOW);
-        setLightColour("W"); //$NON-NLS-1$
-        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_special_purpose:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:buoy_special_purpose:name")); //$NON-NLS-1$
-        else if (keys.containsKey("seamark:beacon_special_purpose:name")) //$NON-NLS-1$
-            setName(keys.get("seamark:beacon_special_purpose: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$
-
-        if (keys.containsKey("seamark:buoy_special_purpose:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:buoy_special_purpose:shape"); //$NON-NLS-1$
-
-            if (str.equals("pillar")) //$NON-NLS-1$
-                setStyleIndex(SPEC_PILLAR);
-            else if (str.equals("can")) //$NON-NLS-1$
-                setStyleIndex(SPEC_CAN);
-            else if (str.equals("conical")) //$NON-NLS-1$
-                setStyleIndex(SPEC_CONE);
-            else if (str.equals("spar")) //$NON-NLS-1$
-                setStyleIndex(SPEC_SPAR);
-            else if (str.equals("sphere")) //$NON-NLS-1$
-                setStyleIndex(SPEC_SPHERE);
-            else if (str.equals("barrel")) //$NON-NLS-1$
-                setStyleIndex(SPEC_BARREL);
-        }
-
-        if (keys.containsKey("seamark:beacon_special_purpose:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:beacon_special_purpose:shape"); //$NON-NLS-1$
-            if (str.equals("tower")) //$NON-NLS-1$
-                setStyleIndex(SPEC_TOWER);
-            else
-                setStyleIndex(SPEC_BEACON);
-        }
-
-        if (keys.containsKey("seamark:light_float:colour")) {
-            setStyleIndex(SPEC_FLOAT);
-        }
-
-        if ((keys.containsKey("seamark:type") && keys.get("seamark:type").equals( //$NON-NLS-1$ //$NON-NLS-2$
-                "beacon_special_purpose")) //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_special_purpose:colour") //$NON-NLS-1$
-                || keys.containsKey("seamark:beacon_special_purpose:shape")) { //$NON-NLS-1$
-            if (keys.containsKey("seamark:beacon_special_purpose:shape") //$NON-NLS-1$
-                    && keys.get("seamark:beacon_special_purpose:shape").equals("tower")) //$NON-NLS-1$ //$NON-NLS-2$
-                setStyleIndex(SPEC_TOWER);
-            else
-                setStyleIndex(SPEC_BEACON);
-        } else if (keys.containsKey("seamark:light_float:colour") //$NON-NLS-1$
-                && keys.get("seamark:light_float:colour").equals("yellow")) //$NON-NLS-1$ //$NON-NLS-2$
-            setStyleIndex(SPEC_FLOAT);
-
-        if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
-            setStyleIndex(0);
-
-        keys = node.getKeys();
-        if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$
-            str = keys.get("seamark:topmark:shape"); //$NON-NLS-1$
-
-            if (str.equals("x-shape")) { //$NON-NLS-1$
-                setTopMark(true);
-            }
-        }
-
-        refreshLights();
-        parseLights(keys);
-        parseFogRadar(keys);
-
-        dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
-        dlg.tfM01Name.setText(getName());
-        dlg.cM01TopMark.setSelected(hasTopMark());
-    }
+	public BuoySpec(SmpDialogAction dia, Node node) {
+		super(dia);
+
+		String str;
+		Map<String, String> keys;
+		keys = node.getKeys();
+		setNode(node);
+
+		resetMask();
+
+		dlg.cbM01TypeOfMark.setSelectedIndex(SPECIAL_PURPOSE);
+
+		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.02")); //$NON-NLS-1$
+		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$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.addItem(Messages.getString("Buoy.08")); //$NON-NLS-1$
+		dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.09")); //$NON-NLS-1$
+		dlg.cbM01StyleOfMark.setVisible(true);
+		dlg.lM01StyleOfMark.setVisible(true);
+
+		dlg.cbM01TopMark.removeAllItems();
+		dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.212"));
+		dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.210")); //$NON-NLS-1$
+		dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.211")); //$NON-NLS-1$
+
+		dlg.cM01TopMark.setEnabled(true);
+
+		setBuoyIndex(SPECIAL_PURPOSE);
+		setColour(SeaMark.YELLOW);
+		setLightColour("W"); //$NON-NLS-1$
+		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_special_purpose:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:buoy_special_purpose:name")); //$NON-NLS-1$
+		else if (keys.containsKey("seamark:beacon_special_purpose:name")) //$NON-NLS-1$
+			setName(keys.get("seamark:beacon_special_purpose: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$
+
+		if (keys.containsKey("seamark:buoy_special_purpose:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:buoy_special_purpose:shape"); //$NON-NLS-1$
+
+			if (str.equals("pillar")) //$NON-NLS-1$
+				setStyleIndex(SPEC_PILLAR);
+			else if (str.equals("can")) //$NON-NLS-1$
+				setStyleIndex(SPEC_CAN);
+			else if (str.equals("conical")) //$NON-NLS-1$
+				setStyleIndex(SPEC_CONE);
+			else if (str.equals("spar")) //$NON-NLS-1$
+				setStyleIndex(SPEC_SPAR);
+			else if (str.equals("sphere")) //$NON-NLS-1$
+				setStyleIndex(SPEC_SPHERE);
+			else if (str.equals("barrel")) //$NON-NLS-1$
+				setStyleIndex(SPEC_BARREL);
+		}
+
+		if (keys.containsKey("seamark:beacon_special_purpose:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:beacon_special_purpose:shape"); //$NON-NLS-1$
+			if (str.equals("tower")) //$NON-NLS-1$
+				setStyleIndex(SPEC_TOWER);
+			else
+				setStyleIndex(SPEC_BEACON);
+		}
+
+		if (keys.containsKey("seamark:light_float:colour")) {
+			setStyleIndex(SPEC_FLOAT);
+		}
+
+		if ((keys.containsKey("seamark:type") && keys.get("seamark:type").equals( //$NON-NLS-1$ //$NON-NLS-2$
+				"beacon_special_purpose")) //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_special_purpose:colour") //$NON-NLS-1$
+				|| keys.containsKey("seamark:beacon_special_purpose:shape")) { //$NON-NLS-1$
+			if (keys.containsKey("seamark:beacon_special_purpose:shape") //$NON-NLS-1$
+					&& keys.get("seamark:beacon_special_purpose:shape").equals("tower")) //$NON-NLS-1$ //$NON-NLS-2$
+				setStyleIndex(SPEC_TOWER);
+			else
+				setStyleIndex(SPEC_BEACON);
+		} else if (keys.containsKey("seamark:light_float:colour") //$NON-NLS-1$
+				&& keys.get("seamark:light_float:colour").equals("yellow")) //$NON-NLS-1$ //$NON-NLS-2$
+			setStyleIndex(SPEC_FLOAT);
+
+		if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount())
+			setStyleIndex(0);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$
+			str = keys.get("seamark:topmark:shape"); //$NON-NLS-1$
+
+			if (str.equals("x-shape")) { //$NON-NLS-1$
+				setTopMark(true);
+			}
+		}
+
+		refreshLights();
+		parseLights(keys);
+		parseFogRadar(keys);
+
+		dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex());
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01TopMark.setSelected(hasTopMark());
+	}
 
 	public void refreshLights() {
 		super.refreshLights();
-		
+
 		switch (getStyleIndex()) {
 		case SPEC_BARREL:
@@ -146,7 +146,7 @@
 	}
 
-    public boolean isValid() {
-        return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
-    }
+	public boolean isValid() {
+		return (getBuoyIndex() > 0) && (getStyleIndex() > 0);
+	}
 
 	public void setLightColour() {
@@ -159,5 +159,5 @@
 		super.paintSign();
 
-        dlg.sM01StatusBar.setText(getErrMsg());
+		dlg.sM01StatusBar.setText(getErrMsg());
 
 		if (isValid()) {
@@ -202,127 +202,127 @@
 			}
 
-            String image = "/images/Special_Purpose"; //$NON-NLS-1$
-
-            switch (getStyleIndex()) {
-            case SPEC_PILLAR:
-                image += "_Pillar"; //$NON-NLS-1$
-                break;
-            case SPEC_CAN:
-                image += "_Can"; //$NON-NLS-1$
-                break;
-            case SPEC_CONE:
-                image += "_Cone"; //$NON-NLS-1$
-                break;
-            case SPEC_SPAR:
-                image += "_Spar"; //$NON-NLS-1$
-                break;
-            case SPEC_SPHERE:
-                image += "_Sphere"; //$NON-NLS-1$
-                break;
-            case SPEC_BARREL:
-                image += "_Barrel"; //$NON-NLS-1$
-                break;
-            case SPEC_FLOAT:
-                image += "_Float"; //$NON-NLS-1$
-                break;
-            case SPEC_BEACON:
-                image += "_Beacon"; //$NON-NLS-1$
-                break;
-            case SPEC_TOWER:
-                image += "_Tower"; //$NON-NLS-1$
-                break;
-            default:
-            }
-
-            if (!image.equals("/images/Special_Purpose")) { //$NON-NLS-1$
-                image += ".png"; //$NON-NLS-1$
-                dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-                if (hasTopMark()) {
-                    image = "";
-                    switch (getStyleIndex()) {
-                    case SPEC_PILLAR:
-                    case SPEC_SPAR:
-                        image = "/images/Top_X_Yellow_Buoy.png"; //$NON-NLS-1$
-                        break;
-                    case SPEC_CAN:
-                    case SPEC_CONE:
-                    case SPEC_SPHERE:
-                    case SPEC_BARREL:
-                        image = "/images/Top_X_Yellow_Buoy_Small.png"; //$NON-NLS-1$
-                        break;
-                    case SPEC_BEACON:
-                    case SPEC_TOWER:
-                        image = "/images/Top_X_Yellow_Beacon.png"; //$NON-NLS-1$
-                        break;
-                    case SPEC_FLOAT:
-                        image = "/images/Top_X_Yellow_Float.png"; //$NON-NLS-1$
-                        break;
-                    }
-                    if (!image.isEmpty())
-                        dlg.lM06Icon.setIcon(new ImageIcon(getClass().getResource(image)));
-                }
-            } else
-                dlg.lM01Icon.setIcon(null);
-        }
-    }
-
-    public void saveSign() {
-        Node node = getNode();
-
-        if (node == null) {
-            return;
-        }
-
-        switch (getStyleIndex()) {
-        case SPEC_PILLAR:
-            super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SPEC_SPAR:
-            super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SPEC_SPHERE:
-            super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:shape", "sphere")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SPEC_BARREL:
-            super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:shape", "barrel")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SPEC_FLOAT:
-            super.saveSign("light_float"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:light_float:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SPEC_BEACON:
-            super.saveSign("beacon_special_purpose"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        case SPEC_TOWER:
-            super.saveSign("beacon_special_purpose"); //$NON-NLS-1$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_special_purpose:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
-            Main.main.undoRedo.add(new ChangePropertyCommand(node,
-                    "seamark:beacon_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
-            break;
-        default:
-        }
-        saveTopMarkData("x-shape", "yellow"); //$NON-NLS-1$ //$NON-NLS-2$
-        saveLightData(); //$NON-NLS-1$
-        saveRadarFogData();
-    }
+			String image = "/images/Special_Purpose"; //$NON-NLS-1$
+
+			switch (getStyleIndex()) {
+			case SPEC_PILLAR:
+				image += "_Pillar"; //$NON-NLS-1$
+				break;
+			case SPEC_CAN:
+				image += "_Can"; //$NON-NLS-1$
+				break;
+			case SPEC_CONE:
+				image += "_Cone"; //$NON-NLS-1$
+				break;
+			case SPEC_SPAR:
+				image += "_Spar"; //$NON-NLS-1$
+				break;
+			case SPEC_SPHERE:
+				image += "_Sphere"; //$NON-NLS-1$
+				break;
+			case SPEC_BARREL:
+				image += "_Barrel"; //$NON-NLS-1$
+				break;
+			case SPEC_FLOAT:
+				image += "_Float"; //$NON-NLS-1$
+				break;
+			case SPEC_BEACON:
+				image += "_Beacon"; //$NON-NLS-1$
+				break;
+			case SPEC_TOWER:
+				image += "_Tower"; //$NON-NLS-1$
+				break;
+			default:
+			}
+
+			if (!image.equals("/images/Special_Purpose")) { //$NON-NLS-1$
+				image += ".png"; //$NON-NLS-1$
+				dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+				if (hasTopMark()) {
+					image = "";
+					switch (getStyleIndex()) {
+					case SPEC_PILLAR:
+					case SPEC_SPAR:
+						image = "/images/Top_X_Yellow_Buoy.png"; //$NON-NLS-1$
+						break;
+					case SPEC_CAN:
+					case SPEC_CONE:
+					case SPEC_SPHERE:
+					case SPEC_BARREL:
+						image = "/images/Top_X_Yellow_Buoy_Small.png"; //$NON-NLS-1$
+						break;
+					case SPEC_BEACON:
+					case SPEC_TOWER:
+						image = "/images/Top_X_Yellow_Beacon.png"; //$NON-NLS-1$
+						break;
+					case SPEC_FLOAT:
+						image = "/images/Top_X_Yellow_Float.png"; //$NON-NLS-1$
+						break;
+					}
+					if (!image.isEmpty())
+						dlg.lM06Icon.setIcon(new ImageIcon(getClass().getResource(image)));
+				}
+			} else
+				dlg.lM01Icon.setIcon(null);
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case SPEC_PILLAR:
+			super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SPEC_SPAR:
+			super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SPEC_SPHERE:
+			super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "sphere")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SPEC_BARREL:
+			super.saveSign("buoy_special_purpose"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "barrel")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SPEC_FLOAT:
+			super.saveSign("light_float"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:light_float:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SPEC_BEACON:
+			super.saveSign("beacon_special_purpose"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		case SPEC_TOWER:
+			super.saveSign("beacon_special_purpose"); //$NON-NLS-1$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_special_purpose:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$
+			break;
+		default:
+		}
+		saveTopMarkData("x-shape", "yellow"); //$NON-NLS-1$ //$NON-NLS-2$
+		saveLightData(); //$NON-NLS-1$
+		saveRadarFogData();
+	}
 }
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 23268)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 23269)
@@ -18,20 +18,20 @@
 	}
 
-    public void paintSign() {
-        if (dlg.paintlock)
-            return;
-        super.paintSign();
+	public void paintSign() {
+		if (dlg.paintlock)
+			return;
+		super.paintSign();
 
-        if (getErrMsg() != null)
-            dlg.sM01StatusBar.setText(getErrMsg());
+		if (getErrMsg() != null)
+			dlg.sM01StatusBar.setText(getErrMsg());
 
-        setErrMsg(null);
-    }
+		setErrMsg(null);
+	}
 
-    public void setLightColour() {
-        super.setLightColour("");
-    }
+	public void setLightColour() {
+		super.setLightColour("");
+	}
 
-    public void saveSign() {
-    }
+	public void saveSign() {
+	}
 }
