Changeset 23066 in osm for applications/editors/josm
- Timestamp:
- 2010-09-07T23:14:58+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/msg/messages.properties
r23050 r23066 1 Buoy.01=Pillar Buoy 2 Buoy.02=Can Buoy 3 Buoy.03=Cone Buoy 4 Buoy.04=Spar Buoy 5 Buoy.05=Beacon 6 Buoy.06=Tower 7 Buoy.07=Float 8 Buoy.10=Perch 9 Buoy.11=*Select Shape* 1 10 Toms.2=Hello World 2 11 SmpDialogAction.0=Seamark Editor -
applications/editors/josm/plugins/toms/src/toms/msg/messages_de.properties
r23039 r23066 1 Buoy.01=Bakentonne 2 Buoy.02=Stumpftonne 3 Buoy.03=Cone Buoy 4 Buoy.04=Spierentonne 5 Buoy.05=Bake 6 Buoy.06=Tower 7 Buoy.07=Floß 8 Buoy.10=Perch 9 Buoy.11=*Wähle Form aus* 1 10 Toms.2=Hallo Welt 2 11 SmpDialogAction.0=Seezeichen Editor 3 SmpDialogAction.1=K lasse:12 SmpDialogAction.1=Kategorie: 4 13 SmpDialogAction.101=IALA 5 14 SmpDialogAction.103=Typ: … … 71 80 SmpDialogAction.210=X gelb 72 81 SmpDialogAction.211=X rot 73 82 SmpDialogAction.212=Unbekannt -
applications/editors/josm/plugins/toms/src/toms/msg/messages_en.properties
r23039 r23066 1 Buoy.01=Pillar Buoy 2 Buoy.02=Can Buoy 3 Buoy.03=Cone Buoy 4 Buoy.04=Spar Buoy 5 Buoy.05=Beacon 6 Buoy.06=Tower 7 Buoy.07=Float 8 Buoy.10=Perch 9 Buoy.11=*Select Shape* 1 10 Toms.2=Hello World 2 11 SmpDialogAction.0=Seamark Editor … … 73 82 SmpDialogAction.210=Yellow X 74 83 SmpDialogAction.211=Red X 84 SmpDialogAction.212=Not set -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23061 r23066 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 14 import toms.Messages; 14 15 import toms.dialogs.SmpDialogAction; 15 16 … … 32 33 33 34 dlg.cbM01StyleOfMark.removeAllItems(); 34 dlg.cbM01StyleOfMark.addItem( "Not set");35 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");36 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");37 dlg.cbM01StyleOfMark.addItem( "Beacon");38 dlg.cbM01StyleOfMark.addItem( "Tower");39 dlg.cbM01StyleOfMark.addItem( "Float");35 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 36 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 37 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 38 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 39 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 40 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 40 41 dlg.cbM01StyleOfMark.setEnabled(true); 41 42 42 43 dlg.cbM01Kennung.removeAllItems(); 43 dlg.cbM01Kennung.addItem( "Not set");44 dlg.cbM01Kennung.addItem("Fl"); 45 dlg.cbM01Kennung.addItem("Fl()"); 46 dlg.cbM01Kennung.addItem("Oc"); 47 dlg.cbM01Kennung.addItem("Oc()"); 48 dlg.cbM01Kennung.addItem("Q"); 49 dlg.cbM01Kennung.addItem("IQ"); 50 dlg.cbM01Kennung.addItem("Mo()"); 44 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 45 dlg.cbM01Kennung.addItem("Fl"); //$NON-NLS-1$ 46 dlg.cbM01Kennung.addItem("Fl()"); //$NON-NLS-1$ 47 dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$ 48 dlg.cbM01Kennung.addItem("Oc()"); //$NON-NLS-1$ 49 dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$ 50 dlg.cbM01Kennung.addItem("IQ"); //$NON-NLS-1$ 51 dlg.cbM01Kennung.addItem("Mo()"); //$NON-NLS-1$ 51 52 dlg.cbM01Kennung.setSelectedIndex(0); 52 53 53 if (keys.containsKey("name")) 54 setName(keys.get("name")); 55 56 if (keys.containsKey("seamark:name")) 57 setName(keys.get("seamark:name")); 58 59 if (keys.containsKey("seamark:buoy_lateral:name")) 60 setName(keys.get("seamark:buoy_lateral:name")); 61 else if (keys.containsKey("seamark:beacon_lateral:name")) 62 setName(keys.get("seamark:beacon_lateral:name")); 63 else if (keys.containsKey("seamark:light_float:name")) 64 setName(keys.get("seamark:light_float:name")); 65 66 String cat = ""; 67 String col = ""; 68 String top = ""; 54 if (keys.containsKey("name")) //$NON-NLS-1$ 55 setName(keys.get("name")); //$NON-NLS-1$ 56 57 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 58 setName(keys.get("seamark:name")); //$NON-NLS-1$ 59 60 if (keys.containsKey("seamark:buoy_lateral:name")) //$NON-NLS-1$ 61 setName(keys.get("seamark:buoy_lateral:name")); //$NON-NLS-1$ 62 else if (keys.containsKey("seamark:beacon_lateral:name")) //$NON-NLS-1$ 63 setName(keys.get("seamark:beacon_lateral:name")); //$NON-NLS-1$ 64 else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$ 65 setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$ 66 67 String cat = ""; //$NON-NLS-1$ 68 String col = ""; //$NON-NLS-1$ 69 String top = ""; //$NON-NLS-1$ 69 70 70 71 if (getStyleIndex() != LAT_PERCH) { 71 if (keys.containsKey("seamark:topmark:shape")) { 72 top = keys.get("seamark:topmark:shape"); 72 if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$ 73 top = keys.get("seamark:topmark:shape"); //$NON-NLS-1$ 73 74 setTopMark(true); 74 75 } 75 if (keys.containsKey("seamark:topmark:colour")) { 76 if (keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$ 76 77 setTopMark(true); 77 78 } 78 79 } 79 80 80 if (keys.containsKey("seamark:buoy_lateral:colour")) 81 col = keys.get("seamark:buoy_lateral:colour"); 82 else if (keys.containsKey("seamark:beacon_lateral:colour")) 83 col = keys.get("seamark:beacon_lateral:colour"); 84 else if (keys.containsKey("seamark:light_float:colour")) 85 col = keys.get("seamark:light_float:colour"); 86 87 if (keys.containsKey("seamark:buoy_lateral:category")) 88 cat = keys.get("seamark:buoy_lateral:category"); 89 else if (keys.containsKey("seamark:beacon_lateral:category")) 90 cat = keys.get("seamark:beacon_lateral:category"); 91 92 if (cat.equals("")) { 93 if (col.equals("red")) { 81 if (keys.containsKey("seamark:buoy_lateral:colour")) //$NON-NLS-1$ 82 col = keys.get("seamark:buoy_lateral:colour"); //$NON-NLS-1$ 83 else if (keys.containsKey("seamark:beacon_lateral:colour")) //$NON-NLS-1$ 84 col = keys.get("seamark:beacon_lateral:colour"); //$NON-NLS-1$ 85 else if (keys.containsKey("seamark:light_float:colour")) //$NON-NLS-1$ 86 col = keys.get("seamark:light_float:colour"); //$NON-NLS-1$ 87 88 if (keys.containsKey("seamark:buoy_lateral:category")) //$NON-NLS-1$ 89 cat = keys.get("seamark:buoy_lateral:category"); //$NON-NLS-1$ 90 else if (keys.containsKey("seamark:beacon_lateral:category")) //$NON-NLS-1$ 91 cat = keys.get("seamark:beacon_lateral:category"); //$NON-NLS-1$ 92 93 if (cat.equals("")) { //$NON-NLS-1$ 94 if (col.equals("red")) { //$NON-NLS-1$ 94 95 setColour(RED); 95 if (top.equals("cylinder")) { 96 if (top.equals("cylinder")) { //$NON-NLS-1$ 96 97 setBuoyIndex(PORT_HAND); 97 98 setRegion(IALA_A); 98 } else if (top.equals("cone, point up")) { 99 } else if (top.equals("cone, point up")) { //$NON-NLS-1$ 99 100 setBuoyIndex(STARBOARD_HAND); 100 101 setRegion(IALA_B); … … 105 106 setBuoyIndex(STARBOARD_HAND); 106 107 } 107 } else if (col.equals("green")) { 108 } else if (col.equals("green")) { //$NON-NLS-1$ 108 109 setColour(GREEN); 109 if (top.equals("cone, point up")) { 110 if (top.equals("cone, point up")) { //$NON-NLS-1$ 110 111 setBuoyIndex(STARBOARD_HAND); 111 112 setRegion(IALA_A); 112 } else if (top.equals("cylinder")) { 113 } else if (top.equals("cylinder")) { //$NON-NLS-1$ 113 114 setBuoyIndex(PORT_HAND); 114 115 setRegion(IALA_B); … … 119 120 setBuoyIndex(PORT_HAND); 120 121 } 121 } else if (col.equals("red;green;red")) { 122 } else if (col.equals("red;green;red")) { //$NON-NLS-1$ 122 123 setColour(RED_GREEN_RED); 123 if (top.equals("cylinder")) { 124 if (top.equals("cylinder")) { //$NON-NLS-1$ 124 125 setBuoyIndex(PREF_PORT_HAND); 125 126 setRegion(IALA_A); 126 } else if (top.equals("cone, point up")) { 127 } else if (top.equals("cone, point up")) { //$NON-NLS-1$ 127 128 setBuoyIndex(PREF_STARBOARD_HAND); 128 129 setRegion(IALA_B); … … 133 134 setBuoyIndex(PREF_STARBOARD_HAND); 134 135 } 135 } else if (col.equals("green;red;green")) { 136 } else if (col.equals("green;red;green")) { //$NON-NLS-1$ 136 137 setColour(GREEN_RED_GREEN); 137 if (top.equals("cone, point up")) { 138 if (top.equals("cone, point up")) { //$NON-NLS-1$ 138 139 setBuoyIndex(PREF_STARBOARD_HAND); 139 140 setRegion(IALA_A); 140 } else if (top.equals("cylinder")) { 141 } else if (top.equals("cylinder")) { //$NON-NLS-1$ 141 142 setBuoyIndex(PREF_PORT_HAND); 142 143 setRegion(IALA_B); … … 148 149 } 149 150 } 150 } else if (cat.equals("port")) { 151 } else if (cat.equals("port")) { //$NON-NLS-1$ 151 152 152 153 setBuoyIndex(PORT_HAND); 153 154 154 if (col.equals("red")) { 155 if (col.equals("red")) { //$NON-NLS-1$ 155 156 setRegion(IALA_A); 156 157 setColour(RED); 157 } else if (col.equals("green")) { 158 } else if (col.equals("green")) { //$NON-NLS-1$ 158 159 setRegion(IALA_B); 159 160 setColour(GREEN); … … 164 165 setColour(GREEN); 165 166 } 166 } else if (cat.equals("starboard")) { 167 } else if (cat.equals("starboard")) { //$NON-NLS-1$ 167 168 168 169 setBuoyIndex(STARBOARD_HAND); 169 170 170 if (col.equals("green")) { 171 if (col.equals("green")) { //$NON-NLS-1$ 171 172 setRegion(IALA_A); 172 173 setColour(GREEN); 173 } else if (col.equals("red")) { 174 } else if (col.equals("red")) { //$NON-NLS-1$ 174 175 setRegion(IALA_B); 175 176 setColour(RED); … … 180 181 setColour(RED); 181 182 } 182 } else if (cat.equals("preferred_channel_port")) { 183 } else if (cat.equals("preferred_channel_port")) { //$NON-NLS-1$ 183 184 184 185 setBuoyIndex(PREF_PORT_HAND); 185 186 186 if (col.equals("red;green;red")) { 187 if (col.equals("red;green;red")) { //$NON-NLS-1$ 187 188 setRegion(IALA_A); 188 189 setColour(RED_GREEN_RED); 189 } else if (col.equals("green;red;green")) { 190 } else if (col.equals("green;red;green")) { //$NON-NLS-1$ 190 191 setRegion(IALA_B); 191 192 setColour(GREEN_RED_GREEN); … … 197 198 } 198 199 199 } else if (cat.equals("preferred_channel_starboard")) { 200 } else if (cat.equals("preferred_channel_starboard")) { //$NON-NLS-1$ 200 201 201 202 setBuoyIndex(PREF_STARBOARD_HAND); 202 203 203 if (col.equals("green;red;green")) { 204 if (col.equals("green;red;green")) { //$NON-NLS-1$ 204 205 setRegion(IALA_A); 205 206 setColour(GREEN_RED_GREEN); 206 } else if (col.equals("red;green;red")) { 207 } else if (col.equals("red;green;red")) { //$NON-NLS-1$ 207 208 setRegion(IALA_B); 208 209 setColour(RED_GREEN_RED); … … 215 216 } 216 217 217 if (keys.containsKey("seamark:buoy_lateral:shape")) { 218 str = keys.get("seamark:buoy_lateral:shape"); 218 if (keys.containsKey("seamark:buoy_lateral:shape")) { //$NON-NLS-1$ 219 str = keys.get("seamark:buoy_lateral:shape"); //$NON-NLS-1$ 219 220 220 221 switch (getBuoyIndex()) { 221 222 case PORT_HAND: 222 if (str.equals("can")) 223 if (str.equals("can")) //$NON-NLS-1$ 223 224 setStyleIndex(LAT_CAN); 224 else if (str.equals("pillar")) 225 else if (str.equals("pillar")) //$NON-NLS-1$ 225 226 setStyleIndex(LAT_PILLAR); 226 else if (str.equals("spar")) 227 else if (str.equals("spar")) //$NON-NLS-1$ 227 228 setStyleIndex(LAT_SPAR); 228 229 break; 229 230 230 231 case PREF_PORT_HAND: 231 if (str.equals("can")) 232 if (str.equals("can")) //$NON-NLS-1$ 232 233 setStyleIndex(LAT_CAN); 233 else if (str.equals("pillar")) 234 else if (str.equals("pillar")) //$NON-NLS-1$ 234 235 setStyleIndex(LAT_PILLAR); 235 else if (str.equals("spar")) 236 else if (str.equals("spar")) //$NON-NLS-1$ 236 237 setStyleIndex(LAT_SPAR); 237 238 break; 238 239 239 240 case STARBOARD_HAND: 240 if (str.equals("conical")) 241 if (str.equals("conical")) //$NON-NLS-1$ 241 242 setStyleIndex(LAT_CONE); 242 else if (str.equals("pillar")) 243 else if (str.equals("pillar")) //$NON-NLS-1$ 243 244 setStyleIndex(LAT_PILLAR); 244 else if (str.equals("spar")) 245 else if (str.equals("spar")) //$NON-NLS-1$ 245 246 setStyleIndex(LAT_SPAR); 246 247 break; 247 248 248 249 case PREF_STARBOARD_HAND: 249 if (str.equals("conical")) 250 if (str.equals("conical")) //$NON-NLS-1$ 250 251 setStyleIndex(LAT_CONE); 251 else if (str.equals("pillar")) 252 else if (str.equals("pillar")) //$NON-NLS-1$ 252 253 setStyleIndex(LAT_PILLAR); 253 else if (str.equals("spar")) 254 else if (str.equals("spar")) //$NON-NLS-1$ 254 255 setStyleIndex(LAT_SPAR); 255 256 break; 256 257 } 257 } else if (keys.containsKey("seamark:beacon_lateral:shape")) { 258 str = keys.get("seamark:beacon_lateral:shape"); 259 if (str.equals("tower")) 258 } else if (keys.containsKey("seamark:beacon_lateral:shape")) { //$NON-NLS-1$ 259 str = keys.get("seamark:beacon_lateral:shape"); //$NON-NLS-1$ 260 if (str.equals("tower")) //$NON-NLS-1$ 260 261 setStyleIndex(LAT_TOWER); 261 else if (str.equals("perch")) 262 else if (str.equals("perch")) //$NON-NLS-1$ 262 263 setStyleIndex(LAT_PERCH); 263 264 else 264 265 setStyleIndex(LAT_BEACON); 265 } else if (keys.containsKey("seamark:type") 266 && (keys.get("seamark:type").equals("beacon_lateral"))) { 266 } else if (keys.containsKey("seamark:type") //$NON-NLS-1$ 267 && (keys.get("seamark:type").equals("beacon_lateral"))) { //$NON-NLS-1$ //$NON-NLS-2$ 267 268 setStyleIndex(LAT_BEACON); 268 } else if (keys.containsKey("seamark:type") 269 && (keys.get("seamark:type").equals("light_float"))) { 269 } else if (keys.containsKey("seamark:type") //$NON-NLS-1$ 270 && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$ 270 271 setStyleIndex(LAT_FLOAT); 271 272 } … … 273 274 refreshStyles(); 274 275 275 if (keys.containsKey("seamark:light:colour")) { 276 setLightColour(keys.get("seamark:light:colour")); 276 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 277 setLightColour(keys.get("seamark:light:colour")); //$NON-NLS-1$ 277 278 setFired(true); 278 279 } 279 280 280 if (keys.containsKey("seamark:light:character")) { 281 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 281 282 setLightGroup(keys); 282 setLightChar(keys.get("seamark:light:character")); 283 setLightChar(keys.get("seamark:light:character")); //$NON-NLS-1$ 283 284 setLightPeriod(keys); 284 285 setFired(true); … … 292 293 293 294 dlg.cbM01StyleOfMark.removeAllItems(); 294 dlg.cbM01StyleOfMark.addItem( "*Select Shape*");295 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.11")); //$NON-NLS-1$ 295 296 296 297 switch (type) { 297 298 case PORT_HAND: 298 dlg.cbM01StyleOfMark.addItem( "Can Buoy");299 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");300 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");301 dlg.cbM01StyleOfMark.addItem( "Beacon");302 dlg.cbM01StyleOfMark.addItem( "Tower");303 dlg.cbM01StyleOfMark.addItem( "Float");304 dlg.cbM01StyleOfMark.addItem( "Perch");299 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.02")); //$NON-NLS-1$ 300 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 301 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 302 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 303 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 304 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 305 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.10")); //$NON-NLS-1$ 305 306 break; 306 307 307 308 case STARBOARD_HAND: 308 dlg.cbM01StyleOfMark.addItem( "Cone Buoy");309 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");310 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");311 dlg.cbM01StyleOfMark.addItem( "Beacon");312 dlg.cbM01StyleOfMark.addItem( "Tower");313 dlg.cbM01StyleOfMark.addItem( "Float");314 dlg.cbM01StyleOfMark.addItem( "Perch");309 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$NON-NLS-1$ 310 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 311 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 312 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 313 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 314 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 315 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.10")); //$NON-NLS-1$ 315 316 break; 316 317 317 318 case PREF_PORT_HAND: 318 dlg.cbM01StyleOfMark.addItem( "Can Buoy");319 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");320 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");321 dlg.cbM01StyleOfMark.addItem( "Beacon");322 dlg.cbM01StyleOfMark.addItem( "Tower");323 dlg.cbM01StyleOfMark.addItem( "Float");319 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.02")); //$NON-NLS-1$ 320 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 321 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 322 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 323 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 324 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 324 325 break; 325 326 326 327 case PREF_STARBOARD_HAND: 327 dlg.cbM01StyleOfMark.addItem( "Cone Buoy");328 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");329 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");330 dlg.cbM01StyleOfMark.addItem( "Beacon");331 dlg.cbM01StyleOfMark.addItem( "Tower");332 dlg.cbM01StyleOfMark.addItem( "Float");328 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.03")); //$NON-NLS-1$ 329 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 330 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 331 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 332 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 333 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 333 334 break; 334 335 … … 366 367 dlg.cM01Fired.setEnabled(true); 367 368 368 String image = "/images/Lateral"; 369 String image = "/images/Lateral"; //$NON-NLS-1$ 369 370 370 371 int cat = getBuoyIndex(); … … 387 388 switch (style) { 388 389 case LAT_CAN: 389 image += "_Can_Red"; 390 image += "_Can_Red"; //$NON-NLS-1$ 390 391 break; 391 392 case LAT_PILLAR: 392 image += "_Pillar_Red"; 393 image += "_Pillar_Red"; //$NON-NLS-1$ 393 394 break; 394 395 case LAT_SPAR: 395 image += "_Spar_Red"; 396 image += "_Spar_Red"; //$NON-NLS-1$ 396 397 break; 397 398 case LAT_BEACON: 398 image += "_Beacon_Red"; 399 image += "_Beacon_Red"; //$NON-NLS-1$ 399 400 break; 400 401 case LAT_TOWER: 401 image += "_Tower_Red"; 402 image += "_Tower_Red"; //$NON-NLS-1$ 402 403 break; 403 404 case LAT_FLOAT: 404 image += "_Float_Red"; 405 image += "_Float_Red"; //$NON-NLS-1$ 405 406 break; 406 407 case LAT_PERCH: 407 image += "_Perch_Port"; 408 image += "_Perch_Port"; //$NON-NLS-1$ 408 409 break; 409 410 default: … … 412 413 switch (style) { 413 414 case LAT_CAN: 414 image += "_Can_Green"; 415 image += "_Can_Green"; //$NON-NLS-1$ 415 416 break; 416 417 case LAT_PILLAR: 417 image += "_Pillar_Green"; 418 image += "_Pillar_Green"; //$NON-NLS-1$ 418 419 break; 419 420 case LAT_SPAR: 420 image += "_Spar_Green"; 421 image += "_Spar_Green"; //$NON-NLS-1$ 421 422 break; 422 423 case LAT_BEACON: 423 image += "_Beacon_Green"; 424 image += "_Beacon_Green"; //$NON-NLS-1$ 424 425 break; 425 426 case LAT_TOWER: 426 image += "_Tower_Green"; 427 image += "_Tower_Green"; //$NON-NLS-1$ 427 428 break; 428 429 case LAT_FLOAT: 429 image += "_Float_Green"; 430 image += "_Float_Green"; //$NON-NLS-1$ 430 431 break; 431 432 case LAT_PERCH: 432 image += "_Perch_Port"; 433 image += "_Perch_Port"; //$NON-NLS-1$ 433 434 break; 434 435 default: … … 440 441 switch (style) { 441 442 case LAT_CONE: 442 image += "_Cone_Green"; 443 image += "_Cone_Green"; //$NON-NLS-1$ 443 444 break; 444 445 case LAT_PILLAR: 445 image += "_Pillar_Green"; 446 image += "_Pillar_Green"; //$NON-NLS-1$ 446 447 break; 447 448 case LAT_SPAR: 448 image += "_Spar_Green"; 449 image += "_Spar_Green"; //$NON-NLS-1$ 449 450 break; 450 451 case LAT_BEACON: 451 image += "_Beacon_Green"; 452 image += "_Beacon_Green"; //$NON-NLS-1$ 452 453 break; 453 454 case LAT_TOWER: 454 image += "_Tower_Green"; 455 image += "_Tower_Green"; //$NON-NLS-1$ 455 456 break; 456 457 case LAT_FLOAT: 457 image += "_Float_Green"; 458 image += "_Float_Green"; //$NON-NLS-1$ 458 459 break; 459 460 case LAT_PERCH: 460 image += "_Perch_Starboard"; 461 image += "_Perch_Starboard"; //$NON-NLS-1$ 461 462 break; 462 463 default: … … 465 466 switch (style) { 466 467 case LAT_CONE: 467 image += "_Cone_Red"; 468 image += "_Cone_Red"; //$NON-NLS-1$ 468 469 break; 469 470 case LAT_PILLAR: 470 image += "_Pillar_Red"; 471 image += "_Pillar_Red"; //$NON-NLS-1$ 471 472 break; 472 473 case LAT_SPAR: 473 image += "_Spar_Red"; 474 image += "_Spar_Red"; //$NON-NLS-1$ 474 475 break; 475 476 case LAT_BEACON: 476 image += "_Beacon_Red"; 477 image += "_Beacon_Red"; //$NON-NLS-1$ 477 478 break; 478 479 case LAT_TOWER: 479 image += "_Tower_Red"; 480 image += "_Tower_Red"; //$NON-NLS-1$ 480 481 break; 481 482 case LAT_FLOAT: 482 image += "_Float_Red"; 483 image += "_Float_Red"; //$NON-NLS-1$ 483 484 break; 484 485 case LAT_PERCH: 485 image += "_Perch_Starboard"; 486 image += "_Perch_Starboard"; //$NON-NLS-1$ 486 487 break; 487 488 default: … … 493 494 switch (style) { 494 495 case LAT_CAN: 495 image += "_Can_Red_Green_Red"; 496 image += "_Can_Red_Green_Red"; //$NON-NLS-1$ 496 497 break; 497 498 case LAT_PILLAR: 498 image += "_Pillar_Red_Green_Red"; 499 image += "_Pillar_Red_Green_Red"; //$NON-NLS-1$ 499 500 break; 500 501 case LAT_SPAR: 501 image += "_Spar_Red_Green_Red"; 502 image += "_Spar_Red_Green_Red"; //$NON-NLS-1$ 502 503 break; 503 504 case LAT_BEACON: 504 image += "_Beacon_Red_Green_Red"; 505 image += "_Beacon_Red_Green_Red"; //$NON-NLS-1$ 505 506 break; 506 507 case LAT_TOWER: 507 image += "_Tower_Red_Green_Red"; 508 image += "_Tower_Red_Green_Red"; //$NON-NLS-1$ 508 509 break; 509 510 case LAT_FLOAT: 510 image += "_Float_Red_Green_Red"; 511 image += "_Float_Red_Green_Red"; //$NON-NLS-1$ 511 512 break; 512 513 default: … … 515 516 switch (style) { 516 517 case LAT_CAN: 517 image += "_Can_Green_Red_Green"; 518 image += "_Can_Green_Red_Green"; //$NON-NLS-1$ 518 519 break; 519 520 case LAT_PILLAR: 520 image += "_Pillar_Green_Red_Green"; 521 image += "_Pillar_Green_Red_Green"; //$NON-NLS-1$ 521 522 break; 522 523 case LAT_SPAR: 523 image += "_Spar_Green_Red_Green"; 524 image += "_Spar_Green_Red_Green"; //$NON-NLS-1$ 524 525 break; 525 526 case LAT_BEACON: 526 image += "_Beacon_Green_Red_Green"; 527 image += "_Beacon_Green_Red_Green"; //$NON-NLS-1$ 527 528 break; 528 529 case LAT_TOWER: 529 image += "_Tower_Green_Red_Green"; 530 image += "_Tower_Green_Red_Green"; //$NON-NLS-1$ 530 531 break; 531 532 case LAT_FLOAT: 532 image += "_Float_Green_Red_Green"; 533 image += "_Float_Green_Red_Green"; //$NON-NLS-1$ 533 534 break; 534 535 default: … … 540 541 switch (style) { 541 542 case LAT_CONE: 542 image += "_Cone_Green_Red_Green"; 543 image += "_Cone_Green_Red_Green"; //$NON-NLS-1$ 543 544 break; 544 545 case LAT_PILLAR: 545 image += "_Pillar_Green_Red_Green"; 546 image += "_Pillar_Green_Red_Green"; //$NON-NLS-1$ 546 547 break; 547 548 case LAT_SPAR: 548 image += "_Spar_Green_Red_Green"; 549 image += "_Spar_Green_Red_Green"; //$NON-NLS-1$ 549 550 break; 550 551 case LAT_BEACON: 551 image += "_Beacon_Green_Red_Green"; 552 image += "_Beacon_Green_Red_Green"; //$NON-NLS-1$ 552 553 break; 553 554 case LAT_TOWER: 554 image += "_Tower_Green_Red_Green"; 555 image += "_Tower_Green_Red_Green"; //$NON-NLS-1$ 555 556 break; 556 557 case LAT_FLOAT: 557 image += "_Float_Green_Red_Green"; 558 image += "_Float_Green_Red_Green"; //$NON-NLS-1$ 558 559 break; 559 560 default: … … 562 563 switch (style) { 563 564 case LAT_CONE: 564 image += "_Cone_Red_Green_Red"; 565 image += "_Cone_Red_Green_Red"; //$NON-NLS-1$ 565 566 break; 566 567 case LAT_PILLAR: 567 image += "_Pillar_Red_Green_Red"; 568 image += "_Pillar_Red_Green_Red"; //$NON-NLS-1$ 568 569 break; 569 570 case LAT_SPAR: 570 image += "_Spar_Red_Green_Red"; 571 image += "_Spar_Red_Green_Red"; //$NON-NLS-1$ 571 572 break; 572 573 case LAT_BEACON: 573 image += "_Beacon_Red_Green_Red"; 574 image += "_Beacon_Red_Green_Red"; //$NON-NLS-1$ 574 575 break; 575 576 case LAT_TOWER: 576 image += "_Tower_Red_Green_Red"; 577 image += "_Tower_Red_Green_Red"; //$NON-NLS-1$ 577 578 break; 578 579 case LAT_FLOAT: 579 image += "_Float_Red_Green_Red"; 580 image += "_Float_Red_Green_Red"; //$NON-NLS-1$ 580 581 break; 581 582 default: … … 586 587 } 587 588 588 if (!image.equals("/images/Lateral")) { 589 if (!image.equals("/images/Lateral")) { //$NON-NLS-1$ 589 590 590 591 if (hasTopMark()) { 591 592 if (cat == PORT_HAND || cat == PREF_PORT_HAND) 592 image += "_Can"; 593 image += "_Can"; //$NON-NLS-1$ 593 594 else 594 image += "_Cone"; 595 } 596 image += ".png"; 595 image += "_Cone"; //$NON-NLS-1$ 596 } 597 image += ".png"; //$NON-NLS-1$ 597 598 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 598 599 599 600 if (hasRadar()) { 600 601 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource( 601 "/images/Radar_Reflector.png"))); 602 "/images/Radar_Reflector.png"))); //$NON-NLS-1$ 602 603 } 603 604 … … 615 616 616 617 int cat = getBuoyIndex(); 617 String shape = ""; 618 String colour = ""; 618 String shape = ""; //$NON-NLS-1$ 619 String colour = ""; //$NON-NLS-1$ 619 620 620 621 switch (cat) { … … 623 624 switch (getStyleIndex()) { 624 625 case LAT_CAN: 625 super.saveSign("buoy_lateral"); 626 Main.main.undoRedo.add(new ChangePropertyCommand(node, 627 "seamark:buoy_lateral:shape", "can")); 626 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 627 Main.main.undoRedo.add(new ChangePropertyCommand(node, 628 "seamark:buoy_lateral:shape", "can")); //$NON-NLS-1$ //$NON-NLS-2$ 628 629 break; 629 630 case LAT_PILLAR: 630 super.saveSign("buoy_lateral"); 631 Main.main.undoRedo.add(new ChangePropertyCommand(node, 632 "seamark:buoy_lateral:shape", "pillar")); 631 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 632 Main.main.undoRedo.add(new ChangePropertyCommand(node, 633 "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 633 634 break; 634 635 case LAT_SPAR: 635 super.saveSign("buoy_lateral"); 636 Main.main.undoRedo.add(new ChangePropertyCommand(node, 637 "seamark:buoy_lateral:shape", "spar")); 636 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 637 Main.main.undoRedo.add(new ChangePropertyCommand(node, 638 "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 638 639 break; 639 640 case LAT_BEACON: 640 super.saveSign("beacon_lateral"); 641 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 641 642 break; 642 643 case LAT_TOWER: 643 super.saveSign("beacon_lateral"); 644 Main.main.undoRedo.add(new ChangePropertyCommand(node, 645 "seamark:beacon_lateral:shape", "tower")); 644 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 645 Main.main.undoRedo.add(new ChangePropertyCommand(node, 646 "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 646 647 break; 647 648 case LAT_FLOAT: 648 super.saveSign("light_float"); 649 super.saveSign("light_float"); //$NON-NLS-1$ 649 650 break; 650 651 case LAT_PERCH: 651 super.saveSign("beacon_lateral"); 652 Main.main.undoRedo.add(new ChangePropertyCommand(node, 653 "seamark:beacon_lateral:shape", "perch")); 652 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 653 Main.main.undoRedo.add(new ChangePropertyCommand(node, 654 "seamark:beacon_lateral:shape", "perch")); //$NON-NLS-1$ //$NON-NLS-2$ 654 655 break; 655 656 default: … … 660 661 case LAT_SPAR: 661 662 Main.main.undoRedo.add(new ChangePropertyCommand(node, 662 "seamark:buoy_lateral:category", "port")); 663 if (getRegion() == IALA_A) { 664 Main.main.undoRedo.add(new ChangePropertyCommand(node, 665 "seamark:buoy_lateral:colour", "red")); 666 colour = "red"; 667 } else { 668 Main.main.undoRedo.add(new ChangePropertyCommand(node, 669 "seamark:buoy_lateral:colour", "green")); 670 colour = "green"; 663 "seamark:buoy_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$ 664 if (getRegion() == IALA_A) { 665 Main.main.undoRedo.add(new ChangePropertyCommand(node, 666 "seamark:buoy_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$ 667 colour = "red"; //$NON-NLS-1$ 668 } else { 669 Main.main.undoRedo.add(new ChangePropertyCommand(node, 670 "seamark:buoy_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$ 671 colour = "green"; //$NON-NLS-1$ 671 672 } 672 673 break; 673 674 case LAT_PERCH: 674 675 Main.main.undoRedo.add(new ChangePropertyCommand(node, 675 "seamark:beacon_lateral:category", "port")); 676 "seamark:beacon_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$ 676 677 break; 677 678 case LAT_BEACON: 678 679 case LAT_TOWER: 679 680 Main.main.undoRedo.add(new ChangePropertyCommand(node, 680 "seamark:beacon_lateral:category", "port")); 681 if (getRegion() == IALA_A) { 682 Main.main.undoRedo.add(new ChangePropertyCommand(node, 683 "seamark:beacon_lateral:colour", "red")); 684 colour = "red"; 685 } else { 686 Main.main.undoRedo.add(new ChangePropertyCommand(node, 687 "seamark:beacon_lateral:colour", "green")); 688 colour = "green"; 681 "seamark:beacon_lateral:category", "port")); //$NON-NLS-1$ //$NON-NLS-2$ 682 if (getRegion() == IALA_A) { 683 Main.main.undoRedo.add(new ChangePropertyCommand(node, 684 "seamark:beacon_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$ 685 colour = "red"; //$NON-NLS-1$ 686 } else { 687 Main.main.undoRedo.add(new ChangePropertyCommand(node, 688 "seamark:beacon_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$ 689 colour = "green"; //$NON-NLS-1$ 689 690 } 690 691 break; … … 692 693 if (getRegion() == IALA_A) { 693 694 Main.main.undoRedo.add(new ChangePropertyCommand(node, 694 "seamark:light_float:colour", "red")); 695 colour = "red"; 696 } else { 697 Main.main.undoRedo.add(new ChangePropertyCommand(node, 698 "seamark:light_float:colour", "green")); 699 colour = "green"; 700 } 701 break; 702 } 703 shape = "cylinder"; 695 "seamark:light_float:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$ 696 colour = "red"; //$NON-NLS-1$ 697 } else { 698 Main.main.undoRedo.add(new ChangePropertyCommand(node, 699 "seamark:light_float:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$ 700 colour = "green"; //$NON-NLS-1$ 701 } 702 break; 703 } 704 shape = "cylinder"; //$NON-NLS-1$ 704 705 break; 705 706 … … 707 708 switch (getStyleIndex()) { 708 709 case LAT_CAN: 709 super.saveSign("buoy_lateral"); 710 Main.main.undoRedo.add(new ChangePropertyCommand(node, 711 "seamark:buoy_lateral:shape", "can")); 710 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 711 Main.main.undoRedo.add(new ChangePropertyCommand(node, 712 "seamark:buoy_lateral:shape", "can")); //$NON-NLS-1$ //$NON-NLS-2$ 712 713 break; 713 714 case LAT_PILLAR: 714 super.saveSign("buoy_lateral"); 715 Main.main.undoRedo.add(new ChangePropertyCommand(node, 716 "seamark:buoy_lateral:shape", "pillar")); 715 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 716 Main.main.undoRedo.add(new ChangePropertyCommand(node, 717 "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 717 718 break; 718 719 case LAT_SPAR: 719 super.saveSign("buoy_lateral"); 720 Main.main.undoRedo.add(new ChangePropertyCommand(node, 721 "seamark:buoy_lateral:shape", "spar")); 720 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 721 Main.main.undoRedo.add(new ChangePropertyCommand(node, 722 "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 722 723 break; 723 724 case LAT_BEACON: 724 super.saveSign("beacon_lateral"); 725 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 725 726 break; 726 727 case LAT_TOWER: 727 super.saveSign("beacon_lateral"); 728 Main.main.undoRedo.add(new ChangePropertyCommand(node, 729 "seamark:beacon_lateral:shape", "tower")); 728 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 729 Main.main.undoRedo.add(new ChangePropertyCommand(node, 730 "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 730 731 break; 731 732 case LAT_FLOAT: 732 super.saveSign("light_float"); 733 super.saveSign("light_float"); //$NON-NLS-1$ 733 734 break; 734 735 default: … … 739 740 case LAT_SPAR: 740 741 Main.main.undoRedo.add(new ChangePropertyCommand(node, 741 "seamark:buoy_lateral:category", "preferred_channel_port")); 742 Main.main.undoRedo.add(new ChangePropertyCommand(node, 743 "seamark:buoy_lateral:colour_pattern", "horizontal stripes")); 744 if (getRegion() == IALA_A) { 745 Main.main.undoRedo.add(new ChangePropertyCommand(node, 746 "seamark:buoy_lateral:colour", "red;green;red")); 747 colour = "red"; 748 } else { 749 Main.main.undoRedo.add(new ChangePropertyCommand(node, 750 "seamark:buoy_lateral:colour", "green;red;green")); 751 colour = "green"; 742 "seamark:buoy_lateral:category", "preferred_channel_port")); //$NON-NLS-1$ //$NON-NLS-2$ 743 Main.main.undoRedo.add(new ChangePropertyCommand(node, 744 "seamark:buoy_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 745 if (getRegion() == IALA_A) { 746 Main.main.undoRedo.add(new ChangePropertyCommand(node, 747 "seamark:buoy_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$ 748 colour = "red"; //$NON-NLS-1$ 749 } else { 750 Main.main.undoRedo.add(new ChangePropertyCommand(node, 751 "seamark:buoy_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$ 752 colour = "green"; //$NON-NLS-1$ 752 753 } 753 754 break; … … 755 756 case LAT_TOWER: 756 757 Main.main.undoRedo.add(new ChangePropertyCommand(node, 757 "seamark:beacon_lateral:category", "preferred_channel_port")); 758 Main.main.undoRedo.add(new ChangePropertyCommand(node, 759 "seamark:beacon_lateral:colour_pattern", "horizontal stripes")); 760 if (getRegion() == IALA_A) { 761 Main.main.undoRedo.add(new ChangePropertyCommand(node, 762 "seamark:beacon_lateral:colour", "red;green;red")); 763 colour = "red"; 764 } else { 765 Main.main.undoRedo.add(new ChangePropertyCommand(node, 766 "seamark:beacon_lateral:colour", "green;red;green")); 767 colour = "green"; 758 "seamark:beacon_lateral:category", "preferred_channel_port")); //$NON-NLS-1$ //$NON-NLS-2$ 759 Main.main.undoRedo.add(new ChangePropertyCommand(node, 760 "seamark:beacon_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 761 if (getRegion() == IALA_A) { 762 Main.main.undoRedo.add(new ChangePropertyCommand(node, 763 "seamark:beacon_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$ 764 colour = "red"; //$NON-NLS-1$ 765 } else { 766 Main.main.undoRedo.add(new ChangePropertyCommand(node, 767 "seamark:beacon_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$ 768 colour = "green"; //$NON-NLS-1$ 768 769 } 769 770 break; 770 771 case LAT_FLOAT: 771 772 Main.main.undoRedo.add(new ChangePropertyCommand(node, 772 "seamark:light_float:colour_pattern", "horizontal stripes")); 773 if (getRegion() == IALA_A) { 774 Main.main.undoRedo.add(new ChangePropertyCommand(node, 775 "seamark:light_float:colour", "red;green;red")); 776 colour = "red"; 777 } else { 778 Main.main.undoRedo.add(new ChangePropertyCommand(node, 779 "seamark:light_float:colour", "green;red;green")); 780 colour = "green"; 781 } 782 break; 783 } 784 shape = "cylinder"; 773 "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 774 if (getRegion() == IALA_A) { 775 Main.main.undoRedo.add(new ChangePropertyCommand(node, 776 "seamark:light_float:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$ 777 colour = "red"; //$NON-NLS-1$ 778 } else { 779 Main.main.undoRedo.add(new ChangePropertyCommand(node, 780 "seamark:light_float:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$ 781 colour = "green"; //$NON-NLS-1$ 782 } 783 break; 784 } 785 shape = "cylinder"; //$NON-NLS-1$ 785 786 break; 786 787 … … 788 789 switch (getStyleIndex()) { 789 790 case LAT_CONE: 790 super.saveSign("buoy_lateral"); 791 Main.main.undoRedo.add(new ChangePropertyCommand(node, 792 "seamark:buoy_lateral:shape", "conical")); 791 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 792 Main.main.undoRedo.add(new ChangePropertyCommand(node, 793 "seamark:buoy_lateral:shape", "conical")); //$NON-NLS-1$ //$NON-NLS-2$ 793 794 break; 794 795 case LAT_PILLAR: 795 super.saveSign("buoy_lateral"); 796 Main.main.undoRedo.add(new ChangePropertyCommand(node, 797 "seamark:buoy_lateral:shape", "pillar")); 796 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 797 Main.main.undoRedo.add(new ChangePropertyCommand(node, 798 "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 798 799 break; 799 800 case LAT_SPAR: 800 super.saveSign("buoy_lateral"); 801 Main.main.undoRedo.add(new ChangePropertyCommand(node, 802 "seamark:buoy_lateral:shape", "spar")); 801 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 802 Main.main.undoRedo.add(new ChangePropertyCommand(node, 803 "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 803 804 break; 804 805 case LAT_BEACON: 805 super.saveSign("beacon_lateral"); 806 Main.main.undoRedo.add(new ChangePropertyCommand(node, 807 "seamark:beacon_lateral:shape", "stake")); 806 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 807 Main.main.undoRedo.add(new ChangePropertyCommand(node, 808 "seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$ 808 809 break; 809 810 case LAT_TOWER: 810 super.saveSign("beacon_lateral"); 811 Main.main.undoRedo.add(new ChangePropertyCommand(node, 812 "seamark:beacon_lateral:shape", "tower")); 811 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 812 Main.main.undoRedo.add(new ChangePropertyCommand(node, 813 "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 813 814 break; 814 815 case LAT_FLOAT: 815 super.saveSign("light_float"); 816 super.saveSign("light_float"); //$NON-NLS-1$ 816 817 break; 817 818 case LAT_PERCH: 818 super.saveSign("beacon_lateral"); 819 Main.main.undoRedo.add(new ChangePropertyCommand(node, 820 "seamark:beacon_lateral:shape", "perch")); 819 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 820 Main.main.undoRedo.add(new ChangePropertyCommand(node, 821 "seamark:beacon_lateral:shape", "perch")); //$NON-NLS-1$ //$NON-NLS-2$ 821 822 break; 822 823 default: … … 827 828 case LAT_SPAR: 828 829 Main.main.undoRedo.add(new ChangePropertyCommand(node, 829 "seamark:buoy_lateral:category", "starboard")); 830 if (getRegion() == IALA_A) { 831 Main.main.undoRedo.add(new ChangePropertyCommand(node, 832 "seamark:buoy_lateral:colour", "green")); 833 colour = "green"; 834 } else { 835 Main.main.undoRedo.add(new ChangePropertyCommand(node, 836 "seamark:buoy_lateral:colour", "red")); 837 colour = "red"; 830 "seamark:buoy_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$ 831 if (getRegion() == IALA_A) { 832 Main.main.undoRedo.add(new ChangePropertyCommand(node, 833 "seamark:buoy_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$ 834 colour = "green"; //$NON-NLS-1$ 835 } else { 836 Main.main.undoRedo.add(new ChangePropertyCommand(node, 837 "seamark:buoy_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$ 838 colour = "red"; //$NON-NLS-1$ 838 839 } 839 840 break; … … 841 842 case LAT_TOWER: 842 843 Main.main.undoRedo.add(new ChangePropertyCommand(node, 843 "seamark:beacon_lateral:category", "starboard")); 844 if (getRegion() == IALA_A) { 845 Main.main.undoRedo.add(new ChangePropertyCommand(node, 846 "seamark:beacon_lateral:colour", "green")); 847 colour = "green"; 848 } else { 849 Main.main.undoRedo.add(new ChangePropertyCommand(node, 850 "seamark:beacon_lateral:colour", "red")); 851 colour = "red"; 844 "seamark:beacon_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$ 845 if (getRegion() == IALA_A) { 846 Main.main.undoRedo.add(new ChangePropertyCommand(node, 847 "seamark:beacon_lateral:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$ 848 colour = "green"; //$NON-NLS-1$ 849 } else { 850 Main.main.undoRedo.add(new ChangePropertyCommand(node, 851 "seamark:beacon_lateral:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$ 852 colour = "red"; //$NON-NLS-1$ 852 853 } 853 854 break; … … 855 856 if (getRegion() == IALA_A) { 856 857 Main.main.undoRedo.add(new ChangePropertyCommand(node, 857 "seamark:light_float:colour", "green")); 858 colour = "green"; 859 } else { 860 Main.main.undoRedo.add(new ChangePropertyCommand(node, 861 "seamark:light_float:colour", "red")); 862 colour = "red"; 858 "seamark:light_float:colour", "green")); //$NON-NLS-1$ //$NON-NLS-2$ 859 colour = "green"; //$NON-NLS-1$ 860 } else { 861 Main.main.undoRedo.add(new ChangePropertyCommand(node, 862 "seamark:light_float:colour", "red")); //$NON-NLS-1$ //$NON-NLS-2$ 863 colour = "red"; //$NON-NLS-1$ 863 864 } 864 865 break; 865 866 case LAT_PERCH: 866 867 Main.main.undoRedo.add(new ChangePropertyCommand(node, 867 "seamark:beacon_lateral:category", "starboard")); 868 break; 869 } 870 shape = "cone, point up"; 868 "seamark:beacon_lateral:category", "starboard")); //$NON-NLS-1$ //$NON-NLS-2$ 869 break; 870 } 871 shape = "cone, point up"; //$NON-NLS-1$ 871 872 break; 872 873 … … 874 875 switch (getStyleIndex()) { 875 876 case LAT_CONE: 876 super.saveSign("buoy_lateral"); 877 Main.main.undoRedo.add(new ChangePropertyCommand(node, 878 "seamark:buoy_lateral:shape", "conical")); 877 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 878 Main.main.undoRedo.add(new ChangePropertyCommand(node, 879 "seamark:buoy_lateral:shape", "conical")); //$NON-NLS-1$ //$NON-NLS-2$ 879 880 break; 880 881 case LAT_PILLAR: 881 super.saveSign("buoy_lateral"); 882 Main.main.undoRedo.add(new ChangePropertyCommand(node, 883 "seamark:buoy_lateral:shape", "pillar")); 882 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 883 Main.main.undoRedo.add(new ChangePropertyCommand(node, 884 "seamark:buoy_lateral:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 884 885 break; 885 886 case LAT_SPAR: 886 super.saveSign("buoy_lateral"); 887 Main.main.undoRedo.add(new ChangePropertyCommand(node, 888 "seamark:buoy_lateral:shape", "spar")); 887 super.saveSign("buoy_lateral"); //$NON-NLS-1$ 888 Main.main.undoRedo.add(new ChangePropertyCommand(node, 889 "seamark:buoy_lateral:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 889 890 break; 890 891 case LAT_BEACON: 891 super.saveSign("beacon_lateral"); 892 Main.main.undoRedo.add(new ChangePropertyCommand(node, 893 "seamark:beacon_lateral:shape", "stake")); 892 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 893 Main.main.undoRedo.add(new ChangePropertyCommand(node, 894 "seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$ 894 895 break; 895 896 case LAT_TOWER: 896 super.saveSign("beacon_lateral"); 897 Main.main.undoRedo.add(new ChangePropertyCommand(node, 898 "seamark:beacon_lateral:shape", "tower")); 897 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 898 Main.main.undoRedo.add(new ChangePropertyCommand(node, 899 "seamark:beacon_lateral:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 899 900 break; 900 901 case LAT_FLOAT: 901 super.saveSign("light_float"); 902 super.saveSign("light_float"); //$NON-NLS-1$ 902 903 break; 903 904 default: … … 908 909 case LAT_SPAR: 909 910 Main.main.undoRedo.add(new ChangePropertyCommand(node, 910 "seamark:buoy_lateral:category", "preferred_channel_starboard")); 911 Main.main.undoRedo.add(new ChangePropertyCommand(node, 912 "seamark:buoy_lateral:colour_pattern", "horizontal stripes")); 913 if (getRegion() == IALA_A) { 914 Main.main.undoRedo.add(new ChangePropertyCommand(node, 915 "seamark:buoy_lateral:colour", "green;red;green")); 916 colour = "green"; 917 } else { 918 Main.main.undoRedo.add(new ChangePropertyCommand(node, 919 "seamark:buoy_lateral:colour", "red;green;red")); 920 colour = "red"; 911 "seamark:buoy_lateral:category", "preferred_channel_starboard")); //$NON-NLS-1$ //$NON-NLS-2$ 912 Main.main.undoRedo.add(new ChangePropertyCommand(node, 913 "seamark:buoy_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 914 if (getRegion() == IALA_A) { 915 Main.main.undoRedo.add(new ChangePropertyCommand(node, 916 "seamark:buoy_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$ 917 colour = "green"; //$NON-NLS-1$ 918 } else { 919 Main.main.undoRedo.add(new ChangePropertyCommand(node, 920 "seamark:buoy_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$ 921 colour = "red"; //$NON-NLS-1$ 921 922 } 922 923 break; … … 924 925 case LAT_TOWER: 925 926 Main.main.undoRedo.add(new ChangePropertyCommand(node, 926 "seamark:beacon_lateral:category", "preferred_channel_starboard")); 927 Main.main.undoRedo.add(new ChangePropertyCommand(node, 928 "seamark:beacon_lateral:colour_pattern", "horizontal stripes")); 929 if (getRegion() == IALA_A) { 930 Main.main.undoRedo.add(new ChangePropertyCommand(node, 931 "seamark:beacon_lateral:colour", "green;red;green")); 932 colour = "green"; 933 } else { 934 Main.main.undoRedo.add(new ChangePropertyCommand(node, 935 "seamark:beacon_lateral:colour", "red;green;red")); 936 colour = "red"; 927 "seamark:beacon_lateral:category", "preferred_channel_starboard")); //$NON-NLS-1$ //$NON-NLS-2$ 928 Main.main.undoRedo.add(new ChangePropertyCommand(node, 929 "seamark:beacon_lateral:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 930 if (getRegion() == IALA_A) { 931 Main.main.undoRedo.add(new ChangePropertyCommand(node, 932 "seamark:beacon_lateral:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$ 933 colour = "green"; //$NON-NLS-1$ 934 } else { 935 Main.main.undoRedo.add(new ChangePropertyCommand(node, 936 "seamark:beacon_lateral:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$ 937 colour = "red"; //$NON-NLS-1$ 937 938 } 938 939 break; 939 940 case LAT_FLOAT: 940 941 Main.main.undoRedo.add(new ChangePropertyCommand(node, 941 "seamark:light_float:colour_pattern", "horizontal stripes")); 942 if (getRegion() == IALA_A) { 943 Main.main.undoRedo.add(new ChangePropertyCommand(node, 944 "seamark:light_float:colour", "green;red;green")); 945 colour = "green"; 946 } else { 947 Main.main.undoRedo.add(new ChangePropertyCommand(node, 948 "seamark:light_float:colour", "red;green;red")); 949 colour = "red"; 950 } 951 break; 952 } 953 shape = "cone, point up"; 942 "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 943 if (getRegion() == IALA_A) { 944 Main.main.undoRedo.add(new ChangePropertyCommand(node, 945 "seamark:light_float:colour", "green;red;green")); //$NON-NLS-1$ //$NON-NLS-2$ 946 colour = "green"; //$NON-NLS-1$ 947 } else { 948 Main.main.undoRedo.add(new ChangePropertyCommand(node, 949 "seamark:light_float:colour", "red;green;red")); //$NON-NLS-1$ //$NON-NLS-2$ 950 colour = "red"; //$NON-NLS-1$ 951 } 952 break; 953 } 954 shape = "cone, point up"; //$NON-NLS-1$ 954 955 break; 955 956 … … 960 961 saveLightData(colour); 961 962 962 Main.pref.put("tomsplugin.IALA", getRegion() ? "B" : "A"); 963 Main.pref.put("tomsplugin.IALA", getRegion() ? "B" : "A"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 963 964 } 964 965 … … 966 967 if (getRegion() == IALA_A) { 967 968 if (getBuoyIndex() == PORT_HAND || getBuoyIndex() == PREF_PORT_HAND) 968 super.setLightColour("R"); 969 super.setLightColour("R"); //$NON-NLS-1$ 969 970 else 970 super.setLightColour("G"); 971 super.setLightColour("G"); //$NON-NLS-1$ 971 972 } else { 972 973 if (getBuoyIndex() == PORT_HAND || getBuoyIndex() == PREF_PORT_HAND) 973 super.setLightColour("G"); 974 super.setLightColour("G"); //$NON-NLS-1$ 974 975 else 975 super.setLightColour("R"); 976 super.setLightColour("R"); //$NON-NLS-1$ 976 977 } 977 978 } … … 988 989 case PREF_PORT_HAND: 989 990 if (getRegion() == IALA_A) { 990 if (str.equals("red")) { 991 if (str.equals("red")) { //$NON-NLS-1$ 991 992 setFired(true); 992 super.setLightColour("R"); 993 } else { 994 super.setLightColour(""); 993 super.setLightColour("R"); //$NON-NLS-1$ 994 } else { 995 super.setLightColour(""); //$NON-NLS-1$ 995 996 } 996 997 } else { 997 if (str.equals("green")) { 998 if (str.equals("green")) { //$NON-NLS-1$ 998 999 setFired(true); 999 super.setLightColour("G"); 1000 } else { 1001 super.setLightColour(""); 1000 super.setLightColour("G"); //$NON-NLS-1$ 1001 } else { 1002 super.setLightColour(""); //$NON-NLS-1$ 1002 1003 } 1003 1004 } … … 1007 1008 case PREF_STARBOARD_HAND: 1008 1009 if (getRegion() == IALA_A) { 1009 if (str.equals("green")) { 1010 if (str.equals("green")) { //$NON-NLS-1$ 1010 1011 setFired(true); 1011 super.setLightColour("G"); 1012 } else { 1013 super.setLightColour(""); 1012 super.setLightColour("G"); //$NON-NLS-1$ 1013 } else { 1014 super.setLightColour(""); //$NON-NLS-1$ 1014 1015 } 1015 1016 } else { 1016 if (str.equals("red")) { 1017 if (str.equals("red")) { //$NON-NLS-1$ 1017 1018 setFired(true); 1018 super.setLightColour("R"); 1019 } else { 1020 super.setLightColour(""); 1019 super.setLightColour("R"); //$NON-NLS-1$ 1020 } else { 1021 super.setLightColour(""); //$NON-NLS-1$ 1021 1022 } 1022 1023 }
Note:
See TracChangeset
for help on using the changeset viewer.