Index: applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties
===================================================================
--- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties	(revision 27027)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties	(revision 27028)
@@ -20,4 +20,6 @@
 LightVessel=Light vessel
 LightFloat=Light float
+SSWarning=Warning Signal Station
+SSTraffic=Traffic Signal Station
 Topmarks=Topmarks
 FogSignals=Fog signals
@@ -37,4 +39,5 @@
 Stake=Stake beacon
 Perch=Perch beacon
+Cairn=Cairn beacon
 
 RegionA=IALA Region A
@@ -88,18 +91,21 @@
 Range=Range
 Category=Category
+SSCategory=Signal Station
+UKCategory=Unknown Category
 NoneSpecified=None specified
 Vert2=Vertically disposed x2
 Visibility=Visibility
-Intensified=intensified
-Unintensified=unintensified
+Intensified=Intensified
+Unintensified=Unintensified
 PartiallyObscured=Partially obscured
 Orientation=Orientation
 Exhibition=Exhibition
 24h=24h
-Day=day
-Night=night
-Fog=fog
-
-NoColour=No colour
+Day=Day
+Night=Night
+Fog=Fog
+
+RemColour=Remove colour
+AddColour=Add colour
 White=White
 Red=Red
@@ -111,2 +117,95 @@
 Violet=Violet
 Black=Black
+Grey=Grey
+Brown=Brown
+Magenta=Magenta
+Pink=Pink
+NoPat=No Pattern
+HorizPat=Horizontal Stripes
+VertPat=Vertical Stripes
+DiagPat=Diagonal Stripes
+SquarePat=Squared Pattern
+BorderPat=Border Stripe
+
+UKPurpose=Unknown Purpose
+Warning=Warning
+Yachting=Yachting
+Outfall=Outfall
+ODAS=ODAS
+RecreationZone=Recreation Zone
+Mooring=Mooring
+LANBY=LANBY
+Leading=Leading
+Notice=Notice
+TSS=TSS
+FoulGround=Foul Ground
+FerryCross=Ferry Crossing
+Anchorage=Anchorage
+ChanSeparation=Channel Separation
+
+UKCategory=Unknown Category
+Traffic=Traffic Control
+PortControl=Port Control
+PortEntry=Port Entry/Departure
+IPT=International Port Traffic
+Berthing=Berthing
+Dock=Dock
+Lock=Lock
+Barrage=Flood Barrage
+Bridge=Bridge Passage
+Dredging=Dredging
+Danger=Danger
+Storm=Storm
+Weather=Weather
+Obstruction=Obstruction
+Cable=Cable
+Distress=Distress
+Time=time
+Tide=Tide
+TidalStream=Tidal Stream
+TideGauge=Tide Gauge
+TideScale=Tide Scale
+Diving=Diving
+Ice=Ice
+LevelGauge=Water Level Gauge
+Military=Military Practice
+
+Status=Status
+Information=Information
+Source=Source
+Elevation=Elevation
+Visibility=Visibility
+Reflectivity=Reflectivity
+Construction=Construction
+
+NotSet=Not set
+
+Permanent=Permanent
+Occasional=Occasional
+Recommended=Recommended
+NotInUse=Not in use
+Intermittent=Intermittent
+Reserved=Reserved
+Temporary=Temporary
+Private=Private
+Mandatory=Mandatory
+Destroyed=Destroyed
+Extinguished=Extinguished
+Illuminated=Illuminated
+Historic=Historic
+Public=Public
+Synchronized=Synchronized
+Watched=Watched
+UnWatched=Unwatched
+Doubtful=Existence Doubtful
+
+Masonry=Masonry
+Concreted=Concreted
+Boulders=Loose boulders
+HardSurfaced=Hard surfaced
+Unsurfaced=Unsurfaced
+Wooden=Wooden
+Metal=Metal
+GRP=GRP
+Painted=Painted
+
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 27027)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27028)
@@ -10,4 +10,5 @@
 import oseam.Messages;
 import oseam.dialogs.OSeaMAction;
+import oseam.seamarks.SeaMark;
 import oseam.seamarks.SeaMark.*;
 
@@ -35,11 +36,15 @@
 		}
 	};
+	public JComboBox colourBox;
+	public EnumMap<Col, ImageIcon> colours = new EnumMap<Col, ImageIcon>(Col.class);
 	public JComboBox visibilityBox;
 	public EnumMap<Vis, String> visibilities = new EnumMap<Vis, String>(Vis.class);
