Changeset 27442 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2012-01-14T10:38:26+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r27441 r27442 133 133 platformCatBox.setVisible(false); 134 134 pilotCatBox.setVisible(false); 135 rescueCatBox.setVisible(false); 135 136 dlg.panelMain.mark.setCategory(Cat.NOCAT); 136 137 if (landButton.isSelected()) { … … 154 155 pilotCatBox.setVisible(true); 155 156 alPilotCatBox.actionPerformed(null); 157 } else if (rescueButton.isSelected()) { 158 categoryLabel.setVisible(true); 159 rescueCatBox.setVisible(true); 160 alRescueCatBox.actionPerformed(null); 156 161 } 157 162 dlg.panelMain.mark.testValid(); … … 273 278 addPTItem(Messages.getString("FromShore"), Cat.PIL_SHORE); 274 279 pilotCatBox.setVisible(false); 280 281 rescueCatBox = new JComboBox(); 282 rescueCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 283 add(rescueCatBox); 284 rescueCatBox.addActionListener(alRescueCatBox); 285 addRSItem("", Cat.NOCAT); 286 addRSItem(Messages.getString("Lifeboat"), Cat.RSC_LFB); 287 rescueCatBox.setVisible(false); 275 288 } 276 289 … … 282 295 platformCatBox.setVisible(false); 283 296 pilotCatBox.setVisible(false); 297 rescueCatBox.setVisible(false); 284 298 if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && (dlg.panelMain.mark.getCategory() != Cat.NOCAT)) { 285 299 categoryLabel.setVisible(true); … … 322 336 pilotCatBox.setSelectedIndex(item); 323 337 } 324 } else { 338 } else if (dlg.panelMain.mark.getObject() == Obj.RSCSTA) { 339 categoryLabel.setVisible(true); 340 rescueCatBox.setVisible(true); 341 for (Cat cat : rescueCats.keySet()) { 342 int item = rescueCats.get(cat); 343 if (dlg.panelMain.mark.getCategory() == cat) 344 rescueCatBox.setSelectedIndex(item); 345 } 325 346 } 326 347 for (Obj obj : objects.keySet()) { … … 354 375 pilotCats.put(cat, pilotCatBox.getItemCount()); 355 376 pilotCatBox.addItem(str); 377 } 378 379 private void addRSItem(String str, Cat cat) { 380 rescueCats.put(cat, rescueCatBox.getItemCount()); 381 rescueCatBox.addItem(str); 356 382 } 357 383 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r27439 r27442 311 311 break; 312 312 case LGT: 313 case S IS:313 case STN: 314 314 case PLF: 315 case CGS:316 case PLT:317 315 lightsButton.setBorderPainted(true); 318 316 panelLights.setVisible(true); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27439 r27442 137 137 138 138 public enum Ent { 139 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION, PLATFORM, 140 COASTGUARD, PILOT 139 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION, PLATFORM 141 140 } 142 141 … … 169 168 EntMAP.put(Obj.SISTAW, Ent.STATION); 170 169 EntMAP.put(Obj.SISTAT, Ent.STATION); 171 EntMAP.put(Obj.CGUSTA, Ent.COASTGUARD); 172 EntMAP.put(Obj.PILBOP, Ent.PILOT); 170 EntMAP.put(Obj.CGUSTA, Ent.STATION); 171 EntMAP.put(Obj.PILBOP, Ent.STATION); 172 EntMAP.put(Obj.RSCSTA, Ent.STATION); 173 173 } 174 174 175 175 public enum Grp { 176 NUL, LAT, CAR, SAW, ISD, SPP, LGT, S IS, PLF, CGS, PLT176 NUL, LAT, CAR, SAW, ISD, SPP, LGT, STN, PLF 177 177 } 178 178 … … 204 204 GrpMAP.put(Obj.BOYINB, Grp.SPP); 205 205 GrpMAP.put(Obj.OFSPLF, Grp.PLF); 206 GrpMAP.put(Obj.SISTAW, Grp.SIS); 207 GrpMAP.put(Obj.SISTAT, Grp.SIS); 208 GrpMAP.put(Obj.CGUSTA, Grp.CGS); 209 GrpMAP.put(Obj.PILBOP, Grp.PLT); 206 GrpMAP.put(Obj.SISTAW, Grp.STN); 207 GrpMAP.put(Obj.SISTAT, Grp.STN); 208 GrpMAP.put(Obj.CGUSTA, Grp.STN); 209 GrpMAP.put(Obj.PILBOP, Grp.STN); 210 GrpMAP.put(Obj.RSCSTA, Grp.STN); 210 211 } 211 212 … … 222 223 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR, 223 224 OFP_OIL, OFP_PRD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOR, OFP_ISL, OFP_FPSO, OFP_ACC, OFP_NCCB, 224 PIL_VESS, PIL_HELI, PIL_SHORE 225 } 226 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 226 } 227 227 228 public static final EnumMap<Cat, String> CatSTR = new EnumMap<Cat, String>(Cat.class); 228 229 static { … … 320 321 CatSTR.put(Cat.PIL_HELI, "helicopter"); 321 322 CatSTR.put(Cat.PIL_SHORE, "from_shore"); 323 CatSTR.put(Cat.RSC_LFB, "lifeboat"); 324 CatSTR.put(Cat.RSC_RKT, "rocket"); 325 CatSTR.put(Cat.RSC_RSW, "refuge_shipwrecked"); 326 CatSTR.put(Cat.RSC_RIT, "refuge_intertidal"); 327 CatSTR.put(Cat.RSC_MLB, "lifeboat_moored"); 328 CatSTR.put(Cat.RSC_RAD, "radio"); 329 CatSTR.put(Cat.RSC_FAE, "firstaid"); 330 CatSTR.put(Cat.RSC_SPL, "seaplane"); 331 CatSTR.put(Cat.RSC_AIR, "aircraft"); 332 CatSTR.put(Cat.RSC_TUG, "tug"); 322 333 } 323 334 … … 1157 1168 case BOYINB: 1158 1169 case PILBOP: 1170 case RSCSTA: 1159 1171 tmp = true; 1160 1172 break; … … 1943 1955 case PILBOP: 1944 1956 imgStr += "Pilot"; 1957 break; 1958 case RSCSTA: 1959 imgStr += "Rescue"; 1945 1960 break; 1946 1961 }
Note:
See TracChangeset
for help on using the changeset viewer.