Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java	(revision 27026)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java	(revision 27027)
@@ -37,11 +37,4 @@
 	private ActionListener alCharButton = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			if (noneButton.isSelected()) {
-				if (dlg.panelMain.panelLit.panelCol.delButton.isSelected()) {
-					dlg.panelMain.lightIcon.setIcon(null);
-				}
-			} else {
-				dlg.panelMain.lightIcon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Green_120.png")));
-			}
 			JToggleButton source = (JToggleButton) e.getSource();
 			EnumSet<Chr> combo = EnumSet.noneOf(Chr.class);
@@ -71,4 +64,5 @@
 				}
 			}
+			dlg.mark.setLightAtt(Att.CHR, 0, charBox.getText());
 		}
 	};
@@ -76,4 +70,5 @@
 		public void actionPerformed(java.awt.event.ActionEvent e) {
 			String str = charBox.getText();
+			dlg.mark.setLightAtt(Att.CHR, 0, str);
 			EnumSet<Chr> set = EnumSet.noneOf(Chr.class);
 			for (EnumSet<Chr> map : SeaMark.ChrMAP.keySet()) {
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java	(revision 27026)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java	(revision 27027)
@@ -42,5 +42,5 @@
 					if (dlg.mark != null) {
 						if (ent == Ent.LIGHT) {
-							dlg.mark.setLightAtt(Att.COL, col);
+							dlg.mark.setLightAtt(Att.COL, 0, col);
 							button.setBorderPainted(true);
 						} else {
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java	(revision 27026)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java	(revision 27027)
@@ -21,5 +21,5 @@
 	private ActionListener alGroup = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			dlg.mark.setLightAtt(Att.GRP, groupBox.getText());
+			dlg.mark.setLightAtt(Att.GRP, 0, groupBox.getText());
 		}
 	};
@@ -28,5 +28,5 @@
 	private ActionListener alPeriod = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			dlg.mark.setLightAtt(Att.PER, periodBox.getText());
+			dlg.mark.setLightAtt(Att.PER, 0, periodBox.getText());
 		}
 	};
@@ -35,5 +35,5 @@
 	private ActionListener alSequence = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			dlg.mark.setLightAtt(Att.SEQ, sequenceBox.getText());
+			dlg.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText());
 		}
 	};
@@ -46,5 +46,5 @@
 				int idx = visibilities.get(vis);
 				if (idx == visibilityBox.getSelectedIndex())
-					dlg.mark.setLightAtt(Att.VIS, vis);
+					dlg.mark.setLightAtt(Att.VIS, 0, vis);
 			}
 		}
@@ -54,5 +54,5 @@
 	private ActionListener alHeight = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			dlg.mark.setLightAtt(Att.HGT, heightBox.getText());
+			dlg.mark.setLightAtt(Att.HGT, 0, heightBox.getText());
 		}
 	};
@@ -61,5 +61,5 @@
 	private ActionListener alRange = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			dlg.mark.setLightAtt(Att.RNG, rangeBox.getText());
+			dlg.mark.setLightAtt(Att.RNG, 0, rangeBox.getText());
 		}
 	};
@@ -68,5 +68,5 @@
 	private ActionListener alOrientation = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			dlg.mark.setLightAtt(Att.ORT, orientationBox.getText());
+			dlg.mark.setLightAtt(Att.ORT, 0, orientationBox.getText());
 		}
 	};
@@ -79,5 +79,5 @@
 				int idx = categories.get(lit);
 				if (idx == categoryBox.getSelectedIndex())
-					dlg.mark.setLightAtt(Att.LIT, lit);
+					dlg.mark.setLightAtt(Att.LIT, 0, lit);
 			}
 		}
@@ -91,5 +91,5 @@
 				int idx = exhibitions.get(exh);
 				if (idx == exhibitionBox.getSelectedIndex())
-					dlg.mark.setLightAtt(Att.EXH, exh);
+					dlg.mark.setLightAtt(Att.EXH, 0, exh);
 			}
 		}
@@ -106,8 +106,5 @@
 					panelSector = new PanelSectors(dlg);
 				}
-//				if (panelSector.getSectorCount() == 0) {
-//					panelSector.addSector(1);
-//					dlg.mark.setSectored(true);
-//				}
+				dlg.mark.setSectored(true);
 				panelSector.setVisible(true);
 			} else {
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27026)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27027)
@@ -3,11 +3,11 @@
 import java.awt.*;
 import java.awt.event.*;