+	public JComboBox exhibitionBox;
+	public EnumMap<Exh, String> exhibitions = new EnumMap<Exh, String>(Exh.class);
 
 	public PanelSectors(OSeaMAction dia) {
 		super("Sector Table");
 		dlg = dia;
-		this.setSize(800, 100);
+		this.setSize(900, 100);
 		this.setVisible(true);
 		this.setAlwaysOnTop(true);
@@ -56,18 +61,43 @@
 		this.add(plusButton);
 		panel = new JPanel(new BorderLayout());
-		panel.setBounds(40, 0, 760, 512);
+		panel.setBounds(40, 0, 860, 512);
 		model = new SectorTable();
 		table = new JTable(model);
-		table.setBounds(0, 0, 760, 34);
+		table.setBounds(0, 0, 860, 34);
 		panel.add(new JScrollPane(table));
 		this.getContentPane().add(panel);
 		
-		TableColumn visColumn = table.getColumnModel().getColumn(11);
+		TableColumn col = table.getColumnModel().getColumn(1);
+		col.setCellRenderer(new ColourCellRenderer());
+
+		TableColumn colColumn = table.getColumnModel().getColumn(1);
+		colourBox = new JComboBox();
+		addColItem(new ImageIcon(getClass().getResource("/images/DelButton.png")), Col.UNKNOWN);
+		addColItem(new ImageIcon(getClass().getResource("/images/WhiteButton.png")), Col.WHITE);
+		addColItem(new ImageIcon(getClass().getResource("/images/RedButton.png")), Col.RED);
+		addColItem(new ImageIcon(getClass().getResource("/images/GreenButton.png")), Col.GREEN);
+		addColItem(new ImageIcon(getClass().getResource("/images/YellowButton.png")), Col.YELLOW);
+		addColItem(new ImageIcon(getClass().getResource("/images/OrangeButton.png")), Col.ORANGE);
+		addColItem(new ImageIcon(getClass().getResource("/images/AmberButton.png")), Col.AMBER);
+		addColItem(new ImageIcon(getClass().getResource("/images/BlueButton.png")), Col.BLUE);
+		addColItem(new ImageIcon(getClass().getResource("/images/VioletButton.png")), Col.VIOLET);
+		colColumn.setCellEditor(new DefaultCellEditor(colourBox));
+		
+		TableColumn visColumn = table.getColumnModel().getColumn(12);
 		visibilityBox = new JComboBox();
-		addVisibItem(Messages.getString("NoneSpecified"), Vis.UNKNOWN);
+		addVisibItem("", 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));
+		
+		TableColumn exhColumn = table.getColumnModel().getColumn(13);
+		exhibitionBox = new JComboBox();
+		addExhibItem("", Exh.UNKNOWN);
+		addExhibItem(Messages.getString("24h"), Exh.H24);
+		addExhibItem(Messages.getString("Day"), Exh.DAY);
+		addExhibItem(Messages.getString("Night"), Exh.NIGHT);
+		addExhibItem(Messages.getString("Fog"), Exh.FOG);
+		exhColumn.setCellEditor(new DefaultCellEditor(exhibitionBox));
 	}
 
