Changeset 28140 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2012-03-23T00:41:10+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src
- Files:
-
- 23 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r27445 r28140 116 116 int idx = radarCats.get(cat); 117 117 if (dlg.node != null && (idx == radarCatBox.getSelectedIndex())) { 118 dlg.panelMain.mark.setCategory(cat); 119 dlg.panelMain.mark.testValid(); 120 } 121 } 122 } 123 }; 124 public JLabel functionLabel; 125 public JComboBox functionBox; 126 public EnumMap<Cat, Integer> functionss = new EnumMap<Cat, Integer>(Cat.class); 127 private ActionListener alfunctionBox = new ActionListener() { 128 public void actionPerformed(java.awt.event.ActionEvent e) { 129 for (Cat cat : landCats.keySet()) { 130 int idx = landCats.get(cat); 131 if (dlg.node != null && (idx == landCatBox.getSelectedIndex())) { 118 132 dlg.panelMain.mark.setCategory(cat); 119 133 dlg.panelMain.mark.testValid(); … … 227 241 add(getObjButton(landButton, 102, 0, 34, 32, "Landmark", Obj.LNDMRK)); 228 242 add(getObjButton(platformButton, 136, 0, 34, 32, "Platform", Obj.OFSPLF)); 229 add(getObjButton(vesselButton, 0, 35, 34, 32, "LightVessel", Obj.LITVES)); 230 add(getObjButton(floatButton, 34, 35, 34, 32, "LightFloat", Obj.LITFLT)); 231 add(getObjButton(trafficButton, 68, 35, 34, 32, "SSTraffic", Obj.SISTAT)); 232 add(getObjButton(warningButton, 102, 35, 34, 32, "SSWarning", Obj.SISTAW)); 233 add(getObjButton(coastguardButton, 0, 70, 34, 32, "CoastguardStation", Obj.CGUSTA)); 234 add(getObjButton(pilotButton, 34, 70, 34, 32, "PilotBoarding", Obj.PILBOP)); 235 add(getObjButton(rescueButton, 68, 70, 34, 32, "RescueStation", Obj.RSCSTA)); 236 add(getObjButton(radioButton, 102, 70, 34, 32, "RadioStation", Obj.RDOSTA)); 237 add(getObjButton(radarButton, 136, 70, 34, 32, "RadarStation", Obj.RADSTA)); 243 add(getObjButton(vesselButton, 0, 32, 34, 32, "LightVessel", Obj.LITVES)); 244 add(getObjButton(floatButton, 34, 32, 34, 32, "LightFloat", Obj.LITFLT)); 245 add(getObjButton(trafficButton, 68, 32, 34, 32, "SSTraffic", Obj.SISTAT)); 246 add(getObjButton(warningButton, 102, 32, 34, 32, "SSWarning", Obj.SISTAW)); 247 add(getObjButton(coastguardButton, 0, 64, 34, 32, "CoastguardStation", Obj.CGUSTA)); 248 add(getObjButton(pilotButton, 34, 64, 34, 32, "PilotBoarding", Obj.PILBOP)); 249 add(getObjButton(rescueButton, 68, 64, 34, 32, "RescueStation", Obj.RSCSTA)); 250 add(getObjButton(radioButton, 102, 64, 34, 32, "RadioStation", Obj.RDOSTA)); 251 add(getObjButton(radarButton, 136, 64, 34, 32, "RadarStation", Obj.RADSTA)); 252 253 functionLabel = new JLabel(Messages.getString("Function"), SwingConstants.CENTER); 254 functionLabel.setBounds(new Rectangle(5, 94, 160, 18)); 255 add(functionLabel); 256 functionLabel.setVisible(true); 257 258 functionBox = new JComboBox(); 259 functionBox.setBounds(new Rectangle(5, 110, 160, 18)); 260 add(functionBox); 261 functionBox.addActionListener(alfunctionBox); 262 functionBox.setVisible(true); 238 263 239 264 categoryLabel = new JLabel(Messages.getString("Category"), SwingConstants.CENTER); 240 categoryLabel.setBounds(new Rectangle(5, 1 10, 160,20));265 categoryLabel.setBounds(new Rectangle(5, 125, 160, 18)); 241 266 add(categoryLabel); 242 267 categoryLabel.setVisible(false); 243 268 244 269 landCatBox = new JComboBox(); 245 landCatBox.setBounds(new Rectangle(5, 1 30, 160,20));270 landCatBox.setBounds(new Rectangle(5, 142, 160, 18)); 246 271 add(landCatBox); 247 272 landCatBox.addActionListener(alLandCatBox); … … 269 294 270 295 trafficCatBox = new JComboBox(); 271 trafficCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));296 trafficCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 272 297 add(trafficCatBox); 273 298 trafficCatBox.addActionListener(alTrafficCatBox); … … 286 311 287 312 warningCatBox = new JComboBox(); 288 warningCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));313 warningCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 289 314 add(warningCatBox); 290 315 warningCatBox.addActionListener(alWarningCatBox); … … 308 333 309 334 platformCatBox = new JComboBox(); 310 platformCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));335 platformCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 311 336 add(platformCatBox); 312 337 platformCatBox.addActionListener(alPlatformCatBox); … … 325 350 326 351 pilotCatBox = new JComboBox(); 327 pilotCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));352 pilotCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 328 353 add(pilotCatBox); 329 354 pilotCatBox.addActionListener(alPilotCatBox); … … 335 360 336 361 rescueCatBox = new JComboBox(); 337 rescueCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));362 rescueCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 338 363 add(rescueCatBox); 339 364 rescueCatBox.addActionListener(alRescueCatBox); … … 352 377 353 378 radioCatBox = new JComboBox(); 354 radioCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));379 radioCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 355 380 add(radioCatBox); 356 381 radioCatBox.addActionListener(alRadioCatBox); … … 377 402 378 403 radarCatBox = new JComboBox(); 379 radarCatBox.setBounds(new Rectangle(5, 1 30, 160, 20));404 radarCatBox.setBounds(new Rectangle(5, 140, 160, 20)); 380 405 add(radarCatBox); 381 406 radarCatBox.addActionListener(alRadarCatBox); … … 386 411 387 412 chLabel = new JLabel("Ch:", SwingConstants.CENTER); 388 chLabel.setBounds(new Rectangle(140, 3 4, 30, 15));413 chLabel.setBounds(new Rectangle(140, 32, 30, 15)); 389 414 add(chLabel); 390 415 chBox = new JTextField(); 391 chBox.setBounds(new Rectangle(140, 4 8, 30, 20));416 chBox.setBounds(new Rectangle(140, 45, 30, 20)); 392 417 chBox.setHorizontalAlignment(SwingConstants.CENTER); 393 418 add(chBox); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27955 r28140 212 212 SIS_DNGR, SIS_OBST, SIS_CABL, SIS_MILY, SIS_DSTR, SIS_WTHR, SIS_STRM, SIS_ICE, SIS_TIME, SIS_TIDE, 213 213 SIS_TSTM, SIS_TGAG, SIS_TSCL, SIS_DIVE, SIS_LGAG, LIT_DIRF, LIT_LEDG, 214 LMK_CHMY, LMK_CARN, LMK_DSHA, LMK_FLGS, LMK_FLRS, LMK_MNMT, LMK_TOWR, LMK_WNDM, LMK_WTRT, 214 LMK_CHMY, LMK_CARN, LMK_DSHA, LMK_FLGS, LMK_FLRS, LMK_MNMT, LMK_TOWR, LMK_WNDM, LMK_WTRT, LMK_MNRT, 215 215 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR, 216 216 OFP_OIL, OFP_PRD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOR, OFP_ISL, OFP_FPSO, OFP_ACC, OFP_NCCB, … … 293 293 CatSTR.put(Cat.LMK_WTRT, "water_tower"); 294 294 CatSTR.put(Cat.LMK_MAST, "mast"); 295 CatSTR.put(Cat.LMK_WNDS, "wind _sock");295 CatSTR.put(Cat.LMK_WNDS, "windsock"); 296 296 CatSTR.put(Cat.LMK_CLMN, "column"); 297 297 CatSTR.put(Cat.LMK_OBLK, "obelisk"); … … 302 302 CatSTR.put(Cat.LMK_WNDL, "windmill"); 303 303 CatSTR.put(Cat.LMK_SPIR, "spire"); 304 CatSTR.put(Cat.LMK_MNRT, "minaret"); 304 305 CatSTR.put(Cat.OFP_OIL, "oil"); 305 306 CatSTR.put(Cat.OFP_PRD, "production"); … … 1072 1073 public void setRefl(Con con) { 1073 1074 reflectivity = con; 1075 } 1076 1077 public enum Fnc { 1078 UNKFNC, HMO, CSTM, HLTH, HOSP, POFF, HOTEL, RWSTA, POLICE, WPOL, PILO, PILL, BANK, DCHQ, TRNS, FACT, PWRS, ADMIN, EDUC, CHCH, CHPL, 1079 TMPL, PGDA, SHSH, BTMP, MOSQ, MRBT, LOOK, COMS, TV, RADO, RADR, LSUP, MWAV, COOL, OBSV, TIMB, CLK, CTRL, AMOR, STAD, BUSS 1080 } 1081 1082 public static final EnumMap<Fnc, String> FncSTR = new EnumMap<Fnc, String>(Fnc.class); 1083 static { 1084 FncSTR.put(Fnc.UNKFNC, ""); 1085 FncSTR.put(Fnc.HMO, "harbour-master"); 1086 FncSTR.put(Fnc.CSTM, "customs"); 1087 FncSTR.put(Fnc.HLTH, "health"); 1088 FncSTR.put(Fnc.HOSP, "hospital"); 1089 FncSTR.put(Fnc.POFF, "post_office"); 1090 FncSTR.put(Fnc.HOTEL, "hotel"); 1091 FncSTR.put(Fnc.RWSTA, "railway_station"); 1092 FncSTR.put(Fnc.POLICE, "police_station"); 1093 FncSTR.put(Fnc.WPOL, "water-police_station"); 1094 FncSTR.put(Fnc.PILO, "pilot_office"); 1095 FncSTR.put(Fnc.PILL, "pilot_lookout"); 1096 FncSTR.put(Fnc.BANK, "bank"); 1097 FncSTR.put(Fnc.DCHQ, "district_control"); 1098 FncSTR.put(Fnc.TRNS, "transit_shed"); 1099 FncSTR.put(Fnc.FACT, "factory"); 1100 FncSTR.put(Fnc.PWRS, "power_station"); 1101 FncSTR.put(Fnc.ADMIN, "administrative"); 1102 FncSTR.put(Fnc.EDUC, "educational"); 1103 FncSTR.put(Fnc.CHCH, "church"); 1104 FncSTR.put(Fnc.CHPL, "chapel"); 1105 FncSTR.put(Fnc.TMPL, "temple"); 1106 FncSTR.put(Fnc.PGDA, "pagoda"); 1107 FncSTR.put(Fnc.SHSH, "shinto_shrine"); 1108 FncSTR.put(Fnc.BTMP, "buddhist_temple"); 1109 FncSTR.put(Fnc.MOSQ, "mosque"); 1110 FncSTR.put(Fnc.MRBT, "marabout"); 1111 FncSTR.put(Fnc.LOOK, "lookout"); 1112 FncSTR.put(Fnc.COMS, "communication"); 1113 FncSTR.put(Fnc.TV, "television"); 1114 FncSTR.put(Fnc.RADO, "radio"); 1115 FncSTR.put(Fnc.RADR, "radar"); 1116 FncSTR.put(Fnc.LSUP, "light_support"); 1117 FncSTR.put(Fnc.MWAV, "microwave"); 1118 FncSTR.put(Fnc.COOL, "cooling"); 1119 FncSTR.put(Fnc.OBSV, "observation"); 1120 FncSTR.put(Fnc.TIMB, "time_ball"); 1121 FncSTR.put(Fnc.CLK, "clock"); 1122 FncSTR.put(Fnc.CTRL, "control"); 1123 FncSTR.put(Fnc.AMOR, "airship_mooring"); 1124 FncSTR.put(Fnc.STAD, "stadium"); 1125 FncSTR.put(Fnc.BUSS, "bus_station"); 1126 }; 1127 1128 private Fnc function = Fnc.UNKFNC; 1129 1130 public Fnc getFunc() { 1131 return function; 1132 } 1133 1134 public void setFunc(Fnc fnc) { 1135 function = fnc; 1074 1136 } 1075 1137
Note:
See TracChangeset
for help on using the changeset viewer.