Changeset 27445 in osm for applications/editors/josm/plugins
- Timestamp:
- 2012-01-14T21:10:42+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties
r27441 r27445 303 303 CoastguardStation=Coastguard Station 304 304 PilotBoarding=Pilot Boarding 305 CruisingVessel=Cruising Vessel305 CruisingVessel=Cruising vessel 306 306 Helicopter=Helicopter 307 FromShore=From Shore307 FromShore=From shore 308 308 RescueStation=Rescue Station 309 Lifeboat=Lifeboat 310 Rocket=Rocket 311 ShipwreckedRefuge=Shipwrecked refuge 312 IntertidalRefuge=Intertidal refuge 313 MooredLifeboat=Moored lifeboat 314 Radio=Radio 315 FirstAid=First Aid 316 Seaplane=Seaplane 317 Aircraft=Aircraft 318 Tug=Tug 309 319 RadioStation=Radio Station 320 CircularBeacon=Circular beacon 321 DirectionalBeacon=Directional beacon 322 RotatingBeacon=Rotating beacon 323 ConsolBeacon=Consol beacon 324 DirectionFinding=Direction finding 325 QTGService=QTG service 326 AeronaticalBeacon=Aeronautical beacon 327 Decca=Decca 328 LoranC=Loran C 329 DGPS=DGPS 330 Toran=Toran 331 Omega=Omega 332 Syledis=Syledis 333 Chiaka=Chiaka 334 PublicCommunication=Public communication 335 CommercialBroadcast=Commercial broadcast 336 Facsimile=Facsimile 337 TimeSignal=Time signal 310 338 RadarStation=Radar Station 339 Surveillance=Surveillance 340 CoastRadar=Coast radar 311 341 312 342 NotDecimal=Not a valid decimal string -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_de.properties
r27423 r27445 301 301 SBM=SBM Buoy 302 302 303 CoastguardStation=Coastguard Station 304 PilotBoarding=Pilot Boarding 305 CruisingVessel=Cruising vessel 306 Helicopter=Helicopter 307 FromShore=From shore 308 RescueStation=Rescue Station 309 Lifeboat=Lifeboat 310 Rocket=Rocket 311 ShipwreckedRefuge=Shipwrecked refuge 312 IntertidalRefuge=Intertidal refuge 313 MooredLifeboat=Moored lifeboat 314 Radio=Radio 315 FirstAid=First Aid 316 Seaplane=Seaplane 317 Aircraft=Aircraft 318 Tug=Tug 319 RadioStation=Radio Station 320 CircularBeacon=Circular beacon 321 DirectionalBeacon=Directional beacon 322 RotatingBeacon=Rotating beacon 323 ConsolBeacon=Consol beacon 324 DirectionFinding=Direction finding 325 QTGService=QTG service 326 AeronaticalBeacon=Aeronautical beacon 327 Decca=Decca 328 LoranC=Loran C 329 DGPS=DGPS 330 Toran=Toran 331 Omega=Omega 332 Syledis=Syledis 333 Chiaka=Chiaka 334 PublicCommunication=Public communication 335 CommercialBroadcast=Commercial broadcast 336 Facsimile=Facsimile 337 TimeSignal=Time signal 338 RadarStation=Radar Station 339 Surveillance=Surveillance 340 CoastRadar=Coast radar 341 303 342 NotDecimal=Kein korrekter Dezimalwert 304 343 TooBig=Maximaler Wert überschritten -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties
r27423 r27445 301 301 SBM=SBM Buoy 302 302 303 CoastguardStation=Coastguard Station 304 PilotBoarding=Pilot Boarding 305 CruisingVessel=Cruising vessel 306 Helicopter=Helicopter 307 FromShore=From shore 308 RescueStation=Rescue Station 309 Lifeboat=Lifeboat 310 Rocket=Rocket 311 ShipwreckedRefuge=Shipwrecked refuge 312 IntertidalRefuge=Intertidal refuge 313 MooredLifeboat=Moored lifeboat 314 Radio=Radio 315 FirstAid=First Aid 316 Seaplane=Seaplane 317 Aircraft=Aircraft 318 Tug=Tug 319 RadioStation=Radio Station 320 CircularBeacon=Circular beacon 321 DirectionalBeacon=Directional beacon 322 RotatingBeacon=Rotating beacon 323 ConsolBeacon=Consol beacon 324 DirectionFinding=Direction finding 325 QTGService=QTG service 326 AeronaticalBeacon=Aeronautical beacon 327 Decca=Decca 328 LoranC=Loran C 329 DGPS=DGPS 330 Toran=Toran 331 Omega=Omega 332 Syledis=Syledis 333 Chiaka=Chiaka 334 PublicCommunication=Public communication 335 CommercialBroadcast=Commercial broadcast 336 Facsimile=Facsimile 337 TimeSignal=Time signal 338 RadarStation=Radar Station 339 Surveillance=Surveillance 340 CoastRadar=Coast radar 341 303 342 NotDecimal=Not a valid decimal string 304 343 TooBig=Maximum value exceeded -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r27442 r27445 90 90 int idx = rescueCats.get(cat); 91 91 if (dlg.node != null && (idx == rescueCatBox.getSelectedIndex())) { 92 dlg.panelMain.mark.setCategory(cat); 93 dlg.panelMain.mark.testValid(); 94 } 95 } 96 } 97 }; 98 public JComboBox radioCatBox; 99 public EnumMap<Cat, Integer> radioCats = new EnumMap<Cat, Integer>(Cat.class); 100 private ActionListener alRadioCatBox = new ActionListener() { 101 public void actionPerformed(java.awt.event.ActionEvent e) { 102 for (Cat cat : radioCats.keySet()) { 103 int idx = radioCats.get(cat); 104 if (dlg.node != null && (idx == radioCatBox.getSelectedIndex())) { 105 dlg.panelMain.mark.setCategory(cat); 106 dlg.panelMain.mark.testValid(); 107 } 108 } 109 } 110 }; 111 public JComboBox radarCatBox; 112 public EnumMap<Cat, Integer> radarCats = new EnumMap<Cat, Integer>(Cat.class); 113 private ActionListener alRadarCatBox = new ActionListener() { 114 public void actionPerformed(java.awt.event.ActionEvent e) { 115 for (Cat cat : radarCats.keySet()) { 116 int idx = radarCats.get(cat); 117 if (dlg.node != null && (idx == radarCatBox.getSelectedIndex())) { 92 118 dlg.panelMain.mark.setCategory(cat); 93 119 dlg.panelMain.mark.testValid(); … … 134 160 pilotCatBox.setVisible(false); 135 161 rescueCatBox.setVisible(false); 162 radioCatBox.setVisible(false); 163 radarCatBox.setVisible(false); 164 chLabel.setVisible(false); 165 chBox.setVisible(false); 136 166 dlg.panelMain.mark.setCategory(Cat.NOCAT); 137 167 if (landButton.isSelected()) { … … 142 172 categoryLabel.setVisible(true); 143 173 trafficCatBox.setVisible(true); 174 chLabel.setVisible(true); 175 chBox.setVisible(true); 144 176 alTrafficCatBox.actionPerformed(null); 145 177 } else if (warningButton.isSelected()) { 146 178 categoryLabel.setVisible(true); 147 179 warningCatBox.setVisible(true); 180 chLabel.setVisible(true); 181 chBox.setVisible(true); 148 182 alWarningCatBox.actionPerformed(null); 149 183 } else if (platformButton.isSelected()) { … … 154 188 categoryLabel.setVisible(true); 155 189 pilotCatBox.setVisible(true); 190 chLabel.setVisible(true); 191 chBox.setVisible(true); 156 192 alPilotCatBox.actionPerformed(null); 157 193 } else if (rescueButton.isSelected()) { … … 159 195 rescueCatBox.setVisible(true); 160 196 alRescueCatBox.actionPerformed(null); 197 } else if (radioButton.isSelected()) { 198 categoryLabel.setVisible(true); 199 radioCatBox.setVisible(true); 200 chLabel.setVisible(true); 201 chBox.setVisible(true); 202 alRadioCatBox.actionPerformed(null); 203 } else if (radarButton.isSelected()) { 204 categoryLabel.setVisible(true); 205 radarCatBox.setVisible(true); 206 chLabel.setVisible(true); 207 chBox.setVisible(true); 208 alRadarCatBox.actionPerformed(null); 161 209 } 162 210 dlg.panelMain.mark.testValid(); 211 } 212 }; 213 public JLabel chLabel; 214 public JTextField chBox; 215 private FocusListener flCh = new FocusAdapter() { 216 public void focusLost(java.awt.event.FocusEvent e) { 217 dlg.panelMain.mark.setChannel(chBox.getText()); 163 218 } 164 219 }; … … 285 340 addRSItem("", Cat.NOCAT); 286 341 addRSItem(Messages.getString("Lifeboat"), Cat.RSC_LFB); 342 addRSItem(Messages.getString("Rocket"), Cat.RSC_RKT); 343 addRSItem(Messages.getString("ShipwreckedRefuge"), Cat.RSC_RSW); 344 addRSItem(Messages.getString("IntertidalRefuge"), Cat.RSC_RIT); 345 addRSItem(Messages.getString("MooredLifeboat"), Cat.RSC_MLB); 346 addRSItem(Messages.getString("Radio"), Cat.RSC_RAD); 347 addRSItem(Messages.getString("FirstAid"), Cat.RSC_FAE); 348 addRSItem(Messages.getString("Seaplane"), Cat.RSC_SPL); 349 addRSItem(Messages.getString("Aircraft"), Cat.RSC_AIR); 350 addRSItem(Messages.getString("Tug"), Cat.RSC_TUG); 287 351 rescueCatBox.setVisible(false); 352 353 radioCatBox = new JComboBox(); 354 radioCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 355 add(radioCatBox); 356 radioCatBox.addActionListener(alRadioCatBox); 357 addROItem("", Cat.NOCAT); 358 addROItem(Messages.getString("CircularBeacon"), Cat.ROS_BNO); 359 addROItem(Messages.getString("DirectionalBeacon"), Cat.ROS_BND); 360 addROItem(Messages.getString("RotatingBeacon"), Cat.ROS_BNR); 361 addROItem(Messages.getString("ConsolBeacon"), Cat.ROS_BNC); 362 addROItem(Messages.getString("DirectionFinding"), Cat.ROS_RDF); 363 addROItem(Messages.getString("QTGService"), Cat.ROS_QTG); 364 addROItem(Messages.getString("AeronaticalBeacon"), Cat.ROS_AER); 365 addROItem(Messages.getString("Decca"), Cat.ROS_DCA); 366 addROItem(Messages.getString("LoranC"), Cat.ROS_LRN); 367 addROItem(Messages.getString("DGPS"), Cat.ROS_DGPS); 368 addROItem(Messages.getString("Toran"), Cat.ROS_TRN); 369 addROItem(Messages.getString("Omega"), Cat.ROS_OMA); 370 addROItem(Messages.getString("Syledis"), Cat.ROS_SDS); 371 addROItem(Messages.getString("Chiaka"), Cat.ROS_CKA); 372 addROItem(Messages.getString("PublicCommunication"), Cat.ROS_PUB); 373 addROItem(Messages.getString("CommercialBroadcast"), Cat.ROS_COM); 374 addROItem(Messages.getString("Facsimile"), Cat.ROS_FAX); 375 addROItem(Messages.getString("TimeSignal"), Cat.ROS_TIM); 376 radioCatBox.setVisible(false); 377 378 radarCatBox = new JComboBox(); 379 radarCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 380 add(radarCatBox); 381 radarCatBox.addActionListener(alRadarCatBox); 382 addRAItem("", Cat.NOCAT); 383 addRAItem(Messages.getString("Surveillance"), Cat.RAS_SRV); 384 addRAItem(Messages.getString("CoastRadar"), Cat.RAS_CST); 385 radarCatBox.setVisible(false); 386 387 chLabel = new JLabel("Ch:", SwingConstants.CENTER); 388 chLabel.setBounds(new Rectangle(140, 34, 30, 15)); 389 add(chLabel); 390 chBox = new JTextField(); 391 chBox.setBounds(new Rectangle(140, 48, 30, 20)); 392 chBox.setHorizontalAlignment(SwingConstants.CENTER); 393 add(chBox); 394 chBox.addFocusListener(flCh); 288 395 } 289 396 … … 296 403 pilotCatBox.setVisible(false); 297 404 rescueCatBox.setVisible(false); 405 radioCatBox.setVisible(false); 406 radarCatBox.setVisible(false); 407 chLabel.setVisible(false); 408 chBox.setVisible(false); 409 chBox.setText(dlg.panelMain.mark.getChannel()); 298 410 if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && (dlg.panelMain.mark.getCategory() != Cat.NOCAT)) { 299 411 categoryLabel.setVisible(true); … … 312 424 trafficCatBox.setSelectedIndex(item); 313 425 } 426 chLabel.setVisible(true); 427 chBox.setVisible(true); 314 428 } else if (dlg.panelMain.mark.getObject() == Obj.SISTAW) { 315 429 categoryLabel.setVisible(true); … … 320 434 warningCatBox.setSelectedIndex(item); 321 435 } 436 chLabel.setVisible(true); 437 chBox.setVisible(true); 322 438 } else if (dlg.panelMain.mark.getObject() == Obj.OFSPLF) { 323 439 categoryLabel.setVisible(true); … … 336 452 pilotCatBox.setSelectedIndex(item); 337 453 } 454 chLabel.setVisible(true); 455 chBox.setVisible(true); 338 456 } else if (dlg.panelMain.mark.getObject() == Obj.RSCSTA) { 339 457 categoryLabel.setVisible(true); … … 344 462 rescueCatBox.setSelectedIndex(item); 345 463 } 464 } else if (dlg.panelMain.mark.getObject() == Obj.RDOSTA) { 465 categoryLabel.setVisible(true); 466 radioCatBox.setVisible(true); 467 for (Cat cat : radioCats.keySet()) { 468 int item = radioCats.get(cat); 469 if (dlg.panelMain.mark.getCategory() == cat) 470 radioCatBox.setSelectedIndex(item); 471 } 472 chLabel.setVisible(true); 473 chBox.setVisible(true); 474 } else if (dlg.panelMain.mark.getObject() == Obj.RADSTA) { 475 categoryLabel.setVisible(true); 476 radarCatBox.setVisible(true); 477 for (Cat cat : radarCats.keySet()) { 478 int item = radarCats.get(cat); 479 if (dlg.panelMain.mark.getCategory() == cat) 480 radarCatBox.setSelectedIndex(item); 481 } 482 chLabel.setVisible(true); 483 chBox.setVisible(true); 346 484 } 347 485 for (Obj obj : objects.keySet()) { … … 380 518 rescueCats.put(cat, rescueCatBox.getItemCount()); 381 519 rescueCatBox.addItem(str); 520 } 521 522 private void addROItem(String str, Cat cat) { 523 radioCats.put(cat, radioCatBox.getItemCount()); 524 radioCatBox.addItem(str); 525 } 526 527 private void addRAItem(String str, Cat cat) { 528 radarCats.put(cat, radarCatBox.getItemCount()); 529 radarCatBox.addItem(str); 382 530 } 383 531 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27442 r27445 129 129 setObjectHeight(""); 130 130 setElevation(""); 131 setChannel(""); 131 132 setInfo(""); 132 133 setSource(""); … … 171 172 EntMAP.put(Obj.PILBOP, Ent.STATION); 172 173 EntMAP.put(Obj.RSCSTA, Ent.STATION); 174 EntMAP.put(Obj.RDOSTA, Ent.STATION); 175 EntMAP.put(Obj.RADSTA, Ent.STATION); 173 176 } 174 177 … … 209 212 GrpMAP.put(Obj.PILBOP, Grp.STN); 210 213 GrpMAP.put(Obj.RSCSTA, Grp.STN); 214 GrpMAP.put(Obj.RDOSTA, Grp.STN); 215 GrpMAP.put(Obj.RADSTA, Grp.STN); 211 216 } 212 217 … … 223 228 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR, 224 229 OFP_OIL, OFP_PRD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOR, OFP_ISL, OFP_FPSO, OFP_ACC, OFP_NCCB, 225 PIL_VESS, PIL_HELI, PIL_SHORE, RSC_LFB, RSC_RKT, RSC_RSW, RSC_RIT, RSC_MLB, RSC_RAD, RSC_FAE, RSC_SPL, RSC_AIR, RSC_TUG 230 RSC_LFB, RSC_RKT, RSC_RSW, RSC_RIT, RSC_MLB, RSC_RAD, RSC_FAE, RSC_SPL, RSC_AIR, RSC_TUG, 231 ROS_BNO, ROS_BND, ROS_BNR, ROS_BNC, ROS_RDF, ROS_QTG, ROS_AER, ROS_DCA, ROS_LRN, ROS_DGPS, ROS_TRN, ROS_OMA, 232 ROS_SDS, ROS_CKA, ROS_PUB, ROS_COM, ROS_FAX, ROS_TIM, RAS_SRV, RAS_CST, PIL_VESS, PIL_HELI, PIL_SHORE 226 233 } 227 234 … … 331 338 CatSTR.put(Cat.RSC_AIR, "aircraft"); 332 339 CatSTR.put(Cat.RSC_TUG, "tug"); 340 CatSTR.put(Cat.RAS_SRV, "surveillance"); 341 CatSTR.put(Cat.RAS_CST, "coast"); 342 CatSTR.put(Cat.ROS_BNO, "beacon_circular"); 343 CatSTR.put(Cat.ROS_BND, "beacon_directional"); 344 CatSTR.put(Cat.ROS_BNR, "beacon_rotating"); 345 CatSTR.put(Cat.ROS_BNC, "beacon_consol"); 346 CatSTR.put(Cat.ROS_RDF, "direction_finding"); 347 CatSTR.put(Cat.ROS_QTG, "qtg_service"); 348 CatSTR.put(Cat.ROS_AER, "beacon_aero"); 349 CatSTR.put(Cat.ROS_DCA, "decca"); 350 CatSTR.put(Cat.ROS_LRN, "loran"); 351 CatSTR.put(Cat.ROS_DGPS, "dgps"); 352 CatSTR.put(Cat.ROS_TRN, "toran"); 353 CatSTR.put(Cat.ROS_OMA, "omega"); 354 CatSTR.put(Cat.ROS_SDS, "syledis"); 355 CatSTR.put(Cat.ROS_CKA, "chiaka"); 356 CatSTR.put(Cat.ROS_PUB, "public_communication"); 357 CatSTR.put(Cat.ROS_COM, "comercial_broadcast"); 358 CatSTR.put(Cat.ROS_FAX, "facsimile"); 359 CatSTR.put(Cat.ROS_TIM, "time_signal"); 333 360 } 334 361 … … 1097 1124 public void setObjectHeight(String str) { 1098 1125 height = validDecimal(str); 1126 } 1127 1128 private String channel = ""; 1129 1130 public String getChannel() { 1131 return channel; 1132 } 1133 1134 public void setChannel(String per) { 1135 channel = validDecimal(per); 1136 repaint(); 1099 1137 } 1100 1138 … … 1169 1207 case PILBOP: 1170 1208 case RSCSTA: 1209 case RDOSTA: 1210 case RADSTA: 1171 1211 tmp = true; 1172 1212 break; … … 1344 1384 if (keys.containsKey("seamark:" + ObjSTR.get(obj) + ":elevation")) { 1345 1385 setElevation(keys.get("seamark:" + ObjSTR.get(obj) + ":elevation")); 1386 } 1387 if (keys.containsKey("seamark:" + ObjSTR.get(obj) + ":channel")) { 1388 setChannel(keys.get("seamark:" + ObjSTR.get(obj) + ":channel")); 1346 1389 } 1347 1390 } … … 1959 2002 imgStr += "Rescue"; 1960 2003 break; 2004 case RDOSTA: 2005 case RADSTA: 2006 imgStr += "Signal_Station"; 2007 g2.drawImage(new ImageIcon(getClass().getResource("/images/Radar_Station.png")).getImage(), 7, -15, null); 2008 break; 1961 2009 } 1962 2010 if (!imgStr.equals("/images/")) { … … 2369 2417 if (!getElevation().isEmpty()) { 2370 2418 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:" + objStr + ":elevation", getElevation())); 2419 } 2420 if (!getChannel().isEmpty()) { 2421 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:" + objStr + ":channel", getChannel())); 2371 2422 } 2372 2423 }
Note:
See TracChangeset
for help on using the changeset viewer.