@@ -75,5 +105,5 @@
 
 		private String[] headings = { "Sector", "Colour", "Character", "Group", "Sequence", "Period",
-				"Start", "End", "Radius", "Height", "Range", "Visibility", "Exhibition", "Category" };
+				"Directional", "Start", "End", "Radius", "Height", "Range", "Visibility", "Exhibition" };
 
 		public SectorTable() {
@@ -99,11 +129,7 @@
 			switch (col) {
 			case 1:
-				return Color.class;
-			case 11:
-				return Vis.class;
-			case 12:
-				return Exh.class;
-			case 13:
-				return Lit.class;
+				return Col.class;
+			case 6:
+				return Boolean.class;
 			default:
 				return String.class;
@@ -112,22 +138,59 @@
 
 		public Object getValueAt(int row, int col) {
-			if (col == 0)
+			switch (col) {
+			case 0:
 				return row;
-			else
-				return dlg.mark.getLightAtt(col-1, row);
+			case 1:
+				return dlg.mark.getLightAtt(Att.COL, row);
+			case 6:
+				return (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR);
+			case 7:
+			case 8:
+				if (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR)
+					return dlg.mark.getLightAtt(Att.ORT, row);
+				else
+					return dlg.mark.getLightAtt(col - 1, row);
+			case 12:
+				return visibilities.get(dlg.mark.getLightAtt(Att.VIS, row));
+			case 13:
+				return exhibitions.get(dlg.mark.getLightAtt(Att.EXH, row));
+			default:
+				return dlg.mark.getLightAtt(col - 1, row);
+			}
 		}
 
 		public void setValueAt(Object value, int row, int col) {
 			switch (col) {
-			case 4:
+			case 1:
+				for (Col colour : colours.keySet()) {
+					ImageIcon img = colours.get(colour);
+					if (img == value)
+						dlg.mark.setLightAtt(Att.COL, row, colour);
+				}
+				break;
 			case 5:
+			case 9:
+			case 10:
+			case 11:
+				dlg.mark.setLightAtt(col - 1, row, dlg.mark.validDecimal((String) value));
+				break;
 			case 6:
+				if ((Boolean) value == true) {
+					dlg.mark.setLightAtt(Att.LIT, row, Lit.DIR);
+				} else {
+					dlg.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN);
+					dlg.mark.setLightAtt(Att.ORT, row, "");
+				}
+				break;
 			case 7:
 			case 8:
-			case 9:
-			case 13:
-				dlg.mark.setLightAtt(col-1, row, dlg.mark.validDecimal((String)value));
-				break;
-			case 11:
+				if (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR) {
+					dlg.mark.setLightAtt(Att.ORT, row, dlg.mark.validDecimal((String) value));
+				} else {
+					dlg.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN);
+					dlg.mark.setLightAtt(col - 1, row, dlg.mark.validDecimal((String) value));
+				}
+				break;
+			case 12:
 				for (Vis vis : visibilities.keySet()) {
 					String str = visibilities.get(vis);
@@ -136,7 +199,23 @@
 				}
 				break;
+			case 13:
+				for (Exh exh : exhibitions.keySet()) {
+					String str = exhibitions.get(exh);
+					if (str.equals(value))
+						dlg.mark.setLightAtt(Att.EXH, row, exh);
+				}
+				break;
 			default:
-				dlg.mark.setLightAtt(col-1, row, value);
+				dlg.mark.setLightAtt(col - 1, row, value);
 			}
+		}
+	}
+
+	public class ColourCellRenderer extends JLabel implements TableCellRenderer {
+		public Component getTableCellRendererComponent(JTable table, Object value,
+				boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {
+			setHorizontalAlignment(SwingConstants.CENTER);
+			setIcon(colours.get(value));
+			return this;
 		}
 	}
@@ -148,20 +227,25 @@
 	public void addSector(int idx) {
 		dlg.mark.addLight(idx);
-		table.setSize(760, ((table.getRowCount() * 16) + 18));
+		table.setSize(860, ((table.getRowCount() * 16) + 18));
 		if (table.getRowCount() > 3) {
-			this.setSize(800, ((table.getRowCount() * 16) + 40));
+			this.setSize(900, ((table.getRowCount() * 16) + 40));
 		} else {
-			this.setSize(800, 100);
+			this.setSize(900, 100);
 		}
 	}
 
 	public void deleteSector(int idx) {
-		dlg.mark.subLight(idx);
-		table.setSize(760, ((table.getRowCount() * 16) + 18));
+		dlg.mark.delLight(idx);
+		table.setSize(860, ((table.getRowCount() * 16) + 18));
 		if (table.getRowCount() > 3) {
-			this.setSize(800, ((table.getRowCount() * 16) + 40));
+			this.setSize(900, ((table.getRowCount() * 16) + 40));
 		} else {
-			this.setSize(800, 100);
-		}
+			this.setSize(900, 100);
+		}
+	}
+
+	private void addColItem(ImageIcon img, Col col) {
+		colours.put(col, img);
+		colourBox.addItem(img);
 	}
 
@@ -171,3 +255,8 @@
 	}
 
+	private void addExhibItem(String str, Exh exh) {
+		exhibitions.put(exh, str);
+		exhibitionBox.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 27027)
+++ applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27028)
@@ -483,7 +483,25 @@
 	}
 