+import java.util.EnumMap;
 
 import javax.swing.*;
 import javax.swing.table.*;
 
+import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
-import oseam.seamarks.*;
-import oseam.seamarks.SeaMark.Att;
 import oseam.seamarks.SeaMark.*;
 
@@ -22,5 +22,6 @@
 	private ActionListener alMinusButton = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			deleteSector(0);
+			if ((getSectorCount() > 1) && (table.getSelectedRow() != 0))
+				deleteSector(table.getSelectedRow());
 		}
 	};
@@ -28,16 +29,21 @@
 	private ActionListener alPlusButton = new ActionListener() {
 		public void actionPerformed(java.awt.event.ActionEvent e) {
-			addSector(0);
+			if (table.getSelectedRow() < 0)
+				addSector(table.getRowCount());
+			else
+				addSector(table.getSelectedRow()+1);
 		}
 	};
+	public JComboBox visibilityBox;
+	public EnumMap<Vis, String> visibilities = new EnumMap<Vis, String>(Vis.class);
 
 	public PanelSectors(OSeaMAction dia) {
 		super("Sector Table");
 		dlg = dia;
-		this.setSize(700, 100);
+		this.setSize(800, 100);
 		this.setVisible(true);
 		this.setAlwaysOnTop(true);
 		this.setLocation(450, 0);
-		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+		this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
 		this.setLayout(null);
 		minusButton = new JButton(new ImageIcon(getClass().getResource("/images/MinusButton.png")));
@@ -50,15 +56,24 @@
 		this.add(plusButton);
 		panel = new JPanel(new BorderLayout());
-		panel.setBounds(40, 0, 660, 512);
+		panel.setBounds(40, 0, 760, 512);
 		model = new SectorTable();
 		table = new JTable(model);
-		table.setBounds(0, 0, 660, 34);
+		table.setBounds(0, 0, 760, 34);
 		panel.add(new JScrollPane(table));
 		this.getContentPane().add(panel);
+		
+		TableColumn visColumn = table.getColumnModel().getColumn(11);
+		visibilityBox = new JComboBox();
+		addVisibItem(Messages.getString("NoneSpecified"), Vis.UNKNOWN);
+		addVisibItem(Messages.getString("Intensified"), Vis.INTEN);
+		addVisibItem(Messages.getString("Unintensified"), Vis.UNINTEN);
+		addVisibItem(Messages.getString("PartiallyObscured"), Vis.PARTOBS);
+		visColumn.setCellEditor(new DefaultCellEditor(visibilityBox));
 	}
 
 	private class SectorTable extends AbstractTableModel {
 
-		private String[] headings = { "Sector", "Colour", "Character", "Group", "Sequence", "Period", "Height", "Range", "Visibility", "Start", "End", "Radius" };
+		private String[] headings = { "Sector", "Colour", "Character", "Group", "Sequence", "Period",
+				"Start", "End", "Radius", "Height", "Range", "Visibility", "Exhibition", "Category" };
 
 		public SectorTable() {
@@ -78,5 +93,5 @@
 
 		public boolean isCellEditable(int row, int col) {
-			return (col > 0);
+			return ((col > 0) && (row > 0));
 		}
 
@@ -84,7 +99,11 @@
 			switch (col) {
 			case 1:
-				return Col.class;
-			case 7:
+				return Color.class;
+			case 11:
 				return Vis.class;
+			case 12:
+				return Exh.class;
+			case 13:
+				return Lit.class;
 			default:
 				return String.class;
@@ -93,9 +112,31 @@
 
 		public Object getValueAt(int row, int col) {
-			return dlg.mark.getLightAtt(col, row);
+			if (col == 0)
+				return row;
+			else
+				return dlg.mark.getLightAtt(col-1, row);
 		}
 
 		public void setValueAt(Object value, int row, int col) {
-			dlg.mark.setLightAtt(col, row, value);
+			switch (col) {
+			case 4:
+			case 5:
+			case 6:
+			case 7:
+			case 8:
+			case 9:
+			case 13:
+				dlg.mark.setLightAtt(col-1, row, dlg.mark.validDecimal((String)value));
+				break;
+			case 11:
+				for (Vis vis : visibilities.keySet()) {
+					String str = visibilities.get(vis);
+					if (str.equals(value))
+						dlg.mark.setLightAtt(Att.VIS, row, vis);
+				}
+				break;
+			default:
+				dlg.mark.setLightAtt(col-1, row, value);
+			}
 		}
 	}
@@ -106,22 +147,27 @@
 
 	public void addSector(int idx) {
-		dlg.mark.addLightAtt(Att.COL, Col.UNKNOWN);
-		table.setSize(660, ((table.getRowCount() * 16) + 18));
+		dlg.mark.addLight(idx);
+		table.setSize(760, ((table.getRowCount() * 16) + 18));
 		if (table.getRowCount() > 3) {
-			this.setSize(700, ((table.getRowCount() * 16) + 40));
+			this.setSize(800, ((table.getRowCount() * 16) + 40));
 		} else {
-			this.setSize(700, 100);
+			this.setSize(800, 100);
 		}
 	}
 
 	public void deleteSector(int idx) {
-		dlg.mark.subLightAtt(Att.COL, 0);
-		table.setSize(660, ((table.getRowCount() * 16) + 18));
+		dlg.mark.subLight(idx);
+		table.setSize(760, ((table.getRowCount() * 16) + 18));
 		if (table.getRowCount() > 3) {
-			this.setSize(700, ((table.getRowCount() * 16) + 40));
+			this.setSize(800, ((table.getRowCount() * 16) + 40));
 		} else {
-			this.setSize(700, 100);
+			this.setSize(800, 100);
 		}
 	}
 
+	private void addVisibItem(String str, Vis vis) {
+		visibilities.put(vis, str);
+		visibilityBox.addItem(str);
+	}
+
 }
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27026)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27027)
@@ -291,8 +291,9 @@
 	public static final EnumMap<Col, Color> ColMAP = new EnumMap<Col, Color>(Col.class);
 	static {
+		ColMAP.put(Col.UNKNOWN, new Color(0xc0c0c0));
 		ColMAP.put(Col.WHITE, Color.WHITE);
 		ColMAP.put(Col.RED, Color.RED);
 		ColMAP.put(Col.ORANGE, Color.ORANGE);
-		ColMAP.put(Col.AMBER, new Color(0xffbf00f));
+		ColMAP.put(Col.AMBER, new Color(0xfbf00f));
 		ColMAP.put(Col.YELLOW, Color.YELLOW);
 		ColMAP.put(Col.GREEN, Color.GREEN);
@@ -464,15 +465,15 @@
 	}
 
-	public static final Map<EnumSet<Vis>, String> VisMAP = new HashMap<EnumSet<Vis>, String>();
+	public static final EnumMap<Vis, String> VisSTR = new EnumMap<Vis, String>(Vis.class);
 	static {
-		VisMAP.put(EnumSet.of(Vis.UNKNOWN), "");
-		VisMAP.put(EnumSet.of(Vis.HIGH), "high");
-		VisMAP.put(EnumSet.of(Vis.LOW), "low");
-		VisMAP.put(EnumSet.of(Vis.FAINT), "faint");
-		VisMAP.put(EnumSet.of(Vis.INTEN), "intensified");
-		VisMAP.put(EnumSet.of(Vis.UNINTEN), "unintensified");
-		VisMAP.put(EnumSet.of(Vis.REST), "restricted");
-		VisMAP.put(EnumSet.of(Vis.OBS), "obscured");
-		VisMAP.put(EnumSet.of(Vis.PARTOBS), "part_obscured");
+		VisSTR.put(Vis.UNKNOWN, "");
+		VisSTR.put(Vis.HIGH, "high");
+		VisSTR.put(Vis.LOW, "low");
+		VisSTR.put(Vis.FAINT, "faint");
+		VisSTR.put(Vis.INTEN, "intensified");
+		VisSTR.put(Vis.UNINTEN, "unintensified");
+		VisSTR.put(Vis.REST, "restricted");
+		VisSTR.put(Vis.OBS, "obscured");
+		VisSTR.put(Vis.PARTOBS, "part_obscured");
 	}
 	
@@ -488,14 +489,17 @@
 
 	public enum Exh { UNKNOWN, H24, DAY, NIGHT, FOG }
-	public static final Map<EnumSet<Exh>, String> ExhMAP = new HashMap<EnumSet<Exh>, String>();
+	
+	public static final EnumMap<Exh, String> ExhSTR = new EnumMap<Exh, String>(Exh.class);
 	static {
-		ExhMAP.put(EnumSet.of(Exh.UNKNOWN), "");
-		ExhMAP.put(EnumSet.of(Exh.H24), "24h");
-		ExhMAP.put(EnumSet.of(Exh.DAY), "day");
-		ExhMAP.put(EnumSet.of(Exh.NIGHT), "night");
-		ExhMAP.put(EnumSet.of(Exh.FOG), "fog");
+		ExhSTR.put(Exh.UNKNOWN, "");
+		ExhSTR.put(Exh.H24, "24h");
+		ExhSTR.put(Exh.DAY, "day");
+		ExhSTR.put(Exh.NIGHT, "night");
+		ExhSTR.put(Exh.FOG, "fog");
 	}
 	
