Index: /applications/editors/josm/plugins/toms/.classpath
===================================================================
--- /applications/editors/josm/plugins/toms/.classpath	(revision 22527)
+++ /applications/editors/josm/plugins/toms/.classpath	(revision 22527)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="lib" path="D:/Programme/osm/josm-tested.jar"/>
+	<classpathentry kind="lib" path="D:/Dokumente und Einstellungen/Werner/Eigene Dateien/apache-log4j-1.2.15/log4j-1.2.15.jar"/>
+	<classpathentry kind="output" path="build"/>
+</classpath>
Index: /applications/editors/josm/plugins/toms/.project
===================================================================
--- /applications/editors/josm/plugins/toms/.project	(revision 22527)
+++ /applications/editors/josm/plugins/toms/.project	(revision 22527)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Toms</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
+	</natures>
+</projectDescription>
Index: /applications/editors/josm/plugins/toms/LICENSE.txt
===================================================================
--- /applications/editors/josm/plugins/toms/LICENSE.txt	(revision 22527)
+++ /applications/editors/josm/plugins/toms/LICENSE.txt	(revision 22527)
@@ -0,0 +1,339 @@
+      GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+         END OF TERMS AND CONDITIONS
+
+      How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Index: /applications/editors/josm/plugins/toms/build.xml
===================================================================
--- /applications/editors/josm/plugins/toms/build.xml	(revision 22527)
+++ /applications/editors/josm/plugins/toms/build.xml	(revision 22527)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="toms" default="dist" basedir=".">
+    <!--
+      ************************************************
+      ** should not be necessary to change the following properties
+     -->
+    <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
+    <property name="plugin.build.dir"       value="build"/>
+    <property name="plugin.src.dir"         value="src"/>
+    <!-- this is the directory where the plugin jar is copied to -->
+    <property name="plugin.dist.dir"        value="../../dist"/>
+    <property name="ant.build.javac.target" value="1.5"/>
+    <property name="plugin.dist.dir"        value="../../dist"/>
+    <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
+	<property name="plugpath"				value="../../../josm"/>
+	<property name="manifest"				value= "log4j-1.2.16.jar
+											        toms.jar"/>
+	
+    <!--
+    **********************************************************
+    ** init - initializes the build
+    **********************************************************
+    -->
+    <target name="init">
+        <mkdir dir="${plugin.build.dir}"/>
+    </target>
+
+    <!--
+    **********************************************************
+    ** compile - complies the source tree
+    **********************************************************
+    -->
+    <target name="compile" depends="init">
+    	<echo message="classpath = ${josm}"/>
+        <echo message="compiling sources for  ${plugin.jar} ... "/>
+        <javac srcdir="src" classpath="${josm}"	debug="true" destdir="${plugin.build.dir}">
+            <compilerarg value="-Xlint:deprecation"/>
+            <compilerarg value="-Xlint:unchecked"/>
+        </javac>
+    </target>
+
+    <!--
+    **********************************************************
+    ** dist - creates the plugin jar
+    **********************************************************
+    -->
+    <target name="dist" depends="compile">
+        <echo message="creating ${plugin.jar.name} ... "/>
+
+    	<copy todir="${plugin.build.dir}/images">
+    		<fileset dir="${plugin.src.dir}/images"/>
+    	</copy>
+    	
+    	<copy todir="${plugin.build.dir}/resources">
+            <fileset dir="resources"/>
+        </copy>
+        <copy todir="${plugin.build.dir}/images">
+            <fileset dir="images"/>
+        </copy>
+        <copy todir="${plugin.build.dir}">
+            <fileset dir=".">
+                <include name="README" />
+                <include name="LICENSE" />
+            </fileset>
+        </copy>
+        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
+    <!--
+        ************************************************
+        ** configure these properties. Most of them will be copied to the plugins
+        ** manifest file. Property values will also show up in the list available
+        ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
+        **
+        ************************************************
+    -->
+            <manifest>
+                <attribute name="Author" value="Werner"/>
+                <attribute name="Plugin-Class" value="toms.Toms"/>
+                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
+                <attribute name="Plugin-Description" value="Create and edit seamarks for OpenSeaMap"/>
+                <attribute name="Plugin-Link" value="http://openseamap.org/"/>
+                <attribute name="Plugin-Mainversion" value="1465"/>
+            	<attribute name="Plugin-Stage" value="100"/>
+                <!-- <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> -->
+            	<attribute name="Plugin-Version" value="010"/>
+            	<attribute name="Class-Path" value="${manifest}"/>
+            </manifest>
+        </jar>
+    </target>
+
+    <!--
+    **********************************************************
+    ** clean - clean up the build environment
+    **********************************************************
+    -->
+    <target name="clean">
+        <delete dir="${plugin.build.dir}"/>
+        <delete file="${plugin.jar}"/>
+    </target>
+
+    <!--
+    **********************************************************
+    ** install - install the plugin in your local JOSM installation
+    **********************************************************
+    -->
+    <target name="install" depends="dist">
+        <property environment="env"/>
+        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
+            <and>
+                <os family="windows"/>
+            </and>
+        </condition>
+        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
+    </target>
+</project>
Index: /applications/editors/josm/plugins/toms/copyright.txt
===================================================================
--- /applications/editors/josm/plugins/toms/copyright.txt	(revision 22527)
+++ /applications/editors/josm/plugins/toms/copyright.txt	(revision 22527)
@@ -0,0 +1,6 @@
+Plugin toms
+
+This plugin is copyrighted 2009-2010 
+by Werner König <werner.koenig@t-online.de>.
+
+It is distributed under GPL-v2 license (see file  LICENSE.txt in this directory).
Index: /applications/editors/josm/plugins/toms/src/toms/Toms.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/Toms.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/Toms.java	(revision 22527)
@@ -0,0 +1,58 @@
+// License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig
+
+package toms;
+
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
+import static org.openstreetmap.josm.tools.I18n.marktr;
+
+import java.awt.event.KeyEvent;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.swing.JMenuItem;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainMenu;
+import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.plugins.Plugin;
+import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.gui.MapFrame;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class Toms extends Plugin {
+
+	private JMenuItem Smp;
+	private SmpDialogAction SmpDialog;
+
+	public Toms(PluginInformation info) {
+		super(info);
+
+		String os = "";
+		String userHome = "";
+
+		SmpDialog = new SmpDialogAction();
+		Smp = Main.main.menu.toolsMenu.add(SmpDialog);
+		// Smp = MainMenu.add(Main.main.menu.toolsMenu, SmpDialog);
+
+		SmpDialog.setSmpItem(Smp);
+		SmpDialog.setOs(os);
+		SmpDialog.setUserHome(userHome);
+		Smp.setEnabled(false);
+
+	}
+
+	@Override
+	public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
+		if (oldFrame == null && newFrame != null) {
+			Smp.setEnabled(true);
+		} else {
+			Smp.setEnabled(false);
+			SmpDialog.CloseDialog();
+		}
+	}
+
+}
Index: /applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 22527)
@@ -0,0 +1,1320 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.dialogs;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.SystemColor;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.WindowEvent;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.SwingUtilities;
+import javax.swing.WindowConstants;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.command.Command;
+import org.openstreetmap.josm.data.SelectionChangedListener;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.tools.Shortcut;
+
+import toms.seamarks.SeaMark;
+import toms.seamarks.buoys.Buoy;
+import toms.seamarks.buoys.BuoyCard;
+import toms.seamarks.buoys.BuoyLat;
+import toms.seamarks.buoys.BuoySaw;
+import toms.seamarks.buoys.BuoyUkn;
+import toms.seamarks.buoys.BuoyIsol;
+import toms.seamarks.buoys.BuoySpec;
+import toms.seamarks.buoys.BuoyNota;
+
+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:
+	private String smb = ""; // value vom key "seamark" // @jve:decl-index=0:
+	private Collection<? extends OsmPrimitive> Selection = null; // @jve:decl-index=0:
+	private OsmPrimitive SelNode = null;
+	private String Os = ""; // @jve:decl-index=0:
+	private String UserHome = ""; // @jve:decl-index=0:
+
+	// SelectionChangedListner der in die Eventqueue von josm eingehängt wird
+	private SelectionChangedListener SmpListener = new SelectionChangedListener() {
+		public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
+			Node node;
+			Map<String, String> keys = null;
+			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;
+
+							keys = node.getKeys();
+							if (keys.containsKey("seamark")
+									|| keys.containsKey("seamark:type")) {
+								parseSeaMark();
+							}
+						}
+				}
+			}
+
+			Selection = null;
+
+		}
+	};
+
+	/**
+	 * lokale Variable der Maske
+	 */
+	private JDialog dM01SeaMap = null;
+	private JPanel pM01SeaMap = null;
+	private JLabel lM01Colour = null;
+	private JLabel lM01TimeUnit = null;
+	private JLabel lM01HeightUnit = null;
+	private JLabel lM01RangeUnit = null;
+	private JLabel lM01RepeatTime = null;
+	private JLabel lM01Kennung = null;
+	private JLabel lM01Height = null;
+	private JLabel lM01Range = null;
+	private JLabel lM01Name = null;
+	public JLabel lM01Icon03 = null;
+	public JLabel lM01Icon02 = null;
+	private JLabel lM01Props02 = null;
+	private JLabel lM01StyleOfMark = null;
+	private JLabel lM01TypeOfMark = null;
+	private JLabel lM01Region = null;
+	private JLabel lM01Head = null;
+	public JLabel lM01Icon01 = null;
+	public JComboBox cbM01Region = null;
+	public JComboBox cbM01TypeOfMark = null;
+	public JComboBox cbM01StyleOfMark = null;
+	public JButton bM01Save = null;
+	public JCheckBox cM01TopMark = null;
+	private JCheckBox cM01Radar = null;
+	public JCheckBox cM01Fired = null;
+	private JCheckBox cM01Fog = null;
+	public JTextField sM01StatusBar = null;
+	public JTextField tfM01Name = null;
+	private JButton bM01Close = null;
+	public JTextField tfM01RepeatTime = null;
+	public JTextField tfM01Range = null;
+	public JTextField tfM01Height = null;
+	public JComboBox cbM01Kennung = null;
+	public JComboBox cbM01Colour = null;
+	public JTextField tfM01FireMark = null;
+	private JCheckBox cM01IconVisible = null;
+
+	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(tr("SeaMap Symbol Entry"), "Smp", tr("Seamark Editor"), Shortcut
+				.registerShortcut("tools:Semarks",
+						tr("Tool: {0}", tr("Seamark Editor")), KeyEvent.VK_S,
+						Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
+
+		dia = this;
+
+	}
+
+	public void CloseDialog() {
+		onode = null;
+		DataSet.selListeners.remove(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.selListeners.add(SmpListener);
+	}
+
+	private void PicRebuild() {
+
+		DataSet ds = Main.main.getCurrentDataSet();
+
+		if (obuoy == null) {
+			return;
+		}
+
+		Node n = obuoy.getNode();
+
+		if (n != null) {
+			Command c;
+
+			if (smb != "") {
+
+				c = new ChangePropertyCommand(n, "seamark", smb);
+				c.executeCommand();
+				ds.fireSelectionChanged();
+
+				smb = "";
+			}
+
+			if (smt != "") {
+
+				c = new ChangePropertyCommand(n, "seamark:type", smt);
+				c.executeCommand();
+				ds.fireSelectionChanged();
+
+				smt = "";
+			}
+		}
+
+		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, "active layer contains no OSM data");
+			buoy.setNode(null);
+			return;
+		}
+
+		selection = ds.getSelectedNodes();
+		nodes = selection.size();
+
+		if (nodes == 0) {
+			buoy = new BuoyUkn(this, "Please select a node");
+			buoy.setNode(null);
+			return;
+		}
+
+		if (nodes > 1) {
+			buoy = new BuoyUkn(this, "Please select only one node");
+			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")));
+
+		cbM01Region.setEnabled(true);
+		cbM01TypeOfMark.setEnabled(true);
+		cbM01StyleOfMark.setEnabled(true);
+
+		// Soweit das Vorspiel. Ab hier beginnt das Parsen
+		String str = null;
+		String name;
+
+		keys = node.getKeys();
+		name = "";
+
+		// vorsorglich den Namen holen und verwenden, wenn es ein
+		// Seezeichen ist. Name kann durch die weiteren Tags ueber-
+		// schrieben werden
+		if (keys.containsKey("name"))
+			name = keys.get("name");
+
+		if (keys.containsKey("seamark:name")) {
+			name = keys.get("seamark:name");
+		}
+
+		if (keys.containsKey("seamark") || keys.containsKey("seamark:type")) {
+			if (keys.containsKey("seamark:type")) {
+			}
+
+			if (keys.containsKey("seamark:buoy_lateral:category") == true) {
+
+				buoy = null; // Prototyp der Lateraltonne
+				int ind = 0; // index für cbM01TypeOfMark
+				String cat; // Kathegorie
+
+				if (keys.containsKey("seamark:buoy_lateral:colour") == false) {
+					buoy = new BuoyUkn(this, "Parse-Error: Buoy without colour");
+					buoy.setNode(node);
+					return;
+				}
+
+				if (keys.containsKey("seamark:buoy_lateral:name"))
+					if (name.compareTo("") == 0) {
+						// name nur ueberschreiben, wenn nicht anderweitig gesetzt
+						name = keys.get("seamark:buoy_lateral:name");
+
+					}
+
+				str = keys.get("seamark:buoy_lateral:colour");
+				cat = keys.get("seamark:buoy_lateral:category");
+
+				if (cat.compareTo("port") == 0) {
+
+					buoy = new BuoyLat(this, SeaMark.PORT_HAND);
+					if (str.compareTo("red") == 0) {
+						buoy.setRegion(SeaMark.IALA_A);
+						buoy.setColour(SeaMark.RED);
+					} else {
+						buoy.setRegion(SeaMark.IALA_B);
+						buoy.setColour(SeaMark.GREEN);
+					}
+					buoy.setName(name);
+					ind = SeaMark.PORT_HAND;
+				}
+
+				if (cat.compareTo("starboard") == 0) {
+
+					buoy = new BuoyLat(this, SeaMark.STARBOARD_HAND);
+					if (str.compareTo("green") == 0) {
+						buoy.setRegion(SeaMark.IALA_A);
+						buoy.setColour(SeaMark.GREEN);
+					} else {
+						buoy.setRegion(SeaMark.IALA_B);
+						buoy.setColour(SeaMark.RED);
+					}
+					buoy.setName(name);
+					ind = SeaMark.STARBOARD_HAND;
+				}
+
+				if (cat.compareTo("preferred_channel_port") == 0) {
+
+					buoy = new BuoyLat(this, SeaMark.PREF_PORT_HAND);
+					if (str.compareTo("red;green;red") == 0
+							|| str.compareTo("red-green-red") == 0) {
+						buoy.setRegion(SeaMark.IALA_A);
+						buoy.setColour(SeaMark.RED_GREEN_RED);
+					} else {
+						buoy.setRegion(SeaMark.IALA_B);
+						buoy.setColour(SeaMark.GREEN_RED_GREEN);
+					}
+
+					buoy.setName(name);
+					ind = SeaMark.PREF_PORT_HAND;
+				}
+
+				if (cat.compareTo("preferred_channel_starboard") == 0) {
+
+					buoy = new BuoyLat(this, SeaMark.PREF_STARBOARD_HAND);
+					if (str.compareTo("green;red;green") == 0
+							|| str.compareTo("green-red-green") == 0) {
+						buoy.setRegion(SeaMark.IALA_A);
+						buoy.setColour(SeaMark.GREEN_RED_GREEN);
+					} else {
+						buoy.setRegion(SeaMark.IALA_B);
+						buoy.setColour(SeaMark.RED_GREEN_RED);
+					}
+
+					buoy.setName(name);
+					ind = SeaMark.PREF_STARBOARD_HAND;
+				}
+
+				// b != null true, wenn eine gültige Lateraltonne gefunden wurde
+				if (buoy != null) {
+					if (buoy.parseTopMark(node) == false) {
+						str = buoy.getErrMsg();
+						if (str == null)
+							buoy.setValid(false);
+					}
+
+					if (buoy.parseLight(node) == false) {
+						str = buoy.getErrMsg();
+						if (str == null)
+							buoy.setValid(false);
+					}
+
+					if (buoy.parseShape(node) == false) {
+						str = buoy.getErrMsg();
+						if (str == null)
+							buoy = new BuoyUkn(this, str);
+						return;
+					}
+
+					buoy.setNode(node);
+					buoy.setValid(true);
+					buoy.setBuoyIndex(ind);
+					cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
+					buoy.paintSign();
+
+					return;
+
+				} else { // Ende if(b != null)
+					buoy = new BuoyUkn(this, "Parse-Error: Seamark not set");
+					buoy.setNode(node);
+					return;
+				} // Ende else if(b != null)
+			} else // Ende if(keys.containsKey("seamark:buoy_lateral:category") ==
+							// true)
+			// Test auf Kardinal-
+			if (keys.containsKey("seamark:buoy_cardinal:category") == true) {
+
+				buoy = null; // Prototyp der Kardinaltonne
+				int ind = 6; // index für cbM01TypeOfMark
+				String cat; // Kathegorie
+
+				if (keys.containsKey("seamark:buoy_cardinal:colour") == false) {
+					buoy = new BuoyUkn(this, "Parse-Error: Tonne ohne Farbe");
+					buoy.setNode(node);
+					return;
+				}
+
+				if (keys.containsKey("seamark:buoy_cardinal:name"))
+					if (name.compareTo("") == 0) {
+						// name nur ueberschreiben, wenn nicht anderweitig gesetzt
+						name = keys.get("seamark:buoy_lateral:name");
+					}
+
+				str = keys.get("seamark:buoy_cardinal:colour");
+				cat = keys.get("seamark:buoy_cardinal:category");
+
+				// Test auf Kardinaltonne Nord
+				if (str.compareTo("black;yellow") == 0
+						|| str.compareTo("black-yellow") == 0) {
+
+					buoy = new BuoyCard(this, SeaMark.CARD_NORTH);
+
+					if (cat.compareTo("north") != 0)
+						buoy.setErrMsg("Parse-Error: falsche category");
+
+					buoy.setName(name);
+					ind = SeaMark.CARD_NORTH;
+				} // Ende if(str.compareTo("black;yellow")== 0)
+
+				// Test auf Kardinaltonne Ost
+				if (str.compareTo("black;yellow;black") == 0
+						|| str.compareTo("black-yellow-black") == 0) {
+
+					buoy = new BuoyCard(this, SeaMark.CARD_EAST);
+
+					if (cat.compareTo("east") != 0)
+						buoy.setErrMsg("Parse-Error: falsche category");
+
+					buoy.setName(name);
+					ind = SeaMark.CARD_EAST;
+				} // Ende if(str.compareTo("black;yellow;black")== 0)
+
+				// Test auf Kardinaltonne Sued
+				if (str.compareTo("yellow;black") == 0
+						|| str.compareTo("yellow-black") == 0) {
+
+					buoy = new BuoyCard(this, SeaMark.CARD_SOUTH);
+
+					if (cat.compareTo("south") != 0)
+						buoy.setErrMsg("Parse-Error: falsche category");
+
+					buoy.setName(name);
+					ind = SeaMark.CARD_SOUTH;
+				} // Ende if(str.compareTo("yellow;black")== 0)
+
+				// Test auf Kardinaltonne West
+				if (str.compareTo("yellow;black;yellow") == 0
+						|| str.compareTo("yellow-black-yellow") == 0) {
+
+					buoy = new BuoyCard(this, SeaMark.CARD_WEST);
+
+					if (cat.compareTo("west") != 0)
+						buoy.setErrMsg("Parse-Error: falsche category");
+
+					buoy.setName(name);
+					ind = SeaMark.CARD_WEST;
+				} // Ende if(str.compareTo("yellow;black;black")== 0)
+
+				// b != null true, wenn eine gültige Kardinaltonne gefunden wurde
+				if (buoy != null) {
+
+					if (buoy.parseLight(node) == false) {
+						str = buoy.getErrMsg();
+						if (str == null)
+							buoy.setValid(false);
+					}
+
+					if (buoy.parseShape(node) == false) {
+						str = buoy.getErrMsg();
+						if (str == null)
+							buoy = new BuoyUkn(this, str);
+						return;
+					}
+
+					buoy.setNode(node);
+					buoy.setValid(true);
+					buoy.setBuoyIndex(ind);
+					cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
+					buoy.paintSign();
+
+					return;
+
+				} else { // Ende if(b != null)
+					buoy = new BuoyUkn(this, "Parse-Error: Seamark not set");
+					buoy.setNode(node);
+					return;
+				} // Ende else if(b != null)
+
+			}
+
+			// Test auf Ansteuertonne (buoy_safewater
+			if (keys.containsKey("seamark:buoy_safewater:shape") == true) {
+
+				if (keys.containsKey("seamark:buoy_safewater:colour") == false) {
+					buoy = new BuoyUkn(this, "Parse-Error: Tonne ohne Farbe");
+					buoy.setNode(node);
+					return;
+				}
+
+				str = keys.get("seamark:buoy_safewater:colour");
+				if (str.compareTo("red;white") != 0) {
+					buoy = new BuoyUkn(this, "Parse-Error: Tonne mit falscher Farbe");
+					buoy.setNode(node);
+					return;
+				}
+
+				buoy.setName(name);
+				buoy.setColour(SeaMark.RED_WHITE);
+
+				if (buoy.parseTopMark(node) == false) {
+					str = buoy.getErrMsg();
+					if (str == null)
+						buoy.setValid(false);
+				}
+
+				if (buoy.parseLight(node) == false) {
+					str = buoy.getErrMsg();
+					if (str == null)
+						buoy.setValid(false);
+				}
+
+				if (buoy.parseShape(node) == false) {
+					str = buoy.getErrMsg();
+					if (str == null)
+						buoy = new BuoyUkn(this, str);
+					buoy.setNode(node);
+					return;
+				}
+
+				buoy.setValid(true);
+				buoy.setNode(node);
+				buoy.setBuoyIndex(5);
+				cbM01StyleOfMark.setSelectedIndex(buoy.getStyleIndex());
+				buoy.paintSign();
+
+				return;
+
+			}
+		} // Ende if(keys.containsKey("seamark") || keys.containsKey("seamark:type")
+			// )
+
+		buoy = new BuoyUkn(this, "Parse-Error: Seamark not set");
+		buoy.setNode(node);
+		return;
+	}
+
+	private JDialog getDM01SeaMap() {
+
+		if (dM01SeaMap == null) {
+			dM01SeaMap = new JDialog();
+			dM01SeaMap.setSize(new Dimension(353, 373));
+			dM01SeaMap.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
+			dM01SeaMap.setModal(false);
+			dM01SeaMap.setResizable(false);
+			dM01SeaMap.setContentPane(getPM01SeaMap());
+			dM01SeaMap.setTitle("Seamark Editor");
+			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.selListeners.remove(SmpListener);
+					Selection = null;
+
+					SmpItem.setEnabled(true);
+				}
+
+				public void windowActivated(WindowEvent arg0) {
+
+					parseSeaMark();
+				}
+
+			});
+
+		}
+
+		return dM01SeaMap;
+	}
+
+	private JPanel getPM01SeaMap() {
+		if (pM01SeaMap == null) {
+			lM01TimeUnit = new JLabel();
+			lM01TimeUnit.setBounds(new Rectangle(125, 250, 26, 20));
+			lM01TimeUnit.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01TimeUnit.setText("s");
+
+			lM01HeightUnit = new JLabel();
+			lM01HeightUnit.setBounds(new Rectangle(220, 250, 26, 20));
+			lM01HeightUnit.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01HeightUnit.setText("m");
+
+			lM01RangeUnit = new JLabel();
+			lM01RangeUnit.setBounds(new Rectangle(320, 250, 26, 20));
+			lM01RangeUnit.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01RangeUnit.setText("M");
+
+			lM01Height = new JLabel();
+			lM01Height.setBounds(new Rectangle(140, 250, 70, 20));
+			lM01Height.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Height.setText("Height:");
+
+			lM01Range = new JLabel();
+			lM01Range.setBounds(new Rectangle(240, 250, 70, 20));
+			lM01Range.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Range.setText("Range:");
+
+			lM01RepeatTime = new JLabel();
+			lM01RepeatTime.setBounds(new Rectangle(45, 250, 70, 20));
+			lM01RepeatTime.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01RepeatTime.setText("Period:");
+
+			lM01Kennung = new JLabel();
+			lM01Kennung.setBounds(new Rectangle(95, 230, 60, 20));
+			lM01Kennung.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Kennung.setText("Character:");
+
+			lM01Colour = new JLabel();
+			lM01Colour.setBounds(new Rectangle(240, 230, 60, 20));
+			lM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Colour.setText("Colour:");
+
+			lM01Name = new JLabel();
+			lM01Name.setBounds(new Rectangle(5, 120, 82, 16));
+			lM01Name.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Name.setText("Name:");
+
+			lM01Icon03 = new JLabel();
+			lM01Icon03.setBounds(new Rectangle(205, 130, 60, 70));
+			lM01Icon03.setIcon(null);
+			lM01Icon03.setText("");
+
+			lM01Icon02 = new JLabel();
+			lM01Icon02.setBounds(new Rectangle(250, 0, 85, 140));
+			lM01Icon02.setIcon(null);
+			lM01Icon02.setText("");
+
+			lM01Props02 = new JLabel();
+			lM01Props02.setBounds(new Rectangle(5, 170, 90, 16));
+			lM01Props02.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Props02.setText("Other Features:");
+
+			lM01StyleOfMark = new JLabel();
+			lM01StyleOfMark.setBounds(new Rectangle(5, 90, 148, 16));
+			lM01StyleOfMark.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01StyleOfMark.setText("Style:");
+
+			lM01TypeOfMark = new JLabel();
+			lM01TypeOfMark.setBounds(new Rectangle(5, 30, 120, 16));
+			lM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01TypeOfMark.setText("Type:");
+
+			lM01Region = new JLabel();
+			lM01Region.setBounds(new Rectangle(5, 60, 120, 16));
+			lM01Region.setFont(new Font("Dialog", Font.PLAIN, 12));
+			lM01Region.setText("Region:");
+
+			lM01Head = new JLabel();
+			lM01Head.setBounds(new Rectangle(5, 3, 316, 16));
+			lM01Head.setText("Seamark Properties");
+
+			lM01Icon01 = new JLabel();
+			lM01Icon01.setBounds(new Rectangle(250, 0, 85, 140));
+			lM01Icon01.setIcon(null);
+			lM01Icon01.setText("");
+
+			pM01SeaMap = new JPanel();
+			pM01SeaMap.setLayout(null);
+			pM01SeaMap.add(lM01TimeUnit, null);
+			pM01SeaMap.add(lM01HeightUnit, null);
+			pM01SeaMap.add(lM01RangeUnit, null);
+			pM01SeaMap.add(lM01Height, null);
+			pM01SeaMap.add(lM01Range, null);
+			pM01SeaMap.add(lM01RepeatTime, null);
+			pM01SeaMap.add(lM01Colour, null);
+			pM01SeaMap.add(lM01Kennung, null);
+			pM01SeaMap.add(lM01Name, null);
+			pM01SeaMap.add(lM01Icon03, null);
+			pM01SeaMap.add(lM01Icon02, null);
+			pM01SeaMap.add(lM01Props02, null);
+			pM01SeaMap.add(lM01StyleOfMark, null);
+			pM01SeaMap.add(lM01TypeOfMark, null);
+			pM01SeaMap.add(lM01Region, null);
+			pM01SeaMap.add(lM01Head, null);
+			pM01SeaMap.add(lM01Icon01, null);
+			pM01SeaMap.add(getCbM01Region(), null);
+			pM01SeaMap.add(getCbM01TypeOfMark(), null);
+			pM01SeaMap.add(getCbM01StyleOfMark(), null);
+			pM01SeaMap.add(getBM01Save(), null);
+			pM01SeaMap.add(getCM01TopMark(), null);
+			pM01SeaMap.add(getCM01Radar(), null);
+			pM01SeaMap.add(getCM01Fired(), null);
+			pM01SeaMap.add(getCM01Fog(), null);
+			pM01SeaMap.add(getSM01StatusBar(), null);
+			pM01SeaMap.add(getTfM01Name(), null);
+			pM01SeaMap.add(getBM01Close(), null);
+			pM01SeaMap.add(getTfM01RepeatTime(), null);
+			pM01SeaMap.add(getTfM01Range(), null);
+			pM01SeaMap.add(getTfM01Height(), null);
+			pM01SeaMap.add(getCbM01Kennung(), null);
+			pM01SeaMap.add(getCbM01Colour(), null);
+			pM01SeaMap.add(getTfM01FireMark(), null);
+			pM01SeaMap.add(getCM01IconVisible(), null);
+		}
+
+		return pM01SeaMap;
+	}
+
+	private JComboBox getCbM01TypeOfMark() {
+
+		if (cbM01TypeOfMark == null) {
+
+			cbM01TypeOfMark = new JComboBox();
+
+			// Inhalt der ComboBox
+			cbM01TypeOfMark.addItem("Not set");
+			cbM01TypeOfMark.addItem("Port");
+			cbM01TypeOfMark.addItem("Starboard");
+			cbM01TypeOfMark.addItem("Preferred Port");
+			cbM01TypeOfMark.addItem("Preferred Starboard");
+			cbM01TypeOfMark.addItem("Safe Water");
+			cbM01TypeOfMark.addItem("Cardinal North");
+			cbM01TypeOfMark.addItem("Cardinal East");
+			cbM01TypeOfMark.addItem("Cardinal South");
+			cbM01TypeOfMark.addItem("Cardinal West");
+			cbM01TypeOfMark.addItem("Isolated Danger");
+			cbM01TypeOfMark.addItem("Special Purpose");
+			cbM01TypeOfMark.addItem("Light");
+
+			cbM01TypeOfMark.setBounds(new Rectangle(50, 25, 150, 25));
+			cbM01TypeOfMark.setEditable(false);
+			cbM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cbM01TypeOfMark.setEnabled(true);
+
+			cbM01TypeOfMark.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					Node n;
+					String name;
+					int type = cbM01TypeOfMark.getSelectedIndex();
+
+					if (buoy == null)
+						buoy = new BuoyUkn(dia, "Seamark not set");
+					;
+					if (type == buoy.getBuoyIndex() && type != 0) {
+						return;
+					}
+
+					n = buoy.getNode();
+					name = buoy.getName();
+
+					switch (type) {
+					case SeaMark.UNKNOWN_CAT:
+						if (!(buoy instanceof BuoyUkn))
+							buoy = new BuoyUkn(dia, "Seamark not set");
+						buoy.setBuoyIndex(type);
+						break;
+
+					case SeaMark.PORT_HAND:
+						if (!(buoy instanceof BuoyLat))
+							buoy = new BuoyLat(dia, SeaMark.PORT_HAND);
+						if (buoy.getRegion() != SeaMark.IALA_B) {
+							buoy.setColour(SeaMark.RED);
+							buoy.setRegion(SeaMark.IALA_A);
+							cbM01Region.setSelectedIndex(SeaMark.IALA_A);
+						} else {
+							buoy.setColour(SeaMark.GREEN);
+						}
+						break;
+
+					case SeaMark.STARBOARD_HAND:
+						if (!(buoy instanceof BuoyLat))
+							buoy = new BuoyLat(dia, SeaMark.STARBOARD_HAND);
+						if (buoy.getRegion() != SeaMark.IALA_B) {
+							buoy.setColour(SeaMark.GREEN);
+							buoy.setRegion(SeaMark.IALA_A);
+							cbM01Region.setSelectedIndex(SeaMark.IALA_A);
+						} else {
+							buoy.setColour(SeaMark.RED);
+						}
+						break;
+
+					case SeaMark.PREF_PORT_HAND:
+						if (!(buoy instanceof BuoyLat))
+							buoy = new BuoyLat(dia, SeaMark.PREF_PORT_HAND);
+						if (buoy.getRegion() != SeaMark.IALA_B) {
+							buoy.setColour(SeaMark.RED_GREEN_RED);
+							buoy.setRegion(SeaMark.IALA_A);
+							cbM01Region.setSelectedIndex(SeaMark.IALA_A);
+						} else {
+							buoy.setColour(SeaMark.GREEN_RED_GREEN);
+						}
+						break;
+
+					case SeaMark.PREF_STARBOARD_HAND:
+						if (!(buoy instanceof BuoyLat))
+							buoy = new BuoyLat(dia, SeaMark.PREF_STARBOARD_HAND);
+						if (buoy.getRegion() != SeaMark.IALA_B) {
+							buoy.setColour(SeaMark.GREEN_RED_GREEN);
+							buoy.setRegion(SeaMark.IALA_A);
+							cbM01Region.setSelectedIndex(SeaMark.IALA_A);
+						} else {
+							buoy.setColour(SeaMark.RED_GREEN_RED);
+						}
+						break;
+
+					case SeaMark.SAFE_WATER:
+						if (!(buoy instanceof BuoySaw))
+							buoy = new BuoySaw(dia, SeaMark.SAFE_WATER);
+						break;
+
+					case SeaMark.CARD_NORTH:
+					case SeaMark.CARD_EAST:
+					case SeaMark.CARD_SOUTH:
+					case SeaMark.CARD_WEST:
+						if (!(buoy instanceof BuoyCard))
+							buoy = new BuoyCard(dia, type);
+						break;
+
+					case SeaMark.ISOLATED_DANGER:
+						if (!(buoy instanceof BuoyIsol))
+							buoy = new BuoyIsol(dia, SeaMark.ISOLATED_DANGER);
+						break;
+
+					case SeaMark.SPECIAL_PURPOSE:
+						if (!(buoy instanceof BuoySpec))
+							buoy = new BuoySpec(dia, SeaMark.SPECIAL_PURPOSE);
+						break;
+
+					case SeaMark.LIGHT:
+						if (!(buoy instanceof BuoyNota))
+							buoy = new BuoyNota(dia, type);
+						break;
+
+					default:
+						if (!(buoy instanceof BuoyUkn))
+							buoy = new BuoyUkn(dia, "Not Implemented");
+					}
+
+					buoy.setNode(n);
+					buoy.setBuoyIndex(type);
+					buoy.refreshStyles();
+					buoy.refreshLights();
+					buoy.setName(name);
+					if (buoy instanceof BuoyLat)
+						buoy.setLightColour();
+					buoy.paintSign();
+				}
+			});
+
+		}
+
+		return cbM01TypeOfMark;
+	}
+
+	private JComboBox getCbM01Region() {
+		if (cbM01Region == null) {
+			cbM01Region = new JComboBox();
+
+			// Inhalt der ComboBox
+			cbM01Region.addItem("Not set");
+			cbM01Region.addItem("IALA-A");
+			cbM01Region.addItem("IALA-B");
+
+			cbM01Region.setBounds(new Rectangle(60, 55, 100, 25));
+			cbM01Region.setEditable(false);
+			cbM01Region.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cbM01Region.setEnabled(true);
+
+			cbM01Region.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					buoy.setRegion(cbM01Region.getSelectedIndex());
+					if (buoy instanceof BuoyLat)
+						buoy.setLightColour();
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return cbM01Region;
+	}
+
+	private JComboBox getCbM01StyleOfMark() {
+		if (cbM01StyleOfMark == null) {
+			cbM01StyleOfMark = new JComboBox();
+			cbM01StyleOfMark.setBounds(new Rectangle(50, 85, 150, 25));
+			cbM01StyleOfMark.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cbM01StyleOfMark.setEnabled(true);
+			cbM01StyleOfMark.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					int style = cbM01StyleOfMark.getSelectedIndex();
+					if (buoy != null && style != buoy.getStyleIndex()) {
+						buoy.setStyleIndex(style);
+						buoy.paintSign();
+					}
+				}
+			});
+		}
+
+		return cbM01StyleOfMark;
+	}
+
+	private JButton getBM01Save() {
+		if (bM01Save == null) {
+			bM01Save = new JButton();
+			bM01Save.setBounds(new Rectangle(120, 290, 80, 20));
+			bM01Save.setText("Save");
+
+			bM01Save.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Auge.png")));
+					cM01IconVisible.setSelected(true);
+
+					buoy.saveSign();
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return bM01Save;
+	}
+
+	private JCheckBox getCM01TopMark() {
+		if (cM01TopMark == null) {
+			cM01TopMark = new JCheckBox();
+			cM01TopMark.setBounds(new Rectangle(20, 190, 90, 20));
+			cM01TopMark.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cM01TopMark.setText("Topmark");
+			cM01TopMark.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					if (buoy == null) {
+						return;
+					}
+
+					buoy.setTopMark(cM01TopMark.isSelected());
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return cM01TopMark;
+	}
+
+	private JCheckBox getCM01Radar() {
+		if (cM01Radar == null) {
+			cM01Radar = new JCheckBox();
+			cM01Radar.setBounds(new Rectangle(140, 190, 70, 20));
+			cM01Radar.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cM01Radar.setEnabled(false);
+			cM01Radar.setText("Radar");
+		}
+
+		return cM01Radar;
+	}
+
+	private JCheckBox getCM01Fired() {
+		if (cM01Fired == null) {
+			cM01Fired = new JCheckBox();
+			cM01Fired.setBounds(new Rectangle(20, 230, 70, 20));
+			cM01Fired.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cM01Fired.setText("Lighted");
+			cM01Fired.setEnabled(false);
+			cM01Fired.addItemListener(new java.awt.event.ItemListener() {
+				public void itemStateChanged(java.awt.event.ItemEvent e) {
+					if (buoy == null) {
+						return;
+					}
+
+					buoy.setFired(cM01Fired.isSelected());
+
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return cM01Fired;
+	}
+
+	private JCheckBox getCM01Fog() {
+		if (cM01Fog == null) {
+			cM01Fog = new JCheckBox();
+			cM01Fog.setBounds(new Rectangle(20, 210, 90, 20));
+			cM01Fog.setFont(new Font("Dialog", Font.PLAIN, 12));
+			cM01Fog.setEnabled(false);
+			cM01Fog.setText("Foghorn");
+		}
+
+		return cM01Fog;
+	}
+
+	private JTextField getSM01StatusBar() {
+		if (sM01StatusBar == null) {
+			sM01StatusBar = new JTextField();
+			sM01StatusBar.setBounds(new Rectangle(7, 319, 340, 20));
+			sM01StatusBar.setBackground(SystemColor.activeCaptionBorder);
+		}
+
+		return sM01StatusBar;
+	}
+
+	private JTextField getTfM01Name() {
+		if (tfM01Name == null) {
+			tfM01Name = new JTextField();
+			tfM01Name.setBounds(new Rectangle(50, 120, 190, 20));
+			tfM01Name.addFocusListener(new java.awt.event.FocusAdapter() {
+				public void focusLost(java.awt.event.FocusEvent e) {
+					buoy.setName(tfM01Name.getText());
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return tfM01Name;
+	}
+
+	private JButton getBM01Close() {
+		if (bM01Close == null) {
+			bM01Close = new JButton();
+			bM01Close.setBounds(new Rectangle(20, 290, 80, 20));
+			bM01Close.setText("Cancel");
+			bM01Close.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					// aufraeumen
+					if (obuoy != null)
+						PicRebuild();
+					// Deaktivierung des Listeners
+					DataSet.selListeners.remove(SmpListener);
+					Selection = null;
+					SmpItem.setEnabled(true);
+					onode = null;
+
+					dM01SeaMap.dispose();
+				}
+			});
+		}
+
+		return bM01Close;
+	}
+
+	private JTextField getTfM01RepeatTime() {
+		if (tfM01RepeatTime == null) {
+			tfM01RepeatTime = new JTextField();
+			tfM01RepeatTime.setBounds(new Rectangle(90, 250, 30, 20));
+			tfM01RepeatTime.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					String s = tfM01RepeatTime.getText();
+
+					buoy.setLightPeriod(s);
+					buoy.paintSign();
+				}
+			});
+
+			tfM01RepeatTime.addFocusListener(new java.awt.event.FocusAdapter() {
+				public void focusLost(java.awt.event.FocusEvent e) {
+					String s = tfM01RepeatTime.getText();
+
+					buoy.setLightPeriod(s);
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return tfM01RepeatTime;
+	}
+
+	private JTextField getTfM01Range() {
+		if (tfM01Range == null) {
+			tfM01Range = new JTextField();
+			tfM01Range.setBounds(new Rectangle(285, 250, 30, 20));
+			tfM01Range.setEnabled(false);
+			tfM01Range.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					String s = tfM01Range.getText();
+
+					buoy.setRange(s);
+					buoy.paintSign();
+				}
+			});
+
+			tfM01Range.addFocusListener(new java.awt.event.FocusAdapter() {
+				public void focusLost(java.awt.event.FocusEvent e) {
+					String s = tfM01Range.getText();
+
+					buoy.setRange(s);
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return tfM01Range;
+	}
+
+	private JTextField getTfM01Height() {
+		if (tfM01Height == null) {
+			tfM01Height = new JTextField();
+			tfM01Height.setBounds(new Rectangle(185, 250, 30, 20));
+			tfM01Height.setEnabled(false);
+			tfM01Height.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					String s = tfM01Height.getText();
+
+					buoy.setHeight(s);
+					buoy.paintSign();
+				}
+			});
+
+			tfM01Height.addFocusListener(new java.awt.event.FocusAdapter() {
+				public void focusLost(java.awt.event.FocusEvent e) {
+					String s = tfM01Height.getText();
+
+					buoy.setHeight(s);
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return tfM01Height;
+	}
+
+	private JComboBox getCbM01Kennung() {
+		if (cbM01Kennung == null) {
+			cbM01Kennung = new JComboBox();
+			cbM01Kennung.setBounds(new Rectangle(160, 230, 70, 20));
+			cbM01Kennung.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					String it = (String) cbM01Kennung.getSelectedItem();
+
+					if (it == null)
+						return;
+
+					if (it.compareTo("Not set") == 0)
+						return;
+
+					if (buoy == null) {
+						return;
+					}
+					buoy.setLightChar(it);
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return cbM01Kennung;
+	}
+
+	private JComboBox getCbM01Colour() {
+		if (cbM01Colour == null) {
+			cbM01Colour = new JComboBox();
+			cbM01Colour.setBounds(new Rectangle(285, 230, 50, 20));
+			cbM01Colour.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					String it = (String) cbM01Colour.getSelectedItem();
+
+					if (it == null)
+						return;
+
+					if (it.compareTo("Not set") == 0)
+						return;
+
+					if (buoy == null) {
+						return;
+					}
+					buoy.setLightColour(it);
+					buoy.paintSign();
+				}
+			});
+		}
+
+		return cbM01Colour;
+	}
+
+	private JTextField getTfM01FireMark() {
+		if (tfM01FireMark == null) {
+			tfM01FireMark = new JTextField();
+			tfM01FireMark.setBounds(new Rectangle(240, 180, 100, 20));
+			tfM01FireMark.setEditable(false);
+		}
+
+		return tfM01FireMark;
+	}
+
+	private JCheckBox getCM01IconVisible() {
+		if (cM01IconVisible == null) {
+			cM01IconVisible = new JCheckBox();
+			cM01IconVisible.setBounds(new Rectangle(310, 290, 30, 21));
+			cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+					"/images/AugeN.png")));
+			cM01IconVisible.setSelected(false);
+			cM01IconVisible.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.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")));
+						if (n != null) {
+							// seamark loeschen, wenn notwendig
+							if (n.getKeys().containsKey("seamark")) {
+								smb = n.getKeys().get("seamark"); // smb merken
+
+								c = new ChangePropertyCommand(n, "seamark", null);
+								c.executeCommand();
+								ds.fireSelectionChanged();
+								obuoy = buoy;
+							}
+
+							// seamark:type loeschen, wenn notwendig
+							if (n.getKeys().containsKey("seamark:type")) {
+								smt = n.getKeys().get("seamark:type"); // smt merken
+
+								c = new ChangePropertyCommand(n, "seamark:type", null);
+								c.executeCommand();
+								ds.fireSelectionChanged();
+								obuoy = buoy;
+							}
+
+						}
+					} else {
+						cM01IconVisible.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Auge.png")));
+						PicRebuild();
+						obuoy = null;
+					}
+				}
+			});
+		}
+
+		return cM01IconVisible;
+	}
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java	(revision 22527)
@@ -0,0 +1,169 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks;
+
+import java.util.Iterator;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+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 RED_LIGHT = 1;
+	public final static int GREEN_LIGHT = 2;
+	public final static int WHITE_LIGHT = 3;
+
+	/**
+	 * Types - correspond to TypeIndex
+	 */
+	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 SAFE_WATER = 5;
+	public final static int CARD_NORTH = 6;
+	public final static int CARD_EAST = 7;
+	public final static int CARD_SOUTH = 8;
+	public final static int CARD_WEST = 9;
+	public final static int ISOLATED_DANGER = 10;
+	public final static int SPECIAL_PURPOSE = 11;
+	public final static int LIGHT = 12;
+
+	/**
+	 * Regions
+	 */
+	public final static int UNKNOWN_REGION = 0;
+	public final static int IALA_A = 1;
+	public final static int IALA_B = 2;
+
+	/**
+	 * 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_FLOAT = 4;
+	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 SPEC_PILLAR = 1;
+	public final static int SPEC_SPAR = 2;
+	public final static int SPEC_BEACON = 3;
+	public final static int SPEC_SPHERE = 4;
+	public final static int SPEC_BARREL = 5;
+	public final static int LIGHT_MAJOR = 1;
+	public final static int LIGHT_MINOR = 2;
+
+	/**
+	 * Variables
+	 */
+
+	/**
+	 * private Variablen
+	 */
+
+	public abstract void paintSign();
+
+	public abstract boolean parseTopMark(Node node);
+
+	public abstract boolean parseLight(Node node);
+
+	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 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 22527)
@@ -0,0 +1,366 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+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 int Region = 0;
+
+	public int getRegion() {
+		return Region;
+	}
+
+	public void setRegion(int region) {
+		Region = region;
+	}
+
+	private boolean Fired = false;
+
+	public boolean isFired() {
+		return Fired;
+	}
+
+	public void setFired(boolean fired) {
+		Fired = fired;
+		/*
+		 * if (dlg.cM01Fired == null) { return; }
+		 */
+		dlg.cM01Fired.setSelected(fired);
+
+	}
+
+	private String LightChar = "";
+
+	public String getLightChar() {
+		return LightChar;
+	}
+
+	public void setLightChar(String lightChar) {
+		LightChar = lightChar;
+	}
+
+	private String LightColour = "";
+
+	public String getLightColour() {
+		return LightColour;
+	}
+
+	public void setLightColour(String lightColour) {
+		LightColour = lightColour;
+	}
+
+	private String LightGroup = "";
+
+	public String getLightGroup() {
+		return LightGroup;
+	}
+
+	public void setLightGroup(String lightGroup) {
+		LightGroup = lightGroup;
+	}
+
+	protected void setLightGroup(Map<String, String> k) {
+		String s = "";
+
+		if (k.containsKey("seamark:light:group")) {
+			s = k.get("seamark:light:group");
+
+			LightGroup = s;
+		}
+
+	}
+
+	private String Height = "";
+
+	public String getHeight() {
+		return Height;
+	}
+
+	public void setHeight(String height) {
+		Height = height;
+	}
+
+	private String Range = "";
+
+	public String getRange() {
+		return Range;
+	}
+
+	public void setRange(String range) {
+		Range = range;
+	}
+
+	private String LightPeriod = "";
+
+	public String getLightPeriod() {
+		return LightPeriod;
+	}
+
+	public void setLightPeriod(String lightPeriod) {
+		String regex = "^[\\d\\s]+$";
+
+		if (lightPeriod.length() == 0)
+			lightPeriod = " ";
+
+		Pattern pat = Pattern.compile(regex);
+		Matcher matcher = pat.matcher(lightPeriod);
+
+		if (matcher.find()) {
+			LightPeriod = lightPeriod;
+
+			setErrMsg(null);
+		} else {
+			setErrMsg("Als Periodendauer sind nur Zahlen erlaubt");
+			dlg.tfM01RepeatTime.requestFocus();
+		}
+
+	}
+
+	protected void setLightPeriod(Map<String, String> k) {
+		String s;
+
+		s = "";
+
+		if (k.containsKey("seamark:light:signal:period")) {
+			s = k.get("seamark:light:signal:period");
+			LightPeriod = s;
+
+			return;
+		}
+
+		if (k.containsKey("seamark:light:period")) {
+			s = k.get("seamark:light:period");
+			LightPeriod = s;
+
+			return;
+		}
+	}
+
+	private Node Node = null;
+
+	public Node getNode() {
+		return Node;
+	}
+
+	public void setNode(Node node) {
+		Node = node;
+	}
+
+	public boolean parseShape(Node node, String str) {
+		String lstr;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+		if (keys.containsKey(str) == false) {
+			setErrMsg("Parse-Error: Seezeichen ohne Form");
+			return false;
+		}
+		return ret;
+	}
+
+	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 void paintSign() {
+		dlg.cbM01TypeOfMark.setEnabled(true);
+		dlg.cbM01StyleOfMark.setEnabled(true);
+
+		dlg.cbM01TypeOfMark.setSelectedIndex(getBuoyIndex());
+
+		dlg.cM01TopMark.setSelected(hasTopMark());
+		dlg.cM01Fired.setSelected(isFired());
+
+		dlg.tfM01RepeatTime.setText(LightPeriod);
+
+		if (isFired()) {
+			String lp, c;
+			String tmp = null;
+			int i1;
+
+			dlg.cbM01Kennung.setEnabled(true);
+
+			c = getLightChar();
+			if (c.compareTo("Q") == 0)
+				dlg.tfM01RepeatTime.setEnabled(false);
+			else
+				dlg.tfM01RepeatTime.setEnabled(true);
+
+			if (c.contains("+")) {
+				i1 = c.indexOf("+");
+				tmp = c.substring(i1, c.length());
+				c = c.substring(0, i1);
+			}
+
+			if (getLightGroup() != "")
+				c = c + "(" + getLightGroup() + ")";
+			if (tmp != null)
+				c = c + tmp;
+
+			c = c + " " + getLightColour();
+			lp = getLightPeriod();
+			if (lp != "" && lp != " ")
+				c = c + " " + lp + "s";
+			dlg.tfM01FireMark.setText(c);
+		} else {
+			dlg.tfM01RepeatTime.setEnabled(false);
+			dlg.cbM01Kennung.setEnabled(false);
+			dlg.tfM01FireMark.setText("");
+		}
+
+		dlg.bM01Save.setEnabled(true);
+
+		dlg.lM01Icon01.setIcon(null);
+		dlg.lM01Icon02.setIcon(null);
+		dlg.lM01Icon03.setIcon(null);
+	}
+
+	public void saveSign(String type) {
+		delSeaMarkKeys(Node);
+
+		String str = dlg.tfM01Name.getText();
+		if (str.compareTo("") != 0)
+			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 (colour.compareTo("") == 0) {
+			return;
+		}
+
+		if (dlg.cM01Fired.isSelected()) {
+			if (LightColour == "R")
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:colour", "red"));
+			else if (LightColour == "G")
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:colour", "green"));
+			else if (LightColour == "W")
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:colour", "white"));
+
+			if (LightPeriod != "" && LightPeriod != " " && LightChar != "Q")
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:period", LightPeriod));
+
+			if (LightChar != "")
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:character", LightChar));
+
+			if (LightGroup != "")
+				Main.main.undoRedo.add(new ChangePropertyCommand(Node,
+						"seamark:light:group", LightGroup));
+		}
+
+	}
+
+	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 Checker(String pic1, String pic2) {
+		// Abfrage Topzeichen
+		if (pic1 != null) {
+			if (dlg.cM01TopMark.isSelected())
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(pic1)));
+			else
+				dlg.lM01Icon02.setIcon(null);
+		}
+
+		// Abfrage befeuert
+		if (pic2 != null) {
+			if (dlg.cM01Fired.isSelected())
+				dlg.lM01Icon03.setIcon(new ImageIcon(getClass().getResource(pic2)));
+			else
+				dlg.lM01Icon03.setIcon(null);
+		}
+
+	}
+
+	public boolean parseShape(Node node) {
+		return false;
+	}
+
+	public void refreshStyles() {
+	}
+
+	public void refreshLights() {
+	}
+
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 22527)
@@ -0,0 +1,496 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoyCard extends Buoy {
+
+	public BuoyCard(SmpDialogAction dia, int type) {
+		super(dia);
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+		dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Beacon");
+		dlg.cbM01StyleOfMark.addItem("Tower");
+		dlg.cbM01StyleOfMark.addItem("Float");
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.addItem("W");
+		dlg.cbM01Colour.setSelectedIndex(0);
+		dlg.cbM01Colour.setEnabled(false);
+		dlg.cM01Fired.setSelected(false);
+		dlg.cM01TopMark.setSelected(false);
+
+		setStyleIndex(0);
+		setBuoyIndex(type);
+		setLightColour("W");
+
+		switch (type) {
+		case CARD_NORTH:
+			setColour(SeaMark.BLACK_YELLOW);
+			break;
+		case CARD_EAST:
+			setColour(SeaMark.BLACK_YELLOW_BLACK);
+			break;
+		case CARD_SOUTH:
+			setColour(SeaMark.YELLOW_BLACK);
+			break;
+		case CARD_WEST:
+			setColour(SeaMark.YELLOW_BLACK_YELLOW);
+			break;
+		default:
+		}
+
+		refreshLights();
+		paintSign();
+	}
+
+	public void refreshLights() {
+		int type = getBuoyIndex();
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+		dlg.cbM01Kennung.setSelectedIndex(0);
+
+		switch (type) {
+		case SeaMark.CARD_NORTH:
+			dlg.cbM01Kennung.addItem("Q");
+			dlg.cbM01Kennung.addItem("VQ");
+			break;
+
+		case SeaMark.CARD_EAST:
+			dlg.cbM01Kennung.addItem("Q(3)");
+			dlg.cbM01Kennung.addItem("VQ(3)");
+			break;
+
+		case SeaMark.CARD_SOUTH:
+			dlg.cbM01Kennung.addItem("Q(6)+LFl");
+			dlg.cbM01Kennung.addItem("VQ(6)+LFl");
+			break;
+
+		case SeaMark.CARD_WEST:
+			dlg.cbM01Kennung.addItem("Q(9)");
+			dlg.cbM01Kennung.addItem("VQ(9)");
+			break;
+
+		default:
+		}
+
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+
+		dlg.cM01TopMark.setSelected(true);
+		dlg.cM01TopMark.setEnabled(false);
+		dlg.cM01Fired.setEnabled(true);
+
+		switch (getBuoyIndex()) {
+		case SeaMark.CARD_NORTH:
+			switch (getStyleIndex()) {
+			case CARD_PILLAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Pillar_North.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/North_Top_Buoy.png")));
+				break;
+			case CARD_SPAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Spar_North.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/North_Top_Buoy.png")));
+				break;
+			case CARD_BEACON:
+				if (isFired())
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_Lit_North.png")));
+				else
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_North.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/North_Top_Post.png")));
+				break;
+			case CARD_TOWER:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Tower_North.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/North_Top_Post.png")));
+				break;
+			case CARD_FLOAT:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Float_North.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/North_Top_Post.png")));
+				break;
+			default:
+			}
+			break;
+
+		case SeaMark.CARD_EAST:
+			switch (getStyleIndex()) {
+			case CARD_PILLAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Pillar_East.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/East_Top_Buoy.png")));
+				break;
+			case CARD_SPAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Spar_East.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/East_Top_Buoy.png")));
+				break;
+			case CARD_BEACON:
+				if (isFired())
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_Lit_East.png")));
+				else
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_East.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/East_Top_Post.png")));
+				break;
+			case CARD_TOWER:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Tower_East.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/East_Top_Post.png")));
+				break;
+			case CARD_FLOAT:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Float_East.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/East_Top_Post.png")));
+				break;
+			default:
+			}
+			break;
+
+		case SeaMark.CARD_SOUTH:
+			switch (getStyleIndex()) {
+			case CARD_PILLAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Pillar_South.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/South_Top_Buoy.png")));
+				break;
+			case CARD_SPAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Spar_South.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/South_Top_Buoy.png")));
+				break;
+			case CARD_BEACON:
+				if (isFired())
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_Lit_South.png")));
+				else
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_South.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/South_Top_Post.png")));
+				break;
+			case CARD_TOWER:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Tower_South.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/South_Top_Post.png")));
+				break;
+			case CARD_FLOAT:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Float_South.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/South_Top_Post.png")));
+				break;
+			default:
+			}
+			break;
+
+		case SeaMark.CARD_WEST:
+			switch (getStyleIndex()) {
+			case CARD_PILLAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Pillar_West.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/West_Top_Buoy.png")));
+				break;
+			case CARD_SPAR:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Spar_West.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/West_Top_Buoy.png")));
+				break;
+			case CARD_BEACON:
+				if (isFired())
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_Lit_West.png")));
+				else
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cardinal_Beacon_Lit_West.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/West_Top_Post.png")));
+				break;
+			case CARD_TOWER:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Tower_West.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/West_Top_Post.png")));
+				break;
+			case CARD_FLOAT:
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Cardinal_Float_West.png")));
+				dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource(
+						"/images/West_Top_Post.png")));
+				break;
+			default:
+			}
+			break;
+
+		default:
+		}
+
+		if (getLightChar() != "") {
+			String tmp = null;
+			String c;
+			int i1;
+
+			c = getLightChar();
+			if (c.contains("+")) {
+				i1 = c.indexOf("+");
+				tmp = c.substring(i1, c.length());
+				c = c.substring(0, i1);
+			}
+
+			if (getLightGroup() != "")
+				c = c + "(" + getLightGroup() + ")";
+			if (tmp != null)
+				c = c + tmp;
+
+			dlg.cbM01Kennung.setSelectedItem(c);
+			if (dlg.cbM01Kennung.getSelectedItem() == "Not set")
+				c = "";
+		}
+
+		Checker(null, "/images/Light_White.png");
+	}
+
+	public boolean parseLight(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setFired(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				int i1;
+				String tmp = null;
+
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				String ce = c;
+
+				if (c.contains("+")) {
+					i1 = c.indexOf("+");
+					tmp = c.substring(i1, c.length());
+					c = c.substring(0, i1);
+				}
+
+				if (getLightGroup() != "")
+					ce = c + "(" + getLightGroup() + ")";
+				if (tmp != null) {
+					c = c + tmp;
+					ce = ce + tmp;
+				}
+
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.compareTo("white") == 0) {
+				setFired(true);
+				setLightColour("W");
+
+			} else {
+				if (getErrMsg() == null)
+					setErrMsg("Parse-Error: Licht falsch");
+				else
+					setErrMsg(getErrMsg() + " / Licht falsch");
+
+				ret = false;
+			}
+		}
+
+		return ret;
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
+	}
+
+	public boolean parseShape(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:buoy_cardinal:shape")) {
+			str = keys.get("seamark:buoy_cardinal:shape");
+
+			if (str.compareTo("pillar") == 0)
+				setStyleIndex(CARD_PILLAR);
+			else if (str.compareTo("spar") == 0)
+				setStyleIndex(CARD_SPAR);
+			else if (str.compareTo("float") == 0)
+				setStyleIndex(CARD_FLOAT);
+			else
+				ret = false;
+		}
+		else if (keys.containsKey("seamark:beacon_cardinal:shape")) {
+			str = keys.get("seamark:beacon_cardinal:shape");
+
+			if (str.compareTo("stake") == 0)
+				setStyleIndex(CARD_BEACON);
+			else if (str.compareTo("tower") == 0)
+				setStyleIndex(CARD_TOWER);
+			else
+				ret = false;
+		}
+
+		return ret;
+	}
+
+	public boolean parseTopMark(Node node) {
+		return false;
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case CARD_PILLAR:
+			super.saveSign("buoy_cardinal");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_cardinal:shape", "pillar"));
+			break;
+		case CARD_SPAR:
+			super.saveSign("buoy_cardinal");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_cardinal:shape", "spar"));
+			break;
+		case CARD_BEACON:
+			super.saveSign("beacon_cardinal");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_cardinal:shape", "stake"));
+			break;
+		case CARD_TOWER:
+			super.saveSign("beacon_cardinal");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:beacon_cardinal:shape", "tower"));
+			break;
+		case CARD_FLOAT:
+			super.saveSign("buoy_cardinal");
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_cardinal:shape", "float"));
+			break;
+		default:
+		}
+		Main.main.undoRedo.add(new ChangePropertyCommand(node,
+				"seamark:buoy_cardinal:colour_pattern", "horizontal stripes"));
+
+		switch (getStyleIndex()) {
+		case CARD_PILLAR:
+		case CARD_SPAR:
+		case CARD_FLOAT:
+			switch (getBuoyIndex()) {
+			case SeaMark.CARD_NORTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "north"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "black;yellow"));
+				break;
+
+			case SeaMark.CARD_EAST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "east"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "black;yellow;black"));
+				break;
+
+			case SeaMark.CARD_SOUTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "south"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "yellow;black"));
+				break;
+
+			case SeaMark.CARD_WEST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:category", "west"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_cardinal:colour", "yellow;black;yellow"));
+				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"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "black;yellow"));
+				break;
+
+			case SeaMark.CARD_EAST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "east"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "black;yellow;black"));
+				break;
+
+			case SeaMark.CARD_SOUTH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "south"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "yellow;black"));
+				break;
+
+			case SeaMark.CARD_WEST:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:category", "west"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_cardinal:colour", "yellow;black;yellow"));
+				break;
+			}
+		}
+
+		saveLightData("white");
+
+	}
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 22527)
@@ -0,0 +1,227 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoyIsol extends Buoy {
+	public BuoyIsol(SmpDialogAction dia, int type) {
+		super(dia);
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+		dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Beacon");
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+		dlg.cbM01Kennung.addItem("Fl(2)");
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.addItem("W");
+		dlg.cbM01Colour.setSelectedIndex(0);
+		dlg.cbM01Colour.setEnabled(false);
+		dlg.cM01Fired.setSelected(false);
+		dlg.cM01TopMark.setSelected(true);
+		dlg.cM01TopMark.setEnabled(false);
+
+		setColour(SeaMark.BLACK_RED_BLACK);
+		setLightColour("W");
+		setBuoyIndex(type);
+		setTopMark(true);
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(false);
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Isolated_Danger_Pillar.png")));
+			break;
+		case ISOL_SPAR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Isolated_Danger_Spar.png")));
+			break;
+		case ISOL_BEACON:
+			if (isFired())
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Isolated_Danger_Beacon_Lit.png")));
+			else
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+						"/images/Isolated_Danger_Beacon.png")));
+			break;
+		default:
+		}
+
+		if (getLightChar() != "") {
+			String c;
+
+			c = getLightChar();
+
+			dlg.cbM01Kennung.setSelectedItem(c);
+			if (dlg.cbM01Kennung.getSelectedItem() == "Not set")
+				c = "";
+		}
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+		case ISOL_SPAR:
+			Checker("/images/Danger_Top_Buoy.png", "/images/Light_White.png");
+			break;
+		case ISOL_BEACON:
+			Checker("/images/Danger_Top_Post.png", "/images/Light_White.png");
+			break;
+		default:
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		super.saveSign("buoy_isolated_danger");
+
+		switch (getStyleIndex()) {
+		case ISOL_PILLAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "pillar"));
+			break;
+		case ISOL_SPAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "spar"));
+			break;
+		case ISOL_BEACON:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_isolated_danger:shape", "beacon"));
+			break;
+		default:
+		}
+		Main.main.undoRedo.add(new ChangePropertyCommand(node,
+				"seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes"));
+		Main.main.undoRedo.add(new ChangePropertyCommand(node,
+				"seamark:buoy_isolated_danger:colour", "black;red;black"));
+
+		saveTopMarkData("2 spheres", "black");
+
+		saveLightData("white");
+
+	}
+
+	public boolean parseTopMark(Node node) {
+		if (node == null) {
+			return false;
+		}
+
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setTopMark(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			if (str.compareTo("2 spheres") == 0) {
+				setTopMark(true);
+
+			} else {
+				setErrMsg("Parse-Error: Topmark invalid");
+				ret = false;
+			}
+		}
+
+		return ret;
+	}
+
+	public boolean parseLight(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setFired(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				String ce = c;
+
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.compareTo("white") == 0) {
+				setFired(true);
+				setLightColour("W");
+
+			} else {
+				if (getErrMsg() == null)
+					setErrMsg("Parse-Error: Licht falsch");
+				else
+					setErrMsg(getErrMsg() + " / Licht falsch");
+
+				ret = false;
+			}
+
+		}
+
+		return ret;
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
+	}
+
+	public boolean parseShape(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:buoy_isolated_danger:shape")) {
+			str = keys.get("seamark:buoy_isolated_danger:shape");
+
+			if (str.compareTo("pillar") == 0)
+				setStyleIndex(ISOL_PILLAR);
+			else if (str.compareTo("spar") == 0)
+				setStyleIndex(ISOL_SPAR);
+			else if (str.compareTo("beacon") == 0)
+				setStyleIndex(ISOL_BEACON);
+			else
+				ret = false;
+		}
+
+		return ret;
+	}
+
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 22527)
@@ -0,0 +1,1016 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoyLat extends Buoy {
+	public BuoyLat(SmpDialogAction dia, int type) {
+		super(dia);
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+		dlg.cbM01Kennung.addItem("Fl");
+		dlg.cbM01Kennung.addItem("Fl(2)");
+		dlg.cbM01Kennung.addItem("Fl(3)");
+		dlg.cbM01Kennung.addItem("Fl(4)");
+		dlg.cbM01Kennung.addItem("Fl(5)");
+		dlg.cbM01Kennung.addItem("Oc(2)");
+		dlg.cbM01Kennung.addItem("Oc(3)");
+		dlg.cbM01Kennung.addItem("Q");
+		dlg.cbM01Kennung.addItem("IQ");
+		dlg.cbM01Kennung.setSelectedIndex(0);
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.addItem("");
+		dlg.cbM01Colour.addItem("R");
+		dlg.cbM01Colour.addItem("G");
+		dlg.cbM01Colour.setSelectedIndex(0);
+		dlg.cbM01Colour.setEnabled(false);
+
+		setBuoyIndex(type);
+		setStyleIndex(0);
+		setLightColour();
+		setFired(false);
+		setTopMark(false);
+
+		refreshStyles();
+
+		paintSign();
+	}
+
+	public void refreshStyles() {
+		int type = getBuoyIndex();
+		int style = getStyleIndex();
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+
+		switch (type) {
+		case PORT_HAND:
+			dlg.cbM01StyleOfMark.addItem("Can Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			dlg.cbM01StyleOfMark.addItem("Float");
+			dlg.cbM01StyleOfMark.addItem("Perch");
+			break;
+
+		case STARBOARD_HAND:
+			dlg.cbM01StyleOfMark.addItem("Cone Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			dlg.cbM01StyleOfMark.addItem("Float");
+			dlg.cbM01StyleOfMark.addItem("Perch");
+			break;
+
+		case PREF_PORT_HAND:
+			dlg.cbM01StyleOfMark.addItem("Can Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			break;
+
+		case PREF_STARBOARD_HAND:
+			dlg.cbM01StyleOfMark.addItem("Cone Buoy");
+			dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+			dlg.cbM01StyleOfMark.addItem("Beacon");
+			dlg.cbM01StyleOfMark.addItem("Tower");
+			break;
+
+		default:
+		}
+
+		if (style >= dlg.cbM01StyleOfMark.getItemCount())
+			style = 0;
+		setStyleIndex(style);
+		dlg.cbM01StyleOfMark.setSelectedIndex(style);
+
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(true);
+
+		int cat = getBuoyIndex();
+		int region = getRegion();
+		int style = getStyleIndex();
+
+		switch (getBuoyIndex()) {
+		case SeaMark.PORT_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CAN:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Can_Red.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Red.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Red.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Red.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Red.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Red.png")));
+					break;
+				case LAT_FLOAT:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Float_Red.png")));
+					break;
+				case LAT_PERCH:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Perch_Port.png")));
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CAN:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Can_Green.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Green.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Green.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Green.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Green.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Green.png")));
+					break;
+				case LAT_FLOAT:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Float_Green.png")));
+					break;
+				case LAT_PERCH:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Perch_Port.png")));
+					break;
+				default:
+				}
+			break;
+
+		case SeaMark.STARBOARD_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CONE:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cone_Green.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Green.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Green.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Green.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Green.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Green.png")));
+					break;
+				case LAT_FLOAT:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Float_Green.png")));
+					break;
+				case LAT_PERCH:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Perch_Starboard.png")));
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CONE:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cone_Red.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Red.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Red.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Red.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Red.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Red.png")));
+					break;
+				case LAT_FLOAT:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Float_Red.png")));
+					break;
+				case LAT_PERCH:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Perch_Starboard.png")));
+					break;
+				default:
+				}
+			break;
+
+		case SeaMark.PREF_PORT_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CAN:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Can_Red_Green_Red.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Red_Green_Red.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Red_Green_Red.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Red_Green_Red.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Red_Green_Red.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Red_Green_Red.png")));
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CAN:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Can_Green_Red_Green.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Green_Red_Green.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Green_Red_Green.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Green_Red_Green.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Green_Red_Green.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Green_Red_Green.png")));
+					break;
+				default:
+				}
+			break;
+
+		case SeaMark.PREF_STARBOARD_HAND:
+			if (region != SeaMark.IALA_B)
+				switch (style) {
+				case LAT_CONE:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cone_Green_Red_Green.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Green_Red_Green.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Green_Red_Green.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Lit_Green_Red_Green.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Green_Red_Green.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Green_Red_Green.png")));
+					break;
+				default:
+				}
+			else
+				switch (style) {
+				case LAT_CONE:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Cone_Red_Green_Red.png")));
+					break;
+				case LAT_PILLAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Pillar_Red_Green_Red.png")));
+					break;
+				case LAT_SPAR:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Spar_Red_Green_Red.png")));
+					break;
+				case LAT_BEACON:
+					if (isFired())
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Li_Red_Green_Red.png")));
+					else
+						dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+								"/images/Lateral_Beacon_Red_Green_Red.png")));
+					break;
+				case LAT_TOWER:
+					dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+							"/images/Lateral_Tower_Red_Green_Red.png")));
+					break;
+				default:
+				}
+			break;
+
+		default:
+		}
+
+		if (getLightChar() != "") {
+			String c;
+
+			c = getLightChar();
+			if (getLightGroup() != "")
+				c = c + "(" + getLightGroup() + ")";
+
+			dlg.cbM01Kennung.setSelectedItem(c);
+			if (dlg.cbM01Kennung.getSelectedItem() == "Not set")
+				c = "";
+		}
+
+		if (cat == PORT_HAND || cat == PREF_PORT_HAND)
+			switch (style) {
+			case LAT_CAN:
+				if (region != SeaMark.IALA_B)
+					Checker("/images/Can_Top_Can_Red.png", "/images/Light_Red.png");
+				else
+					Checker("/images/Can_Top_Can_Green.png", "/images/Light_Green.png");
+				break;
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				if (region != SeaMark.IALA_B)
+					Checker("/images/Can_Top_Buoy_Red.png", "/images/Light_Red.png");
+				else
+					Checker("/images/Can_Top_Buoy_Green.png", "/images/Light_Green.png");
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+			case LAT_FLOAT:
+				if (region != SeaMark.IALA_B)
+					Checker("/images/Can_Top_Post_Red.png", "/images/Light_Red.png");
+				else
+					Checker("/images/Can_Top_Post_Green.png", "/images/Light_Green.png");
+				break;
+			default:
+			}
+		else
+			switch (style) {
+			case LAT_CONE:
+				if (region != SeaMark.IALA_B)
+					Checker("/images/Cone_Top_Cone_Green.png", "/images/Light_Green.png");
+				else
+					Checker("/images/Cone_Top_Cone_Red.png", "/images/Light_Red.png");
+				break;
+			case LAT_PILLAR:
+			case LAT_SPAR:
+				if (region != SeaMark.IALA_B)
+					Checker("/images/Cone_Top_Buoy_Green.png", "/images/Light_Green.png");
+				else
+					Checker("/images/Cone_Top_Buoy_Red.png", "/images/Light_Red.png");
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+			case LAT_FLOAT:
+				if (region != SeaMark.IALA_B)
+					Checker("/images/Cone_Top_Post_Green.png", "/images/Light_Green.png");
+				else
+					Checker("/images/Cone_Top_Post_Red.png", "/images/Light_Red.png");
+				break;
+			default:
+			}
+
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		int cat = getBuoyIndex();
+		String shape = "";
+		String colour = "";
+
+		switch (cat) {
+
+		case PORT_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "can"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "beacon"));
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "float"));
+				break;
+			case LAT_PERCH:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "perch"));
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+			case LAT_FLOAT:
+			case LAT_PERCH:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "port"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green"));
+					colour = "green";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "port"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green"));
+					colour = "green";
+				}
+				break;
+			}
+			shape = "cylinder";
+			break;
+
+		case PREF_PORT_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "can"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "beacon"));
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "float"));
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "preferred_channel_port"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red;green;red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green;red;green"));
+					colour = "green";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "preferred_channel_port"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red;green;red"));
+					colour = "red";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green;red;green"));
+					colour = "green";
+				}
+				break;
+			}
+			shape = "cylinder";
+			break;
+
+		case STARBOARD_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CONE:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "cone"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "beacon"));
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "tower"));
+				break;
+			case LAT_FLOAT:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "float"));
+				break;
+			case LAT_PERCH:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "perch"));
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "starboard"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red"));
+					colour = "red";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "starboard"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red"));
+					colour = "red";
+				}
+				break;
+			}
+			shape = "cone, point up";
+			break;
+
+		case PREF_STARBOARD_HAND:
+			switch (getStyleIndex()) {
+			case LAT_CONE:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "cone"));
+				break;
+			case LAT_PILLAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "pillar"));
+				break;
+			case LAT_SPAR:
+				super.saveSign("buoy_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "spar"));
+				break;
+			case LAT_BEACON:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "beacon"));
+				break;
+			case LAT_TOWER:
+				super.saveSign("beacon_lateral");
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:shape", "tower"));
+				break;
+			default:
+			}
+			switch (getStyleIndex()) {
+			case LAT_CAN:
+			case LAT_PILLAR:
+			case LAT_SPAR:
+			case LAT_FLOAT:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:category", "preferred_channel_starboard"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:buoy_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "green;red;green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:buoy_lateral:colour", "red;green;red"));
+					colour = "red";
+				}
+				break;
+			case LAT_BEACON:
+			case LAT_TOWER:
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:category", "preferred_channel_starboard"));
+				Main.main.undoRedo.add(new ChangePropertyCommand(node,
+						"seamark:beacon_lateral:colour_pattern", "horizontal stripes"));
+				if (getRegion() != SeaMark.IALA_B) {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "green;red;green"));
+					colour = "green";
+				} else {
+					Main.main.undoRedo.add(new ChangePropertyCommand(node,
+							"seamark:beacon_lateral:colour", "red;green;red"));
+					colour = "red";
+				}
+				break;
+			}
+			shape = "cone, point up";
+			break;
+
+		default:
+		}
+
+		saveTopMarkData(shape, colour);
+
+		saveLightData(colour);
+	}
+
+	public boolean parseTopMark(Node node) {
+		if (node == null) {
+			return false;
+		}
+
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			int cat = getBuoyIndex();
+			switch (cat) {
+			case PORT_HAND:
+			case PREF_PORT_HAND:
+				if (str.compareTo("cylinder") == 0) {
+					setTopMark(true);
+
+				} else {
+					setTopMark(false);
+					ret = false;
+				}
+				break;
+
+			case STARBOARD_HAND:
+			case PREF_STARBOARD_HAND:
+				if (str.compareTo("cone, point up") == 0 || str.compareTo("cone") == 0) {
+					setTopMark(true);
+
+				} else {
+					setTopMark(false);
+					ret = false;
+				}
+				break;
+
+			default:
+				ret = false;
+			}
+
+			if (!hasTopMark()) {
+				setErrMsg("Parse-Error: Topmark falsch");
+				ret = false;
+			}
+
+		}
+
+		return ret;
+	}
+
+	public boolean parseLight(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setFired(false);
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				String ce = c;
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			setLightColour(str);
+
+			if (isFired()) {
+			} else {
+				if (getErrMsg() == null)
+					setErrMsg("Parse-Error: Befeuerung falsch");
+				else
+					setErrMsg(getErrMsg() + " / Befeuerung falsch");
+			}
+
+		}
+
+		return ret;
+	}
+
+	public void setLightColour() {
+		if (getRegion() != IALA_B
+				&& (getBuoyIndex() == PORT_HAND || getBuoyIndex() == PREF_PORT_HAND)) {
+			super.setLightColour("R");
+			dlg.cbM01Colour.setSelectedIndex(RED_LIGHT);
+		} else {
+			super.setLightColour("G");
+			dlg.cbM01Colour.setSelectedIndex(GREEN_LIGHT);
+		}
+	}
+
+	public void setLightColour(String str) {
+		int cat = getBuoyIndex();
+
+		if (str == null) {
+			return;
+		}
+
+		switch (cat) {
+		case PORT_HAND:
+		case PREF_PORT_HAND:
+			if (str.compareTo("red") == 0) {
+
+				setFired(true);
+				super.setLightColour("R");
+			} else {
+				super.setLightColour("");
+			}
+
+			break;
+
+		case STARBOARD_HAND:
+		case PREF_STARBOARD_HAND:
+			if (str.compareTo("green") == 0) {
+				setFired(true);
+				super.setLightColour("G");
+			} else {
+				super.setLightColour("");
+			}
+			break;
+
+		default:
+		}
+
+	}
+
+	public boolean parseShape(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:buoy_lateral:shape")) {
+			str = keys.get("seamark:buoy_lateral:shape");
+
+			int cat = getBuoyIndex();
+			switch (cat) {
+			case PORT_HAND:
+				if (str.compareTo("can") == 0)
+					setStyleIndex(LAT_CAN);
+				else if (str.compareTo("pillar") == 0)
+					setStyleIndex(LAT_PILLAR);
+				else if (str.compareTo("spar") == 0)
+					setStyleIndex(LAT_SPAR);
+				else if (str.compareTo("float") == 0)
+					setStyleIndex(LAT_FLOAT);
+				else if (str.compareTo("perch") == 0)
+					setStyleIndex(LAT_PERCH);
+				else
+					ret = false;
+				break;
+
+			case PREF_PORT_HAND:
+				if (str.compareTo("can") == 0)
+					setStyleIndex(LAT_CAN);
+				else if (str.compareTo("pillar") == 0)
+					setStyleIndex(LAT_PILLAR);
+				else if (str.compareTo("spar") == 0)
+					setStyleIndex(LAT_SPAR);
+				else
+					ret = false;
+				break;
+
+			case STARBOARD_HAND:
+				if (str.compareTo("cone") == 0)
+					setStyleIndex(LAT_CONE);
+				else if (str.compareTo("pillar") == 0)
+					setStyleIndex(LAT_PILLAR);
+				else if (str.compareTo("spar") == 0)
+					setStyleIndex(LAT_SPAR);
+				else if (str.compareTo("float") == 0)
+					setStyleIndex(LAT_FLOAT);
+				else if (str.compareTo("perch") == 0)
+					setStyleIndex(LAT_PERCH);
+				else
+					ret = false;
+				break;
+
+			case PREF_STARBOARD_HAND:
+				if (str.compareTo("cone") == 0)
+					setStyleIndex(LAT_CONE);
+				else if (str.compareTo("pillar") == 0)
+					setStyleIndex(LAT_PILLAR);
+				else if (str.compareTo("spar") == 0)
+					setStyleIndex(LAT_SPAR);
+				else
+					ret = false;
+				break;
+
+			default:
+				ret = false;
+			}
+		} else if (keys.containsKey("seamark:beacon_lateral:shape")) {
+			str = keys.get("seamark:beacon_lateral:shape");
+
+			int cat = getBuoyIndex();
+			switch (cat) {
+			case PORT_HAND:
+				if (str.compareTo("beacon") == 0)
+					setStyleIndex(LAT_BEACON);
+				else if (str.compareTo("tower") == 0)
+					setStyleIndex(LAT_TOWER);
+				else
+					ret = false;
+				break;
+
+			case PREF_PORT_HAND:
+				if (str.compareTo("beacon") == 0)
+					setStyleIndex(LAT_BEACON);
+				else if (str.compareTo("tower") == 0)
+					setStyleIndex(LAT_TOWER);
+				else
+					ret = false;
+				break;
+
+			case STARBOARD_HAND:
+				if (str.compareTo("beacon") == 0)
+					setStyleIndex(LAT_BEACON);
+				else if (str.compareTo("tower") == 0)
+					setStyleIndex(LAT_TOWER);
+				else
+					ret = false;
+				break;
+
+			case PREF_STARBOARD_HAND:
+				if (str.compareTo("beacon") == 0)
+					setStyleIndex(LAT_BEACON);
+				else if (str.compareTo("tower") == 0)
+					setStyleIndex(LAT_TOWER);
+				else
+					ret = false;
+				break;
+
+			default:
+				ret = false;
+			}
+		}
+		return ret;
+	}
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java	(revision 22527)
@@ -0,0 +1,160 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoyNota extends Buoy {
+	public BuoyNota(SmpDialogAction dia, int type) {
+		super(dia);
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+		dlg.cbM01Kennung.addItem("Fl");
+		dlg.cbM01Kennung.addItem("Fl(2)");
+		dlg.cbM01Kennung.addItem("Fl(3)");
+		dlg.cbM01Kennung.addItem("Fl(4)");
+		dlg.cbM01Kennung.addItem("Fl(5)");
+		dlg.cbM01Kennung.addItem("Oc(2)");
+		dlg.cbM01Kennung.addItem("Oc(3)");
+		dlg.cbM01Kennung.addItem("Q");
+		dlg.cbM01Kennung.addItem("IQ");
+		dlg.cbM01Kennung.setSelectedIndex(0);
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.addItem("Not set");
+		dlg.cbM01Colour.addItem("R");
+		dlg.cbM01Colour.addItem("G");
+		dlg.cbM01Colour.addItem("W");
+		dlg.cbM01Colour.setEnabled(true);
+
+		setBuoyIndex(type);
+		setStyleIndex(0);
+		setLightColour();
+
+		setFired(true);
+		setTopMark(false);
+		refreshStyles();
+		paintSign();
+	}
+
+	public void refreshStyles() {
+		int type = getBuoyIndex();
+		int style = getStyleIndex();
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+		dlg.cbM01StyleOfMark.addItem("Major Light");
+		dlg.cbM01StyleOfMark.addItem("Minor Light");
+
+		if (style >= dlg.cbM01StyleOfMark.getItemCount())
+			style = 0;
+		setStyleIndex(style);
+		dlg.cbM01StyleOfMark.setSelectedIndex(style);
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setSelected(true);
+		dlg.cM01Fired.setEnabled(false);
+		dlg.cM01TopMark.setEnabled(false);
+		dlg.cM01TopMark.setSelected(false);
+
+
+		switch (getStyleIndex()) {
+		case SeaMark.LIGHT_MAJOR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Light_Major.png")));
+			break;
+
+		case SeaMark.LIGHT_MINOR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Light_Minor.png")));
+			break;
+
+		default:
+		}
+
+		if (getLightColour() == "W")
+			dlg.lM01Icon03.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Light_White.png")));
+		else if (getLightColour() == "R")
+			dlg.lM01Icon03.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Light_Red.png")));
+		else if (getLightColour() == "G")
+			dlg.lM01Icon03.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Light_Green.png")));
+
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		switch (getStyleIndex()) {
+		case LIGHT_MAJOR:
+			super.saveSign("major_light");
+			break;
+		case LIGHT_MINOR:
+			super.saveSign("minor_light");
+			break;
+		default:
+		}
+
+		saveLightData("white");
+	}
+
+	public void setLightColour() {
+	}
+
+	public boolean parseTopMark(Node node) {
+		return false;
+	}
+
+	public boolean parseLight(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setFired(true);
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				String ce = c;
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			setLightColour(str);
+
+		}
+
+		return ret;
+	}
+
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 22527)
@@ -0,0 +1,238 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoySaw extends Buoy {
+	public BuoySaw(SmpDialogAction dia, int type) {
+		super(dia);
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+		dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Sphere Buoy");
+		dlg.cbM01StyleOfMark.addItem("Float");
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+		dlg.cbM01Kennung.addItem("Iso");
+		dlg.cbM01Kennung.addItem("Oc");
+		dlg.cbM01Kennung.addItem("LFl");
+		dlg.cbM01Kennung.addItem("Mo()");
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.addItem("W");
+		dlg.cbM01Colour.setSelectedIndex(0);
+		dlg.cbM01Colour.setEnabled(false);
+		dlg.cM01Fired.setSelected(false);
+		dlg.cM01TopMark.setSelected(false);
+
+		setColour(SeaMark.RED_WHITE);
+		setLightColour("W");
+		setBuoyIndex(type);
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(true);
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Safe_Water_Pillar.png")));
+			break;
+		case SAFE_SPAR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Safe_Water_Spar.png")));
+			break;
+		case SAFE_SPHERE:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Safe_Water_Sphere.png")));
+			break;
+		case SAFE_FLOAT:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Safe_Water_Float.png")));
+			break;
+		default:
+		}
+
+		if (getLightChar() != "") {
+			String c;
+
+			c = getLightChar();
+
+			dlg.cbM01Kennung.setSelectedItem(c);
+			if (dlg.cbM01Kennung.getSelectedItem() == "Not set")
+				c = "";
+		}
+		
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+		case SAFE_SPAR:
+			Checker("/images/Sphere_Top_Buoy_Red.png", "/images/Light_White.png");
+			break;
+		case SAFE_SPHERE:
+			Checker("/images/Sphere_Top_Sphere_Red.png", "/images/Light_White.png");
+			break;
+		case SAFE_FLOAT:
+			Checker("/images/Sphere_Top_Post_Red.png", "/images/Light_White.png");
+			break;
+		default:
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		super.saveSign("buoy_safewater");
+
+		switch (getStyleIndex()) {
+		case SAFE_PILLAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safewater:shape", "pillar"));
+			break;
+		case SAFE_SPAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safewater:shape", "spar"));
+			break;
+		case SAFE_SPHERE:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safewater:shape", "sphere"));
+			break;
+		case SAFE_FLOAT:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_safewater:shape", "float"));
+			break;
+		default:
+		}
+		Main.main.undoRedo.add(new ChangePropertyCommand(node,
+				"seamark:buoy_safewater:colour_pattern", "vertical stripes"));
+		Main.main.undoRedo.add(new ChangePropertyCommand(node,
+				"seamark:buoy_safewater:colour", "red;white"));
+
+		saveTopMarkData("spherical", "red");
+
+		saveLightData("white");
+
+	}
+
+	public boolean parseTopMark(Node node) {
+		if (node == null) {
+			return false;
+		}
+
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setTopMark(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			if (str.compareTo("spherical") == 0 || str.compareTo("sphere") == 0) {
+				setTopMark(true);
+
+			} else {
+				setErrMsg("Parse-Error: Topmark unbekannt");
+				ret = false;
+			}
+		}
+
+		return ret;
+	}
+
+	public boolean parseLight(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setFired(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				String ce = c;
+
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.compareTo("white") == 0) {
+				setFired(true);
+				setLightColour("W");
+
+			} else {
+				if (getErrMsg() == null)
+					setErrMsg("Parse-Error: Licht falsch");
+				else
+					setErrMsg(getErrMsg() + " / Licht falsch");
+
+				ret = false;
+			}
+
+		}
+
+		return ret;
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
+	}
+
+	public boolean parseShape(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:buoy_safewater:shape")) {
+			str = keys.get("seamark:buoy_safewater:shape");
+			
+			if (str.compareTo("pillar") == 0)
+				setStyleIndex(SAFE_PILLAR);
+			else if (str.compareTo("spar") == 0)
+				setStyleIndex(SAFE_SPAR);
+			else if (str.compareTo("sphere") == 0)
+				setStyleIndex(SAFE_SPHERE);
+			else if (str.compareTo("float") == 0)
+				setStyleIndex(SAFE_FLOAT);
+			else
+				ret = false;
+		}
+
+		return ret;
+	}
+
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 22527)
@@ -0,0 +1,242 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import java.util.Map;
+
+import javax.swing.ImageIcon;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoySpec extends Buoy {
+	public BuoySpec(SmpDialogAction dia, int type) {
+		super(dia);
+
+		dlg.cbM01StyleOfMark.removeAllItems();
+		dlg.cbM01StyleOfMark.addItem("Not set");
+		dlg.cbM01StyleOfMark.addItem("Pillar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Spar Buoy");
+		dlg.cbM01StyleOfMark.addItem("Beacon Buoy");
+		dlg.cbM01StyleOfMark.addItem("Sphere Buoy");
+		dlg.cbM01StyleOfMark.addItem("Barrel");
+
+		dlg.cbM01Kennung.removeAllItems();
+		dlg.cbM01Kennung.addItem("Not set");
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.addItem("W");
+		dlg.cbM01Colour.setSelectedIndex(0);
+		dlg.cbM01Colour.setEnabled(false);
+		dlg.cM01Fired.setSelected(false);
+		dlg.cM01TopMark.setSelected(false);
+
+		setColour(SeaMark.YELLOW);
+		setLightColour("W");
+		setBuoyIndex(type);
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		dlg.sM01StatusBar.setText(getErrMsg());
+
+		dlg.tfM01Name.setEnabled(true);
+		dlg.tfM01Name.setText(getName());
+		dlg.cM01Fired.setEnabled(true);
+		dlg.cM01TopMark.setEnabled(true);
+
+		switch (getStyleIndex()) {
+		case SPEC_PILLAR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Special_Purpose_Pillar.png")));
+			break;
+		case SPEC_SPAR:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Special_Purpose_Spar.png")));
+			break;
+		case SPEC_BEACON:
+			if (isFired())
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Special_Purpose_Beacon_Lit.png")));
+			else
+				dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+				"/images/Special_Purpose_Beacon.png")));
+			break;
+		case SPEC_SPHERE:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Special_Purpose_Sphere.png")));
+			break;
+		case SPEC_BARREL:
+			dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(
+					"/images/Special_Purpose_Barrel.png")));
+			break;
+		default:
+		}
+
+		if (getLightChar() != "") {
+			String c;
+
+			c = getLightChar();
+
+			dlg.cbM01Kennung.setSelectedItem(c);
+			if (dlg.cbM01Kennung.getSelectedItem() == "Not set")
+				c = "";
+		}
+		
+		switch (getStyleIndex()) {
+		case SPEC_PILLAR:
+		case SPEC_SPAR:
+			Checker("/images/Cross_Top_Buoy_Yellow.png", "/images/Light_White.png");
+			break;
+		case SPEC_BEACON:
+			Checker("/images/Cross_Top_Post_Yellow.png", "/images/Light_White.png");
+			break;
+		case SPEC_SPHERE:
+		case SPEC_BARREL:
+			Checker("/images/Cross_Top_Sphere_Yellow.png", "/images/Light_White.png");
+			break;
+		default:
+		}
+	}
+
+	public void saveSign() {
+		Node node = getNode();
+
+		if (node == null) {
+			return;
+		}
+
+		super.saveSign("buoy_special_purpose");
+
+		switch (getStyleIndex()) {
+		case SPEC_PILLAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "pillar"));
+			break;
+		case SPEC_SPAR:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "spar"));
+			break;
+		case SPEC_SPHERE:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "sphere"));
+			break;
+		case SPEC_BARREL:
+			Main.main.undoRedo.add(new ChangePropertyCommand(node,
+					"seamark:buoy_special_purpose:shape", "barrel"));
+			break;
+		default:
+		}
+		Main.main.undoRedo.add(new ChangePropertyCommand(node,
+				"seamark:buoy_special_purpose:colour", "yellow"));
+
+		saveTopMarkData("cross", "yellow");
+
+		saveLightData("white");
+
+	}
+
+	public boolean parseTopMark(Node node) {
+		if (node == null) {
+			return false;
+		}
+
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setTopMark(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:topmark:shape")) {
+			str = keys.get("seamark:topmark:shape");
+
+			if (str.compareTo("cross") == 0) {
+				setTopMark(true);
+
+			} else {
+				setErrMsg("Parse-Error: Topmark unbekannt");
+				ret = false;
+			}
+		}
+
+		return ret;
+	}
+
+	public boolean parseLight(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		setFired(false);
+
+		keys = node.getKeys();
+		if (keys.containsKey("seamark:light:colour")) {
+			str = keys.get("seamark:light:colour");
+
+			if (keys.containsKey("seamark:light:character")) {
+				setLightGroup(keys);
+
+				String c = keys.get("seamark:light:character");
+				String ce = c;
+
+				setLightChar(c);
+				setLightPeriod(keys);
+			}
+
+			if (str.compareTo("white") == 0) {
+				setFired(true);
+				setLightColour("W");
+
+			} else {
+				if (getErrMsg() == null)
+					setErrMsg("Parse-Error: Licht falsch");
+				else
+					setErrMsg(getErrMsg() + " / Licht falsch");
+
+				ret = false;
+			}
+
+		}
+
+		return ret;
+	}
+
+	public void setLightColour() {
+		super.setLightColour("W");
+	}
+
+	public boolean parseShape(Node node) {
+		String str;
+		boolean ret = true;
+		Map<String, String> keys;
+
+		keys = node.getKeys();
+
+		if (keys.containsKey("seamark:buoy_special_purpose:shape")) {
+			str = keys.get("seamark:buoy_special_purpose:shape");
+			
+			if (str.compareTo("pillar") == 0)
+				setStyleIndex(SPEC_PILLAR);
+			else if (str.compareTo("spar") == 0)
+				setStyleIndex(SPEC_SPAR);
+			else if (str.compareTo("sphere") == 0)
+				setStyleIndex(SPEC_SPHERE);
+			else if (str.compareTo("barrel") == 0)
+				setStyleIndex(SPEC_BARREL);
+			else
+				ret = false;
+		}
+
+		return ret;
+	}
+
+}
Index: /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java
===================================================================
--- /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 22527)
+++ /applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 22527)
@@ -0,0 +1,73 @@
+//License: GPL. For details, see LICENSE file.
+// Copyright (c) 2009 / 2010 by Werner Koenig & Malcolm Herring
+
+package toms.seamarks.buoys;
+
+import org.openstreetmap.josm.data.osm.Node;
+
+import toms.dialogs.SmpDialogAction;
+import toms.seamarks.SeaMark;
+
+public class BuoyUkn extends Buoy {
+	public BuoyUkn(SmpDialogAction dia, String Msg) {
+		super(dia);
+
+		setBuoyIndex(0);
+		if (dlg.cbM01Kennung != null) {
+			dlg.cbM01Kennung.removeAllItems();
+			dlg.cbM01Kennung.addItem("Not set");
+		}
+
+		dlg.cbM01Colour.removeAllItems();
+		dlg.cbM01Colour.setEnabled(false);
+		dlg.cM01Fired.setSelected(false);
+		dlg.cM01TopMark.setSelected(false);
+
+		setErrMsg(Msg);
+		setName("");
+		setTopMark(false);
+		setFired(false);
+		setValid(false);
+
+		paintSign();
+	}
+
+	public void paintSign() {
+		super.paintSign();
+
+		if (dlg.lM01Icon01 != null)
+			dlg.lM01Icon01.setIcon(null);
+		if (dlg.lM01Icon02 != null)
+			dlg.lM01Icon02.setIcon(null);
+		if (dlg.lM01Icon03 != null)
+			dlg.lM01Icon03.setIcon(null);
+		if (getErrMsg() != null)
+			dlg.sM01StatusBar.setText(getErrMsg());
+
+		setErrMsg(null);
+
+		dlg.tfM01Name.setText(getName());
+		dlg.tfM01Name.setEnabled(false);
+
+		dlg.cM01Fired.setEnabled(false);
+		dlg.cM01TopMark.setEnabled(false);
+
+		dlg.bM01Save.setEnabled(false);
+
+	}
+
+	public void setLightColour() {
+		super.setLightColour("");
+	}
+
+	public boolean parseTopMark(Node node) {
+		return false;
+	}
+
+	public boolean parseLight(Node node) {
+		return false;
+	}
+
+	public void saveSign() {
+	}
+}