-	public static final Map<EnumSet<Lit>, String> LitSTR = new HashMap<EnumSet<Lit>, String>();
+	public static final EnumMap<Lit, String> LitSTR = new EnumMap<Lit, String>(Lit.class);
 	static {
-		LitSTR.put(EnumSet.of(Lit.VERT), "vertical");
+		LitSTR.put(Lit.UNKNOWN, "");
+		LitSTR.put(Lit.VERT, "vertical");
+		LitSTR.put(Lit.HORIZ, "horizontal");
+		LitSTR.put(Lit.DIR, "directional");
+		LitSTR.put(Lit.UPPER, "upper");
+		LitSTR.put(Lit.LOWER, "lower");
+		LitSTR.put(Lit.LEAD, "leading");
+		LitSTR.put(Lit.REAR, "rear");
+		LitSTR.put(Lit.FRONT, "front");
+		LitSTR.put(Lit.AERO, "aero");
+		LitSTR.put(Lit.AIROBS, "air_obstruction");
+		LitSTR.put(Lit.FOGDET, "fog_detector");
+		LitSTR.put(Lit.FLOOD, "floodlight");
+		LitSTR.put(Lit.STRIP, "striplight");
+		LitSTR.put(Lit.SUBS, "subsidairy");
+		LitSTR.put(Lit.SPOT, "spotlight");
+		LitSTR.put(Lit.MOIRE, "moire");
+		LitSTR.put(Lit.EMERG, "emergency");
+		LitSTR.put(Lit.BEAR, "bearing");
 	}
 
@@ -499,7 +517,7 @@
 	}
 	
-	public enum Att { COL, CHR, GRP, SEQ, PER, BEG, END, RAD, HGT, RNG, VIS, EXH, LIT, ORT }
+	public enum Att { COL, CHR, GRP, SEQ, PER, LIT, BEG, END, RAD, HGT, RNG, VIS, EXH, ORT }
 	
-	public Object[] sector = {Col.UNKNOWN, "", "", "", "", "", "", "", "", "", Vis.UNKNOWN, Exh.UNKNOWN, Lit.UNKNOWN, "" };
+	public Object[] sector = {Col.UNKNOWN, "", "", "", "", Lit.UNKNOWN, "", "", "", "", "", Vis.UNKNOWN, Exh.UNKNOWN, "" };
 	
 	private ArrayList<Object[]> sectors = new ArrayList<Object[]>();
@@ -528,20 +546,21 @@
 	}
 
-	public void clrLight() {
-		sectors.clear();
-		sectors.add(sector.clone());
-	}
-
 	public void addLight(int i) {
 		if (sectors.size() >= i) {
-			sectors.add(i, sectors.get(0).clone());
+			if (sectors.size() == 0)
+				sectors.add(sector.clone());
+			else
+				sectors.add(i, sectors.get(0).clone());
 		}
 	}
 
 	public void addLight() {
-		sectors.add(sectors.get(0).clone());
-	}
-
-	public void subLight(int i) {
+		if (sectors.size() == 0)
+			sectors.add(sector.clone());
+		else
+			sectors.add(sectors.get(0).clone());
+	}
+
+	public void delLight(int i) {
 		if (sectors.size() > i)
 			sectors.remove(i);
@@ -1277,5 +1296,20 @@
 		}
 		
-		clrLight();
+		sectors.clear();
+		sectors.add(sector.clone());
+		boolean found;
+		for (int i = 0; i < 30; i++) {
+			found = false;
+			addLight();
+			String secStr = (i == 0) ? "" : (":" + Integer.toString(i));
+			if (keys.containsKey("seamark:light" + secStr + ":colour")) {
+				setLightAtt(Att.COL, i, keys.get("seamark:light" + secStr + ":colour"));
+				found = true;
+			}
+			if (!found) {
+				delLight(i);
+				break;
+			}
+		}
 
 		if (keys.containsKey("seamark:fog_signal")) {
@@ -1729,20 +1763,20 @@
 				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 (sectors.get(i)[5] != Lit.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":category", LitSTR.get(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]));
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":sector_start", (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]));
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":sector_end", (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]));
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":radius", (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])));
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":height", (String)sectors.get(i)[9]));
+				if (!((String)sectors.get(i)[10]).isEmpty())
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":range", (String)sectors.get(i)[10]));
+				if (sectors.get(i)[11] != Vis.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":visibility", VisSTR.get(sectors.get(i)[11])));
+				if (sectors.get(i)[12] != Exh.UNKNOWN)
+					Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:light" + secStr + ":exhibition", ExhSTR.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]));