-	public enum Att { COL, CHR, GRP, SEQ, PER, HGT, RNG, VIS, BEG, END, RAD, EXH, LIT, ORT }
+	public enum Att { COL, CHR, GRP, SEQ, PER, BEG, END, RAD, HGT, RNG, VIS, EXH, LIT, ORT }
+	
+	public Object[] sector = {Col.UNKNOWN, "", "", "", "", "", "", "", "", "", Vis.UNKNOWN, Exh.UNKNOWN, Lit.UNKNOWN, "" };
 	
 	private ArrayList<Object[]> sectors = new ArrayList<Object[]>();
@@ -504,5 +508,5 @@
 		return sectors.size();
 	}
-
+	
 	public Object getLightAtt(Att att, int i) {
 		return getLightAtt(att.ordinal(), i);
@@ -515,10 +519,4 @@
 	}
 
-	public void setLightAtt(Att att, Object obj) {
-		sectors.clear();
-		sectors.add(new Object[14]);
-		sectors.get(0)[att.ordinal()] = obj;
-	}
-
 	public void setLightAtt(Att att, int i, Object obj) {
 		setLightAtt(att.ordinal(), i, obj);
@@ -530,17 +528,20 @@
 	}
 
-	public void addLightAtt(Att att, int i, Object obj) {
+	public void clrLight() {
+		sectors.clear();
+		sectors.add(sector.clone());
+	}
+
+	public void addLight(int i) {
 		if (sectors.size() >= i) {
-			sectors.add(i, new Object[14]);
-			sectors.get(i)[att.ordinal()] = obj;
-		}
-	}
-
-	public void addLightAtt(Att att, Object obj) {
-		sectors.add(new Object[14]);
-		sectors.get(sectors.size()-1)[att.ordinal()] = obj;
-	}
-
-	public void subLightAtt(Att att, int i) {
+			sectors.add(i, sectors.get(0).clone());
+		}
+	}
+
+	public void addLight() {
+		sectors.add(sectors.get(0).clone());
+	}
+
+	public void subLight(int i) {
 		if (sectors.size() > i)
 			sectors.remove(i);
@@ -1275,4 +1276,6 @@
 			}
 		}
+		
+		clrLight();
 
 		if (keys.containsKey("seamark:fog_signal")) {
@@ -1713,4 +1716,37 @@
 				}
 			}
+			
+			for (int i = 0; i < sectors.size(); i++) {
+				String secStr = (i == 0) ? "" : (":" + Integer.toString(i));
+				if (sectors.get(i)[0] != Col.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":colour", ColSTR.get(sectors.get(i)[0])));
+				if (!((String)sectors.get(i)[1]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":character", (String)sectors.get(i)[1]));
+				if (!((String)sectors.get(i)[2]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":group", (String)sectors.get(i)[2]));
+				if (!((String)sectors.get(i)[3]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":sequence", (String)sectors.get(i)[3]));
+				if (!((String)sectors.get(i)[4]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":period", (String)sectors.get(i)[4]));
+				if (!((String)sectors.get(i)[5]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":sector_start", (String)sectors.get(i)[5]));
+				if (!((String)sectors.get(i)[6]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":sector_end", (String)sectors.get(i)[6]));
+				if (!((String)sectors.get(i)[7]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":radius", (String)sectors.get(i)[7]));
+				if (!((String)sectors.get(i)[8]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":height", (String)sectors.get(i)[8]));
+				if (!((String)sectors.get(i)[9]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String)sectors.get(i)[9]));
+				if (sectors.get(i)[10] != Vis.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":visibility", VisSTR.get(sectors.get(i)[10])));
+				if (sectors.get(i)[11] != Exh.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":exhibition", ExhSTR.get(sectors.get(i)[11])));
+				if (sectors.get(i)[12] != Lit.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":category", LitSTR.get(sectors.get(i)[12])));
+				if (!((String)sectors.get(i)[13]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":orientation", (String)sectors.get(i)[13]));
+			}
+			
 			if (hasFog()) {
 				Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:fog_signal", FogSTR.get(getFogSound())));
