Changeset 23078 in osm for applications/editors/josm/plugins/toms/src
- Timestamp:
- 2010-09-09T00:04:57+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/Toms.java
r23001 r23078 47 47 SmpDialog.setUserHome(userHome); 48 48 Smp.setEnabled(false); 49 50 System.out.println(Messages.getString("Toms.2")); //$NON-NLS-1$51 49 } 52 50 -
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r23077 r23078 1329 1329 bM01Close = new JButton(); 1330 1330 bM01Close.setBounds(new Rectangle(20, 325, 110, 20)); 1331 bM01Close.setText( Messages.getString("SmpDialogAction.204")); //$NON-NLS-1$1331 bM01Close.setText(tr("close")); 1332 1332 bM01Close.addActionListener(new ActionListener() { 1333 1333 public void actionPerformed(ActionEvent e) { … … 1353 1353 bM01Save = new JButton(); 1354 1354 bM01Save.setBounds(new Rectangle(150, 325, 110, 20)); 1355 bM01Save.setText( Messages.getString("SmpDialogAction.205")); //$NON-NLS-1$1355 bM01Save.setText(tr("save")); 1356 1356 bM01Save.setEnabled(false); 1357 1357 -
applications/editors/josm/plugins/toms/src/toms/msg/messages.properties
r23074 r23078 6 6 Buoy.06=Tower 7 7 Buoy.07=Float 8 Buoy.08=Sphere Buoy 9 Buoy.09=Barrel 8 10 Buoy.10=Perch 9 Buoy.11=*Select Shape*10 Toms.2=Hello World11 11 SmpDialogAction.0=Seamark Editor 12 12 SmpDialogAction.1=Category: … … 66 66 SmpDialogAction.202=8 67 67 SmpDialogAction.203=9 68 SmpDialogAction.204=Close69 SmpDialogAction.205=Save70 68 SmpDialogAction.26=active layer contains no OSM data 71 69 SmpDialogAction.27=Please select a node … … 83 81 SmpDialogAction.211=Red X 84 82 SmpDialogAction.212=Not set 85 83 SmpDialogAction.213=*Select shape* -
applications/editors/josm/plugins/toms/src/toms/msg/messages_de.properties
r23074 r23078 1 1 Buoy.01=Bakentonne 2 2 Buoy.02=Stumpftonne 3 Buoy.03= Cone Buoy3 Buoy.03=Spitztonne 4 4 Buoy.04=Spierentonne 5 Buoy.05= Bake5 Buoy.05=Spiere 6 6 Buoy.06=Tower 7 7 Buoy.07=Floß 8 Buoy. 10=Perch9 Buoy. 11=*Wähle Form aus*10 Toms.2=Hallo Welt 8 Buoy.08=Kugeltonne 9 Buoy.09=Fasstonne 10 Buoy.10=Pricke 11 11 SmpDialogAction.0=Seezeichen Editor 12 12 SmpDialogAction.1=Kategorie: 13 13 SmpDialogAction.101=IALA 14 14 SmpDialogAction.103=Typ: 15 SmpDialogAction.107=Form: 15 16 SmpDialogAction.109=Name: 16 17 SmpDialogAction.111=Andere Eigenschaften: … … 65 66 SmpDialogAction.202=8 66 67 SmpDialogAction.203=9 67 SmpDialogAction.204=Abbrechen68 SmpDialogAction.205=Speichern69 68 SmpDialogAction.26=Aktive Ebene enthält keine OSM-Daten 70 69 SmpDialogAction.27=Bitte einen Knoten anwählen 71 70 SmpDialogAction.28=Bitte nur einen Knoten anwählen 71 SmpDialogAction.4=OpenSeaMap Editor 72 72 SmpDialogAction.9=Seekarten Editor 73 73 SmpDialogAction.91=Seezeichen nicht gesetzt 74 74 SmpDialogAction.97=Seezeichen: Eigenschaften 75 SmpDialogAction. 4=OpenSeaMap Editor75 SmpDialogAction.97=Region: 76 76 SmpDialogAction.206=Leuchtturm 77 77 SmpDialogAction.207=primäres Feuer … … 81 81 SmpDialogAction.211=X rot 82 82 SmpDialogAction.212=Unbekannt 83 SmpDialogAction.213=*Wähle Form aus* -
applications/editors/josm/plugins/toms/src/toms/msg/messages_en.properties
r23074 r23078 6 6 Buoy.06=Tower 7 7 Buoy.07=Float 8 Buoy.08=Sphere Buoy 9 Buoy.09=Barrel 8 10 Buoy.10=Perch 9 Buoy.11=*Select Shape*10 Toms.2=Hello World11 11 SmpDialogAction.0=Seamark Editor 12 12 SmpDialogAction.1=Category: … … 66 66 SmpDialogAction.202=8 67 67 SmpDialogAction.203=9 68 SmpDialogAction.204=Close69 SmpDialogAction.205=Save70 68 SmpDialogAction.26=active layer contains no OSM data 71 69 SmpDialogAction.27=Please select a node … … 83 81 SmpDialogAction.211=Red X 84 82 SmpDialogAction.212=Not set 83 SmpDialogAction.213=*Select shape* -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r23073 r23078 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 14 import toms.Messages; 14 15 import toms.dialogs.SmpDialogAction; 15 16 import toms.seamarks.SeaMark; … … 31 32 32 33 dlg.cbM01StyleOfMark.removeAllItems(); 33 dlg.cbM01StyleOfMark.addItem( "Not set");34 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");35 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");36 dlg.cbM01StyleOfMark.addItem( "Beacon");37 dlg.cbM01StyleOfMark.addItem( "Tower");38 dlg.cbM01StyleOfMark.addItem( "Float");34 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 35 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 36 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 37 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 38 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 39 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 39 40 dlg.cbM01StyleOfMark.setVisible(true); 40 41 dlg.lM01StyleOfMark.setVisible(true); 41 42 42 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); 43 if (keys.containsKey("name")) 44 setName(keys.get("name")); 45 46 if (keys.containsKey("seamark:name")) 47 setName(keys.get("seamark:name")); 48 49 if (keys.containsKey("seamark:buoy_cardinal:name")) 50 setName(keys.get("seamark:buoy_cardinal:name")); 51 else if (keys.containsKey("seamark:beacon_cardinal:name")) 52 setName(keys.get("seamark:beacon_cardinal:name")); 53 else if (keys.containsKey("seamark:light_float:name")) 54 setName(keys.get("seamark:light_float:name")); 55 56 String cat = ""; 57 String col = ""; 58 59 if (keys.containsKey("seamark:buoy_cardinal:category")) 60 cat = keys.get("seamark:buoy_cardinal:category"); 61 else if (keys.containsKey("seamark:beacon_cardinal:category")) 62 cat = keys.get("seamark:beacon_cardinal:category"); 63 64 if (keys.containsKey("seamark:buoy_cardinal:colour")) 65 col = keys.get("seamark:buoy_cardinal:colour"); 66 else if (keys.containsKey("seamark:beacon_cardinal:colour")) 67 col = keys.get("seamark:beacon_cardinal:colour"); 68 else if (keys.containsKey("seamark:light_float:colour")) 69 col = keys.get("seamark:light_float:colour"); 70 71 if (cat.equals("")) { 72 if (col.equals("black;yellow")) { 43 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ 44 if (keys.containsKey("name")) //$NON-NLS-1$ 45 setName(keys.get("name")); //$NON-NLS-1$ 46 47 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 48 setName(keys.get("seamark:name")); //$NON-NLS-1$ 49 50 if (keys.containsKey("seamark:buoy_cardinal:name")) //$NON-NLS-1$ 51 setName(keys.get("seamark:buoy_cardinal:name")); //$NON-NLS-1$ 52 else if (keys.containsKey("seamark:beacon_cardinal:name")) //$NON-NLS-1$ 53 setName(keys.get("seamark:beacon_cardinal:name")); //$NON-NLS-1$ 54 else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$ 55 setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$ 56 57 String cat = ""; //$NON-NLS-1$ 58 String col = ""; //$NON-NLS-1$ 59 60 if (keys.containsKey("seamark:buoy_cardinal:category")) //$NON-NLS-1$ 61 cat = keys.get("seamark:buoy_cardinal:category"); //$NON-NLS-1$ 62 else if (keys.containsKey("seamark:beacon_cardinal:category")) //$NON-NLS-1$ 63 cat = keys.get("seamark:beacon_cardinal:category"); //$NON-NLS-1$ 64 65 if (keys.containsKey("seamark:buoy_cardinal:colour")) //$NON-NLS-1$ 66 col = keys.get("seamark:buoy_cardinal:colour"); //$NON-NLS-1$ 67 else if (keys.containsKey("seamark:beacon_cardinal:colour")) //$NON-NLS-1$ 68 col = keys.get("seamark:beacon_cardinal:colour"); //$NON-NLS-1$ 69 else if (keys.containsKey("seamark:light_float:colour")) //$NON-NLS-1$ 70 col = keys.get("seamark:light_float:colour"); //$NON-NLS-1$ 71 72 if (cat.equals("")) { //$NON-NLS-1$ 73 if (col.equals("black;yellow")) { //$NON-NLS-1$ 73 74 setBuoyIndex(CARD_NORTH); 74 75 setColour(BLACK_YELLOW); 75 } else if (col.equals("black;yellow;black")) { 76 } else if (col.equals("black;yellow;black")) { //$NON-NLS-1$ 76 77 setBuoyIndex(CARD_EAST); 77 78 setColour(BLACK_YELLOW_BLACK); 78 } else if (col.equals("yellow;black")) { 79 } else if (col.equals("yellow;black")) { //$NON-NLS-1$ 79 80 setBuoyIndex(CARD_SOUTH); 80 81 setColour(YELLOW_BLACK); 81 } else if (col.equals("yellow;black;yellow")) { 82 } else if (col.equals("yellow;black;yellow")) { //$NON-NLS-1$ 82 83 setBuoyIndex(CARD_WEST); 83 84 setColour(YELLOW_BLACK_YELLOW); 84 85 } 85 } else if (cat.equals("north")) { 86 } else if (cat.equals("north")) { //$NON-NLS-1$ 86 87 setBuoyIndex(CARD_NORTH); 87 88 setColour(BLACK_YELLOW); 88 } else if (cat.equals("east")) { 89 } else if (cat.equals("east")) { //$NON-NLS-1$ 89 90 setBuoyIndex(CARD_EAST); 90 91 setColour(BLACK_YELLOW_BLACK); 91 } else if (cat.equals("south")) { 92 } else if (cat.equals("south")) { //$NON-NLS-1$ 92 93 setBuoyIndex(CARD_SOUTH); 93 94 setColour(YELLOW_BLACK); 94 } else if (cat.equals("west")) { 95 } else if (cat.equals("west")) { //$NON-NLS-1$ 95 96 setBuoyIndex(CARD_WEST); 96 97 setColour(YELLOW_BLACK_YELLOW); 97 98 } 98 99 99 if (keys.containsKey("seamark:buoy_cardinal:shape")) { 100 str = keys.get("seamark:buoy_cardinal:shape"); 101 102 if (str.equals("pillar")) 100 if (keys.containsKey("seamark:buoy_cardinal:shape")) { //$NON-NLS-1$ 101 str = keys.get("seamark:buoy_cardinal:shape"); //$NON-NLS-1$ 102 103 if (str.equals("pillar")) //$NON-NLS-1$ 103 104 setStyleIndex(CARD_PILLAR); 104 else if (str.equals("spar")) 105 else if (str.equals("spar")) //$NON-NLS-1$ 105 106 setStyleIndex(CARD_SPAR); 106 } else if (keys.containsKey("seamark:beacon_cardinal:colour")) { 107 if (keys.containsKey("seamark:beacon_cardinal:shape")) { 108 str = keys.get("seamark:beacon_cardinal:shape"); 109 110 if (str.equals("tower")) 107 } else if (keys.containsKey("seamark:beacon_cardinal:colour")) { //$NON-NLS-1$ 108 if (keys.containsKey("seamark:beacon_cardinal:shape")) { //$NON-NLS-1$ 109 str = keys.get("seamark:beacon_cardinal:shape"); //$NON-NLS-1$ 110 111 if (str.equals("tower")) //$NON-NLS-1$ 111 112 setStyleIndex(CARD_TOWER); 112 113 else … … 114 115 } else 115 116 setStyleIndex(CARD_BEACON); 116 } else if (keys.containsKey("seamark:type") 117 && (keys.get("seamark:type").equals("light_float"))) { 117 } else if (keys.containsKey("seamark:type") //$NON-NLS-1$ 118 && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$ 118 119 setStyleIndex(CARD_FLOAT); 119 120 } … … 121 122 refreshLights(); 122 123 123 if (keys.containsKey("seamark:light:colour")) { 124 str = keys.get("seamark:light:colour"); 125 126 if (keys.containsKey("seamark:light:character")) { 124 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 125 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 126 127 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 127 128 int i1; 128 129 String tmp = null; … … 130 131 setLightGroup(keys); 131 132 132 String c = keys.get("seamark:light:character"); 133 134 if (c.contains("+")) { 135 i1 = c.indexOf("+"); 133 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 134 135 if (c.contains("+")) { //$NON-NLS-1$ 136 i1 = c.indexOf("+"); //$NON-NLS-1$ 136 137 tmp = c.substring(i1, c.length()); 137 138 c = c.substring(0, i1); 138 139 } 139 140 140 if (getLightGroup() != "") 141 if (getLightGroup() != "") //$NON-NLS-1$ 141 142 if (tmp != null) { 142 143 c = c + tmp; … … 147 148 } 148 149 149 if (str.equals("white")) { 150 if (str.equals("white")) { //$NON-NLS-1$ 150 151 setFired(true); 151 setLightColour("W"); 152 setLightColour("W"); //$NON-NLS-1$ 152 153 } 153 154 } … … 158 159 159 160 dlg.cbM01Kennung.removeAllItems(); 160 dlg.cbM01Kennung.addItem( "Not set");161 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 161 162 dlg.cbM01Kennung.setSelectedIndex(0); 162 163 163 164 switch (type) { 164 165 case SeaMark.CARD_NORTH: 165 dlg.cbM01Kennung.addItem("Q"); 166 dlg.cbM01Kennung.addItem("VQ"); 166 dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$ 167 dlg.cbM01Kennung.addItem("VQ"); //$NON-NLS-1$ 167 168 break; 168 169 169 170 case SeaMark.CARD_EAST: 170 dlg.cbM01Kennung.addItem("Q(3)"); 171 dlg.cbM01Kennung.addItem("VQ(3)"); 171 dlg.cbM01Kennung.addItem("Q(3)"); //$NON-NLS-1$ 172 dlg.cbM01Kennung.addItem("VQ(3)"); //$NON-NLS-1$ 172 173 break; 173 174 174 175 case SeaMark.CARD_SOUTH: 175 dlg.cbM01Kennung.addItem("Q(6)+LFl"); 176 dlg.cbM01Kennung.addItem("VQ(6)+LFl"); 176 dlg.cbM01Kennung.addItem("Q(6)+LFl"); //$NON-NLS-1$ 177 dlg.cbM01Kennung.addItem("VQ(6)+LFl"); //$NON-NLS-1$ 177 178 break; 178 179 179 180 case SeaMark.CARD_WEST: 180 dlg.cbM01Kennung.addItem("Q(9)"); 181 dlg.cbM01Kennung.addItem("VQ(9)"); 181 dlg.cbM01Kennung.addItem("Q(9)"); //$NON-NLS-1$ 182 dlg.cbM01Kennung.addItem("VQ(9)"); //$NON-NLS-1$ 182 183 break; 183 184 … … 213 214 dlg.cM01Fired.setVisible(true); 214 215 215 String image = "/images/Cardinal"; 216 String image = "/images/Cardinal"; //$NON-NLS-1$ 216 217 217 218 switch (getStyleIndex()) { 218 219 case SeaMark.CARD_PILLAR: 219 image += "_Pillar"; 220 image += "_Pillar"; //$NON-NLS-1$ 220 221 break; 221 222 222 223 case SeaMark.CARD_SPAR: 223 image += "_Spar"; 224 image += "_Spar"; //$NON-NLS-1$ 224 225 break; 225 226 226 227 case SeaMark.CARD_BEACON: 227 image += "_Beacon"; 228 image += "_Beacon"; //$NON-NLS-1$ 228 229 break; 229 230 230 231 case SeaMark.CARD_TOWER: 231 image += "_Tower"; 232 image += "_Tower"; //$NON-NLS-1$ 232 233 break; 233 234 234 235 case SeaMark.CARD_FLOAT: 235 image += "_Float"; 236 image += "_Float"; //$NON-NLS-1$ 236 237 break; 237 238 … … 242 243 switch (getBuoyIndex()) { 243 244 case CARD_NORTH: 244 image += "_North"; 245 image += "_North"; //$NON-NLS-1$ 245 246 break; 246 247 case CARD_EAST: 247 image += "_East"; 248 image += "_East"; //$NON-NLS-1$ 248 249 break; 249 250 case CARD_SOUTH: 250 image += "_South"; 251 image += "_South"; //$NON-NLS-1$ 251 252 break; 252 253 case CARD_WEST: 253 image += "_West"; 254 image += "_West"; //$NON-NLS-1$ 254 255 break; 255 256 default: … … 257 258 } 258 259 259 if (!image.equals("/images/Cardinal")) { 260 image += ".png"; 260 if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$ 261 image += ".png"; //$NON-NLS-1$ 261 262 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 262 263 … … 267 268 268 269 public void setLightColour() { 269 super.setLightColour("W"); 270 super.setLightColour("W"); //$NON-NLS-1$ 270 271 } 271 272 … … 276 277 } 277 278 278 String shape = ""; 279 String shape = ""; //$NON-NLS-1$ 279 280 280 281 switch (getStyleIndex()) { 281 282 case CARD_PILLAR: 282 super.saveSign("buoy_cardinal"); 283 Main.main.undoRedo.add(new ChangePropertyCommand(node, 284 "seamark:buoy_cardinal:shape", "pillar")); 283 super.saveSign("buoy_cardinal"); //$NON-NLS-1$ 284 Main.main.undoRedo.add(new ChangePropertyCommand(node, 285 "seamark:buoy_cardinal:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 285 286 break; 286 287 case CARD_SPAR: 287 super.saveSign("buoy_cardinal"); 288 Main.main.undoRedo.add(new ChangePropertyCommand(node, 289 "seamark:buoy_cardinal:shape", "spar")); 288 super.saveSign("buoy_cardinal"); //$NON-NLS-1$ 289 Main.main.undoRedo.add(new ChangePropertyCommand(node, 290 "seamark:buoy_cardinal:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 290 291 break; 291 292 case CARD_BEACON: 292 super.saveSign("beacon_cardinal"); 293 super.saveSign("beacon_cardinal"); //$NON-NLS-1$ 293 294 break; 294 295 case CARD_TOWER: 295 super.saveSign("beacon_cardinal"); 296 Main.main.undoRedo.add(new ChangePropertyCommand(node, 297 "seamark:beacon_cardinal:shape", "tower")); 296 super.saveSign("beacon_cardinal"); //$NON-NLS-1$ 297 Main.main.undoRedo.add(new ChangePropertyCommand(node, 298 "seamark:beacon_cardinal:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 298 299 break; 299 300 case CARD_FLOAT: 300 super.saveSign("light_float"); 301 super.saveSign("light_float"); //$NON-NLS-1$ 301 302 break; 302 303 default: … … 309 310 case SeaMark.CARD_NORTH: 310 311 Main.main.undoRedo.add(new ChangePropertyCommand(node, 311 "seamark:buoy_cardinal:category", "north")); 312 Main.main.undoRedo.add(new ChangePropertyCommand(node, 313 "seamark:buoy_cardinal:colour", "black;yellow")); 314 shape = "2 cones up"; 312 "seamark:buoy_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$ 313 Main.main.undoRedo.add(new ChangePropertyCommand(node, 314 "seamark:buoy_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 315 shape = "2 cones up"; //$NON-NLS-1$ 315 316 break; 316 317 317 318 case SeaMark.CARD_EAST: 318 319 Main.main.undoRedo.add(new ChangePropertyCommand(node, 319 "seamark:buoy_cardinal:category", "east")); 320 Main.main.undoRedo.add(new ChangePropertyCommand(node, 321 "seamark:buoy_cardinal:colour", "black;yellow;black")); 322 shape = "2 cones base together"; 320 "seamark:buoy_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$ 321 Main.main.undoRedo.add(new ChangePropertyCommand(node, 322 "seamark:buoy_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 323 shape = "2 cones base together"; //$NON-NLS-1$ 323 324 break; 324 325 325 326 case SeaMark.CARD_SOUTH: 326 327 Main.main.undoRedo.add(new ChangePropertyCommand(node, 327 "seamark:buoy_cardinal:category", "south")); 328 Main.main.undoRedo.add(new ChangePropertyCommand(node, 329 "seamark:buoy_cardinal:colour", "yellow;black")); 330 shape = "2 cones down"; 328 "seamark:buoy_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$ 329 Main.main.undoRedo.add(new ChangePropertyCommand(node, 330 "seamark:buoy_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 331 shape = "2 cones down"; //$NON-NLS-1$ 331 332 break; 332 333 333 334 case SeaMark.CARD_WEST: 334 335 Main.main.undoRedo.add(new ChangePropertyCommand(node, 335 "seamark:buoy_cardinal:category", "west")); 336 Main.main.undoRedo.add(new ChangePropertyCommand(node, 337 "seamark:buoy_cardinal:colour", "yellow;black;yellow")); 338 shape = "2 cones point together"; 339 break; 340 } 341 Main.main.undoRedo.add(new ChangePropertyCommand(node, 342 "seamark:buoy_cardinal:colour_pattern", "horizontal stripes")); 336 "seamark:buoy_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$ 337 Main.main.undoRedo.add(new ChangePropertyCommand(node, 338 "seamark:buoy_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 339 shape = "2 cones point together"; //$NON-NLS-1$ 340 break; 341 } 342 Main.main.undoRedo.add(new ChangePropertyCommand(node, 343 "seamark:buoy_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 343 344 break; 344 345 case CARD_BEACON: … … 347 348 case SeaMark.CARD_NORTH: 348 349 Main.main.undoRedo.add(new ChangePropertyCommand(node, 349 "seamark:beacon_cardinal:category", "north")); 350 Main.main.undoRedo.add(new ChangePropertyCommand(node, 351 "seamark:beacon_cardinal:colour", "black;yellow")); 352 shape = "2 cones up"; 350 "seamark:beacon_cardinal:category", "north")); //$NON-NLS-1$ //$NON-NLS-2$ 351 Main.main.undoRedo.add(new ChangePropertyCommand(node, 352 "seamark:beacon_cardinal:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 353 shape = "2 cones up"; //$NON-NLS-1$ 353 354 break; 354 355 355 356 case SeaMark.CARD_EAST: 356 357 Main.main.undoRedo.add(new ChangePropertyCommand(node, 357 "seamark:beacon_cardinal:category", "east")); 358 Main.main.undoRedo.add(new ChangePropertyCommand(node, 359 "seamark:beacon_cardinal:colour", "black;yellow;black")); 360 shape = "2 cones base together"; 358 "seamark:beacon_cardinal:category", "east")); //$NON-NLS-1$ //$NON-NLS-2$ 359 Main.main.undoRedo.add(new ChangePropertyCommand(node, 360 "seamark:beacon_cardinal:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 361 shape = "2 cones base together"; //$NON-NLS-1$ 361 362 break; 362 363 363 364 case SeaMark.CARD_SOUTH: 364 365 Main.main.undoRedo.add(new ChangePropertyCommand(node, 365 "seamark:beacon_cardinal:category", "south")); 366 Main.main.undoRedo.add(new ChangePropertyCommand(node, 367 "seamark:beacon_cardinal:colour", "yellow;black")); 368 shape = "2 cones down"; 366 "seamark:beacon_cardinal:category", "south")); //$NON-NLS-1$ //$NON-NLS-2$ 367 Main.main.undoRedo.add(new ChangePropertyCommand(node, 368 "seamark:beacon_cardinal:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 369 shape = "2 cones down"; //$NON-NLS-1$ 369 370 break; 370 371 371 372 case SeaMark.CARD_WEST: 372 373 Main.main.undoRedo.add(new ChangePropertyCommand(node, 373 "seamark:beacon_cardinal:category", "west")); 374 Main.main.undoRedo.add(new ChangePropertyCommand(node, 375 "seamark:beacon_cardinal:colour", "yellow;black;yellow")); 376 shape = "2 cones point together"; 377 break; 378 } 379 Main.main.undoRedo.add(new ChangePropertyCommand(node, 380 "seamark:beacon_cardinal:colour_pattern", "horizontal stripes")); 374 "seamark:beacon_cardinal:category", "west")); //$NON-NLS-1$ //$NON-NLS-2$ 375 Main.main.undoRedo.add(new ChangePropertyCommand(node, 376 "seamark:beacon_cardinal:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 377 shape = "2 cones point together"; //$NON-NLS-1$ 378 break; 379 } 380 Main.main.undoRedo.add(new ChangePropertyCommand(node, 381 "seamark:beacon_cardinal:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 381 382 break; 382 383 case CARD_FLOAT: … … 384 385 case SeaMark.CARD_NORTH: 385 386 Main.main.undoRedo.add(new ChangePropertyCommand(node, 386 "seamark:light_float:colour", "black;yellow")); 387 shape = "2 cones up"; 387 "seamark:light_float:colour", "black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 388 shape = "2 cones up"; //$NON-NLS-1$ 388 389 break; 389 390 390 391 case SeaMark.CARD_EAST: 391 392 Main.main.undoRedo.add(new ChangePropertyCommand(node, 392 "seamark:light_float:colour", "black;yellow;black")); 393 shape = "2 cones base together"; 393 "seamark:light_float:colour", "black;yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 394 shape = "2 cones base together"; //$NON-NLS-1$ 394 395 break; 395 396 396 397 case SeaMark.CARD_SOUTH: 397 398 Main.main.undoRedo.add(new ChangePropertyCommand(node, 398 "seamark:light_float:colour", "yellow;black")); 399 shape = "2 cones down"; 399 "seamark:light_float:colour", "yellow;black")); //$NON-NLS-1$ //$NON-NLS-2$ 400 shape = "2 cones down"; //$NON-NLS-1$ 400 401 break; 401 402 402 403 case SeaMark.CARD_WEST: 403 404 Main.main.undoRedo.add(new ChangePropertyCommand(node, 404 "seamark:light_float:colour", "yellow;black;yellow")); 405 shape = "2 cones point together"; 406 break; 407 } 408 Main.main.undoRedo.add(new ChangePropertyCommand(node, 409 "seamark:light_float:colour_pattern", "horizontal stripes")); 410 break; 411 } 412 saveTopMarkData(shape, "black"); 413 saveLightData("white"); 405 "seamark:light_float:colour", "yellow;black;yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 406 shape = "2 cones point together"; //$NON-NLS-1$ 407 break; 408 } 409 Main.main.undoRedo.add(new ChangePropertyCommand(node, 410 "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 411 break; 412 } 413 saveTopMarkData(shape, "black"); //$NON-NLS-1$ 414 saveLightData("white"); //$NON-NLS-1$ 414 415 saveRadarFogData(); 415 416 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r23073 r23078 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 14 import toms.Messages; 14 15 import toms.dialogs.SmpDialogAction; 15 16 import toms.seamarks.SeaMark; … … 27 28 28 29 dlg.cbM01StyleOfMark.removeAllItems(); 29 dlg.cbM01StyleOfMark.addItem( "Not set");30 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");31 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");32 dlg.cbM01StyleOfMark.addItem( "Beacon");33 dlg.cbM01StyleOfMark.addItem( "Tower");34 dlg.cbM01StyleOfMark.addItem( "Float");30 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 31 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 32 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 33 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 34 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 35 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 35 36 dlg.cbM01StyleOfMark.setVisible(true); 36 37 dlg.lM01StyleOfMark.setVisible(true); 37 38 38 39 dlg.cbM01Kennung.removeAllItems(); 39 dlg.cbM01Kennung.addItem( "Not set");40 dlg.cbM01Kennung.addItem("Fl(2)"); 40 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 41 dlg.cbM01Kennung.addItem("Fl(2)"); //$NON-NLS-1$ 41 42 42 43 setBuoyIndex(ISOLATED_DANGER); 43 44 setColour(SeaMark.BLACK_RED_BLACK); 44 setLightColour("W"); 45 setLightColour("W"); //$NON-NLS-1$ 45 46 setTopMark(true); 46 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); 47 48 if (keys.containsKey("name")) 49 setName(keys.get("name")); 50 51 if (keys.containsKey("seamark:name")) 52 setName(keys.get("seamark:name")); 53 54 if (keys.containsKey("seamark:buoy_isolated_danger:name")) 55 setName(keys.get("seamark:buoy_isolated_danger:name")); 56 else if (keys.containsKey("seamark:beacon_isolated_danger:name")) 57 setName(keys.get("seamark:beacon_isolated_danger:name")); 58 else if (keys.containsKey("seamark:light_float:name")) 59 setName(keys.get("seamark:light_float:name")); 60 61 if (keys.containsKey("seamark:buoy_isolated_danger:shape")) { 62 str = keys.get("seamark:buoy_isolated_danger:shape"); 63 64 if (str.equals("pillar")) 47 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ 48 49 if (keys.containsKey("name")) //$NON-NLS-1$ 50 setName(keys.get("name")); //$NON-NLS-1$ 51 52 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 53 setName(keys.get("seamark:name")); //$NON-NLS-1$ 54 55 if (keys.containsKey("seamark:buoy_isolated_danger:name")) //$NON-NLS-1$ 56 setName(keys.get("seamark:buoy_isolated_danger:name")); //$NON-NLS-1$ 57 else if (keys.containsKey("seamark:beacon_isolated_danger:name")) //$NON-NLS-1$ 58 setName(keys.get("seamark:beacon_isolated_danger:name")); //$NON-NLS-1$ 59 else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$ 60 setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$ 61 62 if (keys.containsKey("seamark:buoy_isolated_danger:shape")) { //$NON-NLS-1$ 63 str = keys.get("seamark:buoy_isolated_danger:shape"); //$NON-NLS-1$ 64 65 if (str.equals("pillar")) //$NON-NLS-1$ 65 66 setStyleIndex(ISOL_PILLAR); 66 else if (str.equals("spar")) 67 else if (str.equals("spar")) //$NON-NLS-1$ 67 68 setStyleIndex(ISOL_SPAR); 68 } else if (keys.containsKey("seamark:beacon_isolated_danger:colour")) { 69 if (keys.containsKey("seamark:beacon_isolated_danger:shape")) { 70 str = keys.get("seamark:beacon_isolated_danger:shape"); 71 72 if (str.equals("tower")) 69 } else if (keys.containsKey("seamark:beacon_isolated_danger:colour")) { //$NON-NLS-1$ 70 if (keys.containsKey("seamark:beacon_isolated_danger:shape")) { //$NON-NLS-1$ 71 str = keys.get("seamark:beacon_isolated_danger:shape"); //$NON-NLS-1$ 72 73 if (str.equals("tower")) //$NON-NLS-1$ 73 74 setStyleIndex(ISOL_TOWER); 74 75 else … … 76 77 } else 77 78 setStyleIndex(ISOL_BEACON); 78 } else if (keys.containsKey("seamark:type") 79 && (keys.get("seamark:type").equals("light_float"))) { 79 } else if (keys.containsKey("seamark:type") //$NON-NLS-1$ 80 && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$ 80 81 setStyleIndex(CARD_FLOAT); 81 82 } 82 83 83 if (keys.containsKey("seamark:topmark:shape") 84 || keys.containsKey("seamark:topmark:colour")) { 84 if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$ 85 || keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$ 85 86 setTopMark(true); 86 87 } 87 88 88 if (keys.containsKey("seamark:light:colour")) { 89 str = keys.get("seamark:light:colour"); 90 91 if (keys.containsKey("seamark:light:character")) { 89 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 90 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 91 92 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 92 93 setLightGroup(keys); 93 String c = keys.get("seamark:light:character"); 94 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 94 95 setLightChar(c); 95 96 setLightPeriod(keys); 96 97 } 97 98 98 if (str.equals("white")) { 99 if (str.equals("white")) { //$NON-NLS-1$ 99 100 setFired(true); 100 setLightColour("W"); 101 setLightColour("W"); //$NON-NLS-1$ 101 102 } 102 103 } … … 124 125 dlg.cM01Fired.setVisible(true); 125 126 126 String image = "/images/Cardinal"; 127 String image = "/images/Cardinal"; //$NON-NLS-1$ 127 128 128 129 switch (getStyleIndex()) { 129 130 case ISOL_PILLAR: 130 image += "_Pillar_Single"; 131 image += "_Pillar_Single"; //$NON-NLS-1$ 131 132 break; 132 133 case ISOL_SPAR: 133 image += "_Spar_Single"; 134 image += "_Spar_Single"; //$NON-NLS-1$ 134 135 break; 135 136 case ISOL_BEACON: 136 image += "_Beacon_Single"; 137 image += "_Beacon_Single"; //$NON-NLS-1$ 137 138 break; 138 139 case ISOL_TOWER: 139 image += "_Tower_Single"; 140 image += "_Tower_Single"; //$NON-NLS-1$ 140 141 break; 141 142 case ISOL_FLOAT: 142 image += "_Float_Single"; 143 image += "_Float_Single"; //$NON-NLS-1$ 143 144 break; 144 145 default: 145 146 } 146 147 147 if (!image.equals("/images/Cardinal")) { 148 image += ".png"; 148 if (!image.equals("/images/Cardinal")) { //$NON-NLS-1$ 149 image += ".png"; //$NON-NLS-1$ 149 150 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 150 151 } else … … 152 153 } else { 153 154 dlg.tfM01Name.setEnabled(false); 154 dlg.tfM01Name.setText(""); 155 dlg.tfM01Name.setText(""); //$NON-NLS-1$ 155 156 dlg.cM01TopMark.setVisible(false); 156 157 dlg.cM01Radar.setVisible(false); … … 170 171 switch (getStyleIndex()) { 171 172 case ISOL_PILLAR: 172 super.saveSign("buoy_isolated_danger"); 173 Main.main.undoRedo.add(new ChangePropertyCommand(node, 174 "seamark:buoy_isolated_danger:shape", "pillar")); 173 super.saveSign("buoy_isolated_danger"); //$NON-NLS-1$ 174 Main.main.undoRedo.add(new ChangePropertyCommand(node, 175 "seamark:buoy_isolated_danger:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 175 176 break; 176 177 case ISOL_SPAR: 177 super.saveSign("buoy_isolated_danger"); 178 Main.main.undoRedo.add(new ChangePropertyCommand(node, 179 "seamark:buoy_isolated_danger:shape", "spar")); 178 super.saveSign("buoy_isolated_danger"); //$NON-NLS-1$ 179 Main.main.undoRedo.add(new ChangePropertyCommand(node, 180 "seamark:buoy_isolated_danger:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 180 181 break; 181 182 case ISOL_BEACON: 182 super.saveSign("beacon_isolated_danger"); 183 super.saveSign("beacon_isolated_danger"); //$NON-NLS-1$ 183 184 break; 184 185 case ISOL_TOWER: 185 super.saveSign("beacon_isolated_danger"); 186 Main.main.undoRedo.add(new ChangePropertyCommand(node, 187 "seamark:beacon_isolated_danger:shape", "tower")); 186 super.saveSign("beacon_isolated_danger"); //$NON-NLS-1$ 187 Main.main.undoRedo.add(new ChangePropertyCommand(node, 188 "seamark:beacon_isolated_danger:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 188 189 break; 189 190 case ISOL_FLOAT: 190 super.saveSign("light_float"); 191 super.saveSign("light_float"); //$NON-NLS-1$ 191 192 break; 192 193 default: … … 197 198 case ISOL_SPAR: 198 199 Main.main.undoRedo.add(new ChangePropertyCommand(node, 199 "seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes")); 200 Main.main.undoRedo.add(new ChangePropertyCommand(node, 201 "seamark:buoy_isolated_danger:colour", "black;red;black")); 200 "seamark:buoy_isolated_danger:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 201 Main.main.undoRedo.add(new ChangePropertyCommand(node, 202 "seamark:buoy_isolated_danger:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$ 202 203 break; 203 204 case ISOL_BEACON: … … 205 206 Main.main.undoRedo 206 207 .add(new ChangePropertyCommand(node, 207 "seamark:beacon_isolated_danger:colour_pattern", 208 "horizontal stripes")); 209 Main.main.undoRedo.add(new ChangePropertyCommand(node, 210 "seamark:beacon_isolated_danger:colour", "black;red;black")); 208 "seamark:beacon_isolated_danger:colour_pattern", //$NON-NLS-1$ 209 "horizontal stripes")); //$NON-NLS-1$ 210 Main.main.undoRedo.add(new ChangePropertyCommand(node, 211 "seamark:beacon_isolated_danger:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$ 211 212 break; 212 213 case ISOL_FLOAT: 213 214 Main.main.undoRedo.add(new ChangePropertyCommand(node, 214 "seamark:light_float:colour_pattern", "horizontal stripes")); 215 Main.main.undoRedo.add(new ChangePropertyCommand(node, 216 "seamark:light_float:colour", "black;red;black")); 217 break; 218 } 219 220 saveTopMarkData("2 spheres", "black"); 221 saveLightData("white"); 215 "seamark:light_float:colour_pattern", "horizontal stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 216 Main.main.undoRedo.add(new ChangePropertyCommand(node, 217 "seamark:light_float:colour", "black;red;black")); //$NON-NLS-1$ //$NON-NLS-2$ 218 break; 219 } 220 221 saveTopMarkData("2 spheres", "black"); //$NON-NLS-1$ //$NON-NLS-2$ 222 saveLightData("white"); //$NON-NLS-1$ 222 223 saveRadarFogData(); 223 224 … … 225 226 226 227 public void setLightColour() { 227 super.setLightColour("W"); 228 super.setLightColour("W"); //$NON-NLS-1$ 228 229 } 229 230 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23073 r23078 293 293 294 294 dlg.cbM01StyleOfMark.removeAllItems(); 295 dlg.cbM01StyleOfMark.addItem(Messages.getString(" Buoy.11")); //$NON-NLS-1$295 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.213")); //$NON-NLS-1$ 296 296 297 297 switch (type) { -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r23074 r23078 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 14 import toms.Messages; 14 15 import toms.dialogs.SmpDialogAction; 15 16 import toms.seamarks.SeaMark; … … 31 32 32 33 dlg.cbM01Kennung.removeAllItems(); 33 dlg.cbM01Kennung.addItem( "Not set");34 dlg.cbM01Kennung.addItem("Fl"); 35 dlg.cbM01Kennung.addItem("Fl()"); 36 dlg.cbM01Kennung.addItem("Oc()"); 37 dlg.cbM01Kennung.addItem("Q"); 38 dlg.cbM01Kennung.addItem("IQ"); 34 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 35 dlg.cbM01Kennung.addItem("Fl"); //$NON-NLS-1$ 36 dlg.cbM01Kennung.addItem("Fl()"); //$NON-NLS-1$ 37 dlg.cbM01Kennung.addItem("Oc()"); //$NON-NLS-1$ 38 dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$ 39 dlg.cbM01Kennung.addItem("IQ"); //$NON-NLS-1$ 39 40 dlg.cbM01Kennung.setSelectedIndex(0); 40 41 … … 73 74 case SeaMark.LIGHT_HOUSE: 74 75 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 75 "/images/Light_House.png"))); 76 "/images/Light_House.png"))); //$NON-NLS-1$ 76 77 break; 77 78 78 79 case SeaMark.LIGHT_MAJOR: 79 80 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 80 "/images/Light_Major.png"))); 81 "/images/Light_Major.png"))); //$NON-NLS-1$ 81 82 break; 82 83 83 84 case SeaMark.LIGHT_MINOR: 84 85 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 85 "/images/Light_Minor.png"))); 86 "/images/Light_Minor.png"))); //$NON-NLS-1$ 86 87 break; 87 88 88 89 case SeaMark.LIGHT_VESSEL: 89 90 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 90 "/images/Major_Float.png"))); 91 "/images/Major_Float.png"))); //$NON-NLS-1$ 91 92 break; 92 93 … … 105 106 switch (getStyleIndex()) { 106 107 case LIGHT_HOUSE: 107 super.saveSign("lighthouse"); 108 super.saveSign("lighthouse"); //$NON-NLS-1$ 108 109 break; 109 110 case LIGHT_MAJOR: 110 super.saveSign("major_light"); 111 super.saveSign("major_light"); //$NON-NLS-1$ 111 112 break; 112 113 case LIGHT_MINOR: 113 super.saveSign("minor_light"); 114 super.saveSign("minor_light"); //$NON-NLS-1$ 114 115 break; 115 116 default: 116 117 } 117 saveLightData("white"); 118 saveLightData("white"); //$NON-NLS-1$ 118 119 saveRadarFogData(); 119 120 } … … 135 136 keys = node.getKeys(); 136 137 137 if (keys.containsKey("seamark:light:colour")) { 138 str = keys.get("seamark:light:colour"); 138 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 139 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 139 140 140 if (keys.containsKey("seamark:light:character")) { 141 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 141 142 setLightGroup(keys); 142 143 143 String c = keys.get("seamark:light:character"); 144 if (getLightGroup() != "") 145 c = c + "(" + getLightGroup() + ")"; 144 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 145 if (getLightGroup() != "") //$NON-NLS-1$ 146 c = c + "(" + getLightGroup() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ 146 147 setLightChar(c); 147 148 setLightPeriod(keys); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r23073 r23078 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 14 import toms.Messages; 14 15 import toms.dialogs.SmpDialogAction; 15 16 import toms.seamarks.SeaMark; … … 27 28 28 29 dlg.cbM01StyleOfMark.removeAllItems(); 29 dlg.cbM01StyleOfMark.addItem( "Not set");30 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");31 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");32 dlg.cbM01StyleOfMark.addItem( "Sphere Buoy");33 dlg.cbM01StyleOfMark.addItem( "Beacon");34 dlg.cbM01StyleOfMark.addItem( "Float");30 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 31 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 32 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 33 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.08")); //$NON-NLS-1$ 34 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 35 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 35 36 dlg.cbM01StyleOfMark.setVisible(true); 36 37 dlg.lM01StyleOfMark.setVisible(true); 37 38 38 39 dlg.cbM01Kennung.removeAllItems(); 39 dlg.cbM01Kennung.addItem( "Not set");40 dlg.cbM01Kennung.addItem("Iso"); 41 dlg.cbM01Kennung.addItem("Oc"); 42 dlg.cbM01Kennung.addItem("LFl"); 43 dlg.cbM01Kennung.addItem("Mo()"); 40 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 41 dlg.cbM01Kennung.addItem("Iso"); //$NON-NLS-1$ 42 dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$ 43 dlg.cbM01Kennung.addItem("LFl"); //$NON-NLS-1$ 44 dlg.cbM01Kennung.addItem("Mo()"); //$NON-NLS-1$ 44 45 45 46 setBuoyIndex(SAFE_WATER); 46 47 setColour(SeaMark.RED_WHITE); 47 setLightColour("W"); 48 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); 49 50 if (keys.containsKey("name")) 51 setName(keys.get("name")); 52 53 if (keys.containsKey("seamark:name")) 54 setName(keys.get("seamark:name")); 55 56 if (keys.containsKey("seamark:buoy_safe_water:name")) 57 setName(keys.get("seamark:buoy_safe_water:name")); 58 else if (keys.containsKey("seamark:beacon_safe_water:name")) 59 setName(keys.get("seamark:beacon_safe_water:name")); 60 else if (keys.containsKey("seamark:light_float:name")) 61 setName(keys.get("seamark:light_float:name")); 62 63 if (keys.containsKey("seamark:buoy_safe_water:shape")) { 64 str = keys.get("seamark:buoy_safe_water:shape"); 65 66 if (str.equals("pillar")) 48 setLightColour("W"); //$NON-NLS-1$ 49 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ 50 51 if (keys.containsKey("name")) //$NON-NLS-1$ 52 setName(keys.get("name")); //$NON-NLS-1$ 53 54 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 55 setName(keys.get("seamark:name")); //$NON-NLS-1$ 56 57 if (keys.containsKey("seamark:buoy_safe_water:name")) //$NON-NLS-1$ 58 setName(keys.get("seamark:buoy_safe_water:name")); //$NON-NLS-1$ 59 else if (keys.containsKey("seamark:beacon_safe_water:name")) //$NON-NLS-1$ 60 setName(keys.get("seamark:beacon_safe_water:name")); //$NON-NLS-1$ 61 else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$ 62 setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$ 63 64 if (keys.containsKey("seamark:buoy_safe_water:shape")) { //$NON-NLS-1$ 65 str = keys.get("seamark:buoy_safe_water:shape"); //$NON-NLS-1$ 66 67 if (str.equals("pillar")) //$NON-NLS-1$ 67 68 setStyleIndex(SAFE_PILLAR); 68 else if (str.equals("spar")) 69 else if (str.equals("spar")) //$NON-NLS-1$ 69 70 setStyleIndex(SAFE_SPAR); 70 else if (str.equals("sphere")) 71 else if (str.equals("sphere")) //$NON-NLS-1$ 71 72 setStyleIndex(SAFE_SPHERE); 72 } else if ((keys.containsKey("seamark:type")) 73 && (keys.get("seamark:type").equals("light_float"))) { 73 } else if ((keys.containsKey("seamark:type")) //$NON-NLS-1$ 74 && (keys.get("seamark:type").equals("light_float"))) { //$NON-NLS-1$ //$NON-NLS-2$ 74 75 setStyleIndex(SAFE_FLOAT); 75 } else if ((keys.containsKey("seamark:type")) 76 && (keys.get("seamark:type").equals("beacon_safe_water"))) { 76 } else if ((keys.containsKey("seamark:type")) //$NON-NLS-1$ 77 && (keys.get("seamark:type").equals("beacon_safe_water"))) { //$NON-NLS-1$ //$NON-NLS-2$ 77 78 setStyleIndex(SAFE_BEACON); 78 79 } 79 80 80 if (keys.containsKey("seamark:light:colour")) { 81 str = keys.get("seamark:light:colour"); 82 83 if (keys.containsKey("seamark:light:character")) { 81 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 82 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 83 84 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 84 85 setLightGroup(keys); 85 String c = keys.get("seamark:light:character"); 86 if (getLightGroup() != "") 87 c = c + "(" + getLightGroup() + ")"; 86 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 87 if (getLightGroup() != "") //$NON-NLS-1$ 88 c = c + "(" + getLightGroup() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ 88 89 setLightChar(c); 89 90 setLightPeriod(keys); 90 91 } 91 92 92 if (str.equals("white")) { 93 if (str.equals("white")) { //$NON-NLS-1$ 93 94 setFired(true); 94 setLightColour("W"); 95 setLightColour("W"); //$NON-NLS-1$ 95 96 } 96 97 } 97 98 98 if (keys.containsKey("seamark:topmark:shape") 99 || keys.containsKey("seamark:topmark:colour")) { 99 if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$ 100 || keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$ 100 101 setTopMark(true); 101 102 } … … 130 131 dlg.cM01Fired.setEnabled(true); 131 132 132 String image = "/images/Safe_Water"; 133 String image = "/images/Safe_Water"; //$NON-NLS-1$ 133 134 134 135 switch (getStyleIndex()) { 135 136 case SAFE_PILLAR: 136 image += "_Pillar"; 137 image += "_Pillar"; //$NON-NLS-1$ 137 138 break; 138 139 case SAFE_SPAR: 139 image += "_Spar"; 140 image += "_Spar"; //$NON-NLS-1$ 140 141 break; 141 142 case SAFE_SPHERE: 142 image += "_Sphere"; 143 image += "_Sphere"; //$NON-NLS-1$ 143 144 break; 144 145 case SAFE_BEACON: 145 image += "_Beacon"; 146 image += "_Beacon"; //$NON-NLS-1$ 146 147 break; 147 148 case SAFE_FLOAT: 148 image += "_Float"; 149 image += "_Float"; //$NON-NLS-1$ 149 150 break; 150 151 default: 151 152 } 152 153 153 if (!image.equals("/images/Safe_Water")) { 154 if (!image.equals("/images/Safe_Water")) { //$NON-NLS-1$ 154 155 if (hasTopMark()) 155 image += "_Sphere"; 156 image += ".png"; 156 image += "_Sphere"; //$NON-NLS-1$ 157 image += ".png"; //$NON-NLS-1$ 157 158 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 158 159 } else … … 170 171 switch (getStyleIndex()) { 171 172 case SAFE_PILLAR: 172 super.saveSign("buoy_safe_water"); 173 Main.main.undoRedo.add(new ChangePropertyCommand(node, 174 "seamark:buoy_safe_water:shape", "pillar")); 173 super.saveSign("buoy_safe_water"); //$NON-NLS-1$ 174 Main.main.undoRedo.add(new ChangePropertyCommand(node, 175 "seamark:buoy_safe_water:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 175 176 break; 176 177 case SAFE_SPAR: 177 super.saveSign("buoy_safe_water"); 178 Main.main.undoRedo.add(new ChangePropertyCommand(node, 179 "seamark:buoy_safe_water:shape", "spar")); 178 super.saveSign("buoy_safe_water"); //$NON-NLS-1$ 179 Main.main.undoRedo.add(new ChangePropertyCommand(node, 180 "seamark:buoy_safe_water:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 180 181 break; 181 182 case SAFE_SPHERE: 182 super.saveSign("buoy_safe_water"); 183 Main.main.undoRedo.add(new ChangePropertyCommand(node, 184 "seamark:buoy_safe_water:shape", "sphere")); 183 super.saveSign("buoy_safe_water"); //$NON-NLS-1$ 184 Main.main.undoRedo.add(new ChangePropertyCommand(node, 185 "seamark:buoy_safe_water:shape", "sphere")); //$NON-NLS-1$ //$NON-NLS-2$ 185 186 break; 186 187 case SAFE_BEACON: 187 super.saveSign("beacon_safe_water"); 188 super.saveSign("beacon_safe_water"); //$NON-NLS-1$ 188 189 break; 189 190 case SAFE_FLOAT: 190 super.saveSign("light_float"); 191 super.saveSign("light_float"); //$NON-NLS-1$ 191 192 break; 192 193 default: … … 198 199 case SAFE_SPHERE: 199 200 Main.main.undoRedo.add(new ChangePropertyCommand(node, 200 "seamark:buoy_safe_water:colour_pattern", "vertical stripes")); 201 Main.main.undoRedo.add(new ChangePropertyCommand(node, 202 "seamark:buoy_safe_water:colour", "red;white")); 201 "seamark:buoy_safe_water:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 202 Main.main.undoRedo.add(new ChangePropertyCommand(node, 203 "seamark:buoy_safe_water:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$ 203 204 break; 204 205 case SAFE_BEACON: 205 206 Main.main.undoRedo.add(new ChangePropertyCommand(node, 206 "seamark:beacon_safe_water:colour_pattern", "vertical stripes")); 207 Main.main.undoRedo.add(new ChangePropertyCommand(node, 208 "seamark:beacon_safe_water:colour", "red;white")); 207 "seamark:beacon_safe_water:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 208 Main.main.undoRedo.add(new ChangePropertyCommand(node, 209 "seamark:beacon_safe_water:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$ 209 210 break; 210 211 case SAFE_FLOAT: 211 212 Main.main.undoRedo.add(new ChangePropertyCommand(node, 212 "seamark:light_float:colour_pattern", "vertical stripes")); 213 Main.main.undoRedo.add(new ChangePropertyCommand(node, 214 "seamark:light_float:colour", "red;white")); 213 "seamark:light_float:colour_pattern", "vertical stripes")); //$NON-NLS-1$ //$NON-NLS-2$ 214 Main.main.undoRedo.add(new ChangePropertyCommand(node, 215 "seamark:light_float:colour", "red;white")); //$NON-NLS-1$ //$NON-NLS-2$ 215 216 break; 216 217 default: 217 218 } 218 saveTopMarkData("spherical", "red"); 219 saveLightData("white"); 219 saveTopMarkData("spherical", "red"); //$NON-NLS-1$ //$NON-NLS-2$ 220 saveLightData("white"); //$NON-NLS-1$ 220 221 saveRadarFogData(); 221 222 } 222 223 223 224 public void setLightColour() { 224 super.setLightColour("W"); 225 super.setLightColour("W"); //$NON-NLS-1$ 225 226 } 226 227 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r23073 r23078 12 12 import org.openstreetmap.josm.data.osm.Node; 13 13 14 import toms.Messages; 14 15 import toms.dialogs.SmpDialogAction; 15 16 import toms.seamarks.SeaMark; … … 27 28 28 29 dlg.cbM01StyleOfMark.removeAllItems(); 29 dlg.cbM01StyleOfMark.addItem( "Not set");30 dlg.cbM01StyleOfMark.addItem( "Pillar Buoy");31 dlg.cbM01StyleOfMark.addItem( "Spar Buoy");32 dlg.cbM01StyleOfMark.addItem( "Sphere Buoy");33 dlg.cbM01StyleOfMark.addItem( "Barrel");34 dlg.cbM01StyleOfMark.addItem( "Float");35 dlg.cbM01StyleOfMark.addItem( "Beacon");36 dlg.cbM01StyleOfMark.addItem( "Tower");30 dlg.cbM01StyleOfMark.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 31 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.01")); //$NON-NLS-1$ 32 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.04")); //$NON-NLS-1$ 33 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.08")); //$NON-NLS-1$ 34 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.09")); //$NON-NLS-1$ 35 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.07")); //$NON-NLS-1$ 36 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.05")); //$NON-NLS-1$ 37 dlg.cbM01StyleOfMark.addItem(Messages.getString("Buoy.06")); //$NON-NLS-1$ 37 38 dlg.cbM01StyleOfMark.setVisible(true); 38 39 dlg.lM01StyleOfMark.setVisible(true); 39 40 40 41 dlg.cbM01Kennung.removeAllItems(); 41 dlg.cbM01Kennung.addItem( "Not set");42 dlg.cbM01Kennung.addItem("Fl"); 43 dlg.cbM01Kennung.addItem("Fl()"); 44 dlg.cbM01Kennung.addItem("Oc"); 45 dlg.cbM01Kennung.addItem("Oc()"); 46 dlg.cbM01Kennung.addItem("Q"); 47 dlg.cbM01Kennung.addItem("IQ"); 42 dlg.cbM01Kennung.addItem(Messages.getString("SmpDialogAction.212")); //$NON-NLS-1$ 43 dlg.cbM01Kennung.addItem("Fl"); //$NON-NLS-1$ 44 dlg.cbM01Kennung.addItem("Fl()"); //$NON-NLS-1$ 45 dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$ 46 dlg.cbM01Kennung.addItem("Oc()"); //$NON-NLS-1$ 47 dlg.cbM01Kennung.addItem("Q"); //$NON-NLS-1$ 48 dlg.cbM01Kennung.addItem("IQ"); //$NON-NLS-1$ 48 49 dlg.cbM01Kennung.setSelectedIndex(0); 49 50 … … 52 53 setBuoyIndex(SPECIAL_PURPOSE); 53 54 setColour(SeaMark.YELLOW); 54 setLightColour("W"); 55 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); 56 57 if (keys.containsKey("name")) 58 setName(keys.get("name")); 59 60 if (keys.containsKey("seamark:name")) 61 setName(keys.get("seamark:name")); 62 63 if (keys.containsKey("seamark:buoy_special_purpose:name")) 64 setName(keys.get("seamark:buoy_special_purpose:name")); 65 else if (keys.containsKey("seamark:beacon_special_purpose:name")) 66 setName(keys.get("seamark:beacon_special_purpose:name")); 67 else if (keys.containsKey("seamark:light_float:name")) 68 setName(keys.get("seamark:light_float:name")); 69 70 if (keys.containsKey("seamark:buoy_special_purpose:shape")) { 71 str = keys.get("seamark:buoy_special_purpose:shape"); 72 73 if (str.equals("pillar")) 55 setLightColour("W"); //$NON-NLS-1$ 56 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ 57 58 if (keys.containsKey("name")) //$NON-NLS-1$ 59 setName(keys.get("name")); //$NON-NLS-1$ 60 61 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 62 setName(keys.get("seamark:name")); //$NON-NLS-1$ 63 64 if (keys.containsKey("seamark:buoy_special_purpose:name")) //$NON-NLS-1$ 65 setName(keys.get("seamark:buoy_special_purpose:name")); //$NON-NLS-1$ 66 else if (keys.containsKey("seamark:beacon_special_purpose:name")) //$NON-NLS-1$ 67 setName(keys.get("seamark:beacon_special_purpose:name")); //$NON-NLS-1$ 68 else if (keys.containsKey("seamark:light_float:name")) //$NON-NLS-1$ 69 setName(keys.get("seamark:light_float:name")); //$NON-NLS-1$ 70 71 if (keys.containsKey("seamark:buoy_special_purpose:shape")) { //$NON-NLS-1$ 72 str = keys.get("seamark:buoy_special_purpose:shape"); //$NON-NLS-1$ 73 74 if (str.equals("pillar")) //$NON-NLS-1$ 74 75 setStyleIndex(SPEC_PILLAR); 75 else if (str.equals("spar")) 76 else if (str.equals("spar")) //$NON-NLS-1$ 76 77 setStyleIndex(SPEC_SPAR); 77 else if (str.equals("sphere")) 78 else if (str.equals("sphere")) //$NON-NLS-1$ 78 79 setStyleIndex(SPEC_SPHERE); 79 else if (str.equals("barrel")) 80 else if (str.equals("barrel")) //$NON-NLS-1$ 80 81 setStyleIndex(SPEC_BARREL); 81 82 } 82 83 83 if ((keys.containsKey("seamark:type") && keys.get("seamark:type").equals( 84 "beacon_special_purpose")) 85 || keys.containsKey("seamark:beacon_special_purpose:colour") 86 || keys.containsKey("seamark:beacon_special_purpose:shape")) { 87 if (keys.containsKey("seamark:beacon_special_purpose:shape") 88 && keys.get("seamark:beacon_special_purpose:shape").equals("tower")) 84 if ((keys.containsKey("seamark:type") && keys.get("seamark:type").equals( //$NON-NLS-1$ //$NON-NLS-2$ 85 "beacon_special_purpose")) //$NON-NLS-1$ 86 || keys.containsKey("seamark:beacon_special_purpose:colour") //$NON-NLS-1$ 87 || keys.containsKey("seamark:beacon_special_purpose:shape")) { //$NON-NLS-1$ 88 if (keys.containsKey("seamark:beacon_special_purpose:shape") //$NON-NLS-1$ 89 && keys.get("seamark:beacon_special_purpose:shape").equals("tower")) //$NON-NLS-1$ //$NON-NLS-2$ 89 90 setStyleIndex(SPEC_TOWER); 90 91 else 91 92 setStyleIndex(SPEC_BEACON); 92 } else if (keys.containsKey("seamark:light_float:colour") 93 && keys.get("seamark:light_float:colour").equals("yellow")) 93 } else if (keys.containsKey("seamark:light_float:colour") //$NON-NLS-1$ 94 && keys.get("seamark:light_float:colour").equals("yellow")) //$NON-NLS-1$ //$NON-NLS-2$ 94 95 setStyleIndex(SPEC_FLOAT); 95 96 96 97 keys = node.getKeys(); 97 if (keys.containsKey("seamark:topmark:shape")) { 98 str = keys.get("seamark:topmark:shape"); 99 100 if (str.equals("x-shape")) { 98 if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$ 99 str = keys.get("seamark:topmark:shape"); //$NON-NLS-1$ 100 101 if (str.equals("x-shape")) { //$NON-NLS-1$ 101 102 setTopMark(true); 102 103 } 103 104 } 104 105 105 if (keys.containsKey("seamark:light:colour")) { 106 str = keys.get("seamark:light:colour"); 107 108 if (keys.containsKey("seamark:light:character")) { 106 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 107 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 108 109 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 109 110 setLightGroup(keys); 110 111 111 String c = keys.get("seamark:light:character"); 112 if (getLightGroup() != "") 113 c = c + "(" + getLightGroup() + ")"; 112 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 113 if (getLightGroup() != "") //$NON-NLS-1$ 114 c = c + "(" + getLightGroup() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ 114 115 115 116 setLightChar(c); … … 117 118 } 118 119 119 if (str.equals("white")) { 120 if (str.equals("white")) { //$NON-NLS-1$ 120 121 setFired(true); 121 setLightColour("W"); 122 setLightColour("W"); //$NON-NLS-1$ 122 123 } 123 124 } … … 170 171 dlg.cM01Fired.setEnabled(true); 171 172 172 String image = "/images/Special_Purpose"; 173 String image = "/images/Special_Purpose"; //$NON-NLS-1$ 173 174 174 175 switch (getStyleIndex()) { 175 176 case SPEC_PILLAR: 176 image += "_Pillar"; 177 image += "_Pillar"; //$NON-NLS-1$ 177 178 break; 178 179 case SPEC_SPAR: 179 image += "_Spar"; 180 image += "_Spar"; //$NON-NLS-1$ 180 181 break; 181 182 case SPEC_SPHERE: 182 image += "_Sphere"; 183 image += "_Sphere"; //$NON-NLS-1$ 183 184 break; 184 185 case SPEC_BARREL: 185 image += "_Barrel"; 186 image += "_Barrel"; //$NON-NLS-1$ 186 187 break; 187 188 case SPEC_FLOAT: 188 image += "_Float"; 189 image += "_Float"; //$NON-NLS-1$ 189 190 break; 190 191 case SPEC_BEACON: 191 image += "_Beacon"; 192 image += "_Beacon"; //$NON-NLS-1$ 192 193 break; 193 194 case SPEC_TOWER: 194 image += "_Tower"; 195 image += "_Tower"; //$NON-NLS-1$ 195 196 break; 196 197 default: 197 198 } 198 199 199 if (!image.equals("/images/Special_Purpose")) { 200 if (!image.equals("/images/Special_Purpose")) { //$NON-NLS-1$ 200 201 if (hasTopMark()) 201 image += "_CrossY"; 202 image += ".png"; 202 image += "_CrossY"; //$NON-NLS-1$ 203 image += ".png"; //$NON-NLS-1$ 203 204 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 204 205 } else … … 216 217 switch (getStyleIndex()) { 217 218 case SPEC_PILLAR: 218 super.saveSign("buoy_special_purpose"); 219 Main.main.undoRedo.add(new ChangePropertyCommand(node, 220 "seamark:buoy_special_purpose:shape", "pillar")); 221 Main.main.undoRedo.add(new ChangePropertyCommand(node, 222 "seamark:buoy_special_purpose:colour", "yellow")); 219 super.saveSign("buoy_special_purpose"); //$NON-NLS-1$ 220 Main.main.undoRedo.add(new ChangePropertyCommand(node, 221 "seamark:buoy_special_purpose:shape", "pillar")); //$NON-NLS-1$ //$NON-NLS-2$ 222 Main.main.undoRedo.add(new ChangePropertyCommand(node, 223 "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 223 224 break; 224 225 case SPEC_SPAR: 225 super.saveSign("buoy_special_purpose"); 226 Main.main.undoRedo.add(new ChangePropertyCommand(node, 227 "seamark:buoy_special_purpose:shape", "spar")); 228 Main.main.undoRedo.add(new ChangePropertyCommand(node, 229 "seamark:buoy_special_purpose:colour", "yellow")); 226 super.saveSign("buoy_special_purpose"); //$NON-NLS-1$ 227 Main.main.undoRedo.add(new ChangePropertyCommand(node, 228 "seamark:buoy_special_purpose:shape", "spar")); //$NON-NLS-1$ //$NON-NLS-2$ 229 Main.main.undoRedo.add(new ChangePropertyCommand(node, 230 "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 230 231 break; 231 232 case SPEC_SPHERE: 232 super.saveSign("buoy_special_purpose"); 233 Main.main.undoRedo.add(new ChangePropertyCommand(node, 234 "seamark:buoy_special_purpose:shape", "sphere")); 235 Main.main.undoRedo.add(new ChangePropertyCommand(node, 236 "seamark:buoy_special_purpose:colour", "yellow")); 233 super.saveSign("buoy_special_purpose"); //$NON-NLS-1$ 234 Main.main.undoRedo.add(new ChangePropertyCommand(node, 235 "seamark:buoy_special_purpose:shape", "sphere")); //$NON-NLS-1$ //$NON-NLS-2$ 236 Main.main.undoRedo.add(new ChangePropertyCommand(node, 237 "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 237 238 break; 238 239 case SPEC_BARREL: 239 super.saveSign("buoy_special_purpose"); 240 Main.main.undoRedo.add(new ChangePropertyCommand(node, 241 "seamark:buoy_special_purpose:shape", "barrel")); 242 Main.main.undoRedo.add(new ChangePropertyCommand(node, 243 "seamark:buoy_special_purpose:colour", "yellow")); 240 super.saveSign("buoy_special_purpose"); //$NON-NLS-1$ 241 Main.main.undoRedo.add(new ChangePropertyCommand(node, 242 "seamark:buoy_special_purpose:shape", "barrel")); //$NON-NLS-1$ //$NON-NLS-2$ 243 Main.main.undoRedo.add(new ChangePropertyCommand(node, 244 "seamark:buoy_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 244 245 break; 245 246 case SPEC_FLOAT: 246 super.saveSign("light_float"); 247 Main.main.undoRedo.add(new ChangePropertyCommand(node, 248 "seamark:light_float:colour", "yellow")); 247 super.saveSign("light_float"); //$NON-NLS-1$ 248 Main.main.undoRedo.add(new ChangePropertyCommand(node, 249 "seamark:light_float:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 249 250 break; 250 251 case SPEC_BEACON: 251 super.saveSign("beacon_special_purpose"); 252 Main.main.undoRedo.add(new ChangePropertyCommand(node, 253 "seamark:beacon_special_purpose:colour", "yellow")); 252 super.saveSign("beacon_special_purpose"); //$NON-NLS-1$ 253 Main.main.undoRedo.add(new ChangePropertyCommand(node, 254 "seamark:beacon_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 254 255 break; 255 256 case SPEC_TOWER: 256 super.saveSign("beacon_special_purpose"); 257 Main.main.undoRedo.add(new ChangePropertyCommand(node, 258 "seamark:beacon_special_purpose:shape", "tower")); 259 Main.main.undoRedo.add(new ChangePropertyCommand(node, 260 "seamark:beacon_special_purpose:colour", "yellow")); 257 super.saveSign("beacon_special_purpose"); //$NON-NLS-1$ 258 Main.main.undoRedo.add(new ChangePropertyCommand(node, 259 "seamark:beacon_special_purpose:shape", "tower")); //$NON-NLS-1$ //$NON-NLS-2$ 260 Main.main.undoRedo.add(new ChangePropertyCommand(node, 261 "seamark:beacon_special_purpose:colour", "yellow")); //$NON-NLS-1$ //$NON-NLS-2$ 261 262 break; 262 263 default: 263 264 } 264 saveTopMarkData("x-shape", "yellow"); 265 saveLightData("white"); 265 saveTopMarkData("x-shape", "yellow"); //$NON-NLS-1$ //$NON-NLS-2$ 266 saveLightData("white"); //$NON-NLS-1$ 266 267 saveRadarFogData(); 267 268 } 268 269 269 270 public void setLightColour() { 270 super.setLightColour("W"); 271 super.setLightColour("W"); //$NON-NLS-1$ 271 272 } 272 273
Note:
See TracChangeset
for help on using the changeset viewer.