Changeset 27389 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2012-01-02T13:52:17+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src
- Files:
-
- 5 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties
r27151 r27389 278 278 SpireMinaret=Spire/Minaret 279 279 280 Oil=Oil 281 Production=Production 282 Observation=Observation 283 ALP=ALP 284 SALM=SALM 285 MooringTower=Mooring Tower 286 ArtificialIsland=Artificial Island 287 FPSO=FPSO 288 Accommodation=Accommodation 289 NCCB=NCCB 290 280 291 NotDecimal=Not a valid decimal string 281 292 TooBig=Maximum value exceeded -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_de.properties
r27158 r27389 278 278 SpireMinaret=Spitzer Turm/Minarett 279 279 280 Oil=Oil 281 Production=Production 282 Observation=Observation 283 ALP=ALP 284 SALM=SALM 285 MooringTower=Mooring Tower 286 ArtificialIsland=Artificial Island 287 FPSO=FPSO 288 Accommodation=Accommodation 289 NCCB=NCCB 290 280 291 NotDecimal=Kein korrekter Dezimalwert 281 292 TooBig=Maximaler Wert überschritten -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties
r27151 r27389 278 278 SpireMinaret=Spire/Minaret 279 279 280 Oil=Oil 281 Production=Production 282 Observation=Observation 283 ALP=ALP 284 SALM=SALM 285 MooringTower=Mooring Tower 286 ArtificialIsland=Artificial Island 287 FPSO=FPSO 288 Accommodation=Accommodation 289 NCCB=NCCB 290 280 291 NotDecimal=Not a valid decimal string 281 292 TooBig=Maximum value exceeded -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r27314 r27389 51 51 int idx = warningCats.get(cat); 52 52 if (dlg.node != null && (idx == warningCatBox.getSelectedIndex())) { 53 dlg.panelMain.mark.setCategory(cat); 54 dlg.panelMain.mark.testValid(); 55 } 56 } 57 } 58 }; 59 public JComboBox platformCatBox; 60 public EnumMap<Cat, Integer> platformCats = new EnumMap<Cat, Integer>(Cat.class); 61 private ActionListener alPlatformCatBox = new ActionListener() { 62 public void actionPerformed(java.awt.event.ActionEvent e) { 63 for (Cat cat : platformCats.keySet()) { 64 int idx = platformCats.get(cat); 65 if (dlg.node != null && (idx == platformCatBox.getSelectedIndex())) { 53 66 dlg.panelMain.mark.setCategory(cat); 54 67 dlg.panelMain.mark.testValid(); … … 66 79 public JRadioButton trafficButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TrafficButton.png"))); 67 80 public JRadioButton warningButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/WarningButton.png"))); 81 public JRadioButton platformButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PlatformButton.png"))); 68 82 public EnumMap<Obj, JRadioButton> objects = new EnumMap<Obj, JRadioButton>(Obj.class); 69 83 private ActionListener alObj = new ActionListener() { … … 87 101 trafficCatBox.setVisible(false); 88 102 warningCatBox.setVisible(false); 103 platformCatBox.setVisible(false); 89 104 alLandCatBox.actionPerformed(null); 90 105 } else if (trafficButton.isSelected()) { … … 93 108 landCatBox.setVisible(false); 94 109 warningCatBox.setVisible(false); 110 platformCatBox.setVisible(false); 95 111 alTrafficCatBox.actionPerformed(null); 96 112 } else if (warningButton.isSelected()) { … … 99 115 landCatBox.setVisible(false); 100 116 trafficCatBox.setVisible(false); 117 platformCatBox.setVisible(false); 101 118 alWarningCatBox.actionPerformed(null); 119 } else if (platformButton.isSelected()) { 120 categoryLabel.setVisible(true); 121 platformCatBox.setVisible(true); 122 warningCatBox.setVisible(false); 123 landCatBox.setVisible(false); 124 trafficCatBox.setVisible(false); 125 alPlatformCatBox.actionPerformed(null); 102 126 } else { 103 127 dlg.panelMain.mark.setCategory(Cat.NOCAT); … … 106 130 trafficCatBox.setVisible(false); 107 131 warningCatBox.setVisible(false); 132 platformCatBox.setVisible(false); 108 133 } 109 134 dlg.panelMain.mark.testValid(); … … 115 140 setLayout(null); 116 141 add(getObjButton(houseButton, 0, 0, 34, 32, "Lighthouse", Obj.LITHSE)); 117 add(getObjButton(majorButton, 35, 0, 34, 32, "MajorLight", Obj.LITMAJ)); 118 add(getObjButton(minorButton, 70, 0, 34, 32, "MinorLight", Obj.LITMIN)); 119 add(getObjButton(landButton, 105, 0, 34, 32, "Landmark", Obj.LNDMRK)); 142 add(getObjButton(majorButton, 34, 0, 34, 32, "MajorLight", Obj.LITMAJ)); 143 add(getObjButton(minorButton, 68, 0, 34, 32, "MinorLight", Obj.LITMIN)); 144 add(getObjButton(landButton, 102, 0, 34, 32, "Landmark", Obj.LNDMRK)); 145 add(getObjButton(platformButton, 136, 0, 34, 32, "Platform", Obj.OFSPLF)); 120 146 add(getObjButton(vesselButton, 0, 35, 34, 32, "LightVessel", Obj.LITVES)); 121 add(getObjButton(floatButton, 3 5, 35, 34, 32, "LightFloat", Obj.LITFLT));122 add(getObjButton(trafficButton, 70, 35, 34, 32, "SSTraffic", Obj.SISTAT));123 add(getObjButton(warningButton, 10 5, 35, 34, 32, "SSWarning", Obj.SISTAW));147 add(getObjButton(floatButton, 34, 35, 34, 32, "LightFloat", Obj.LITFLT)); 148 add(getObjButton(trafficButton, 68, 35, 34, 32, "SSTraffic", Obj.SISTAT)); 149 add(getObjButton(warningButton, 102, 35, 34, 32, "SSWarning", Obj.SISTAW)); 124 150 125 151 categoryLabel = new JLabel(Messages.getString("Category"), SwingConstants.CENTER); … … 193 219 warningCatBox.setVisible(false); 194 220 221 platformCatBox = new JComboBox(); 222 platformCatBox.setBounds(new Rectangle(10, 100, 160, 20)); 223 add(platformCatBox); 224 platformCatBox.addActionListener(alPlatformCatBox); 225 addPLItem("", Cat.NOCAT); 226 addPLItem(Messages.getString("Oil"), Cat.OFP_OIL); 227 addPLItem(Messages.getString("Production"), Cat.OFP_PRD); 228 addPLItem(Messages.getString("Observation"), Cat.OFP_OBS); 229 addPLItem(Messages.getString("ALP"), Cat.OFP_ALP); 230 addPLItem(Messages.getString("SALM"), Cat.OFP_SALM); 231 addPLItem(Messages.getString("MooringTower"), Cat.OFP_MOR); 232 addPLItem(Messages.getString("ArtificialIsland"), Cat.OFP_ISL); 233 addPLItem(Messages.getString("FPSO"), Cat.OFP_FPSO); 234 addPLItem(Messages.getString("Accommodation"), Cat.OFP_ACC); 235 addPLItem(Messages.getString("NCCB"), Cat.OFP_NCCB); 236 platformCatBox.setVisible(false); 195 237 } 196 238 … … 201 243 trafficCatBox.setVisible(false); 202 244 warningCatBox.setVisible(false); 245 platformCatBox.setVisible(false); 203 246 for (Cat cat : landCats.keySet()) { 204 247 int item = landCats.get(cat); … … 211 254 landCatBox.setVisible(false); 212 255 warningCatBox.setVisible(false); 256 platformCatBox.setVisible(false); 213 257 for (Cat cat : trafficCats.keySet()) { 214 258 int item = trafficCats.get(cat); … … 221 265 landCatBox.setVisible(false); 222 266 trafficCatBox.setVisible(false); 267 platformCatBox.setVisible(false); 223 268 for (Cat cat : warningCats.keySet()) { 224 269 int item = warningCats.get(cat); 225 270 if (dlg.panelMain.mark.getCategory() == cat) 226 271 warningCatBox.setSelectedIndex(item); 272 } 273 } else if (dlg.panelMain.mark.getObject() == Obj.OFSPLF) { 274 categoryLabel.setVisible(true); 275 platformCatBox.setVisible(true); 276 landCatBox.setVisible(false); 277 warningCatBox.setVisible(false); 278 trafficCatBox.setVisible(false); 279 for (Cat cat : platformCats.keySet()) { 280 int item = platformCats.get(cat); 281 if (dlg.panelMain.mark.getCategory() == cat) 282 platformCatBox.setSelectedIndex(item); 227 283 } 228 284 } else { … … 231 287 trafficCatBox.setVisible(false); 232 288 warningCatBox.setVisible(false); 289 platformCatBox.setVisible(false); 233 290 } 234 291 for (Obj obj : objects.keySet()) { … … 252 309 warningCats.put(cat, warningCatBox.getItemCount()); 253 310 warningCatBox.addItem(str); 311 } 312 313 private void addPLItem(String str, Cat cat) { 314 platformCats.put(cat, platformCatBox.getItemCount()); 315 platformCatBox.addItem(str); 254 316 } 255 317 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r27317 r27389 310 310 case LGT: 311 311 case SIS: 312 case PLF: 312 313 lightsButton.setBorderPainted(true); 313 314 topButton.setEnabled(false); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27373 r27389 65 65 FLTCAR, FLTISD, FLTLAT, FLTSAW, FLTSPP, 66 66 LITMAJ, LITMIN, LITFLT, LITVES, LITHSE, LNDMRK, 67 MORFAC, SISTAW, SISTAT 67 MORFAC, SISTAW, SISTAT, OFSPLF 68 68 } 69 69 … … 92 92 ObjSTR.put(Obj.LITHSE, "landmark"); 93 93 ObjSTR.put(Obj.MORFAC, "mooring"); 94 ObjSTR.put(Obj.OFSPLF, "platform"); 94 95 ObjSTR.put(Obj.SISTAW, "signal_station_warning"); 95 96 ObjSTR.put(Obj.SISTAT, "signal_station_traffic"); … … 129 130 130 131 public enum Ent { 131 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION 132 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION, PLATFORM 132 133 } 133 134 … … 156 157 EntMAP.put(Obj.LNDMRK, Ent.LIGHT); 157 158 EntMAP.put(Obj.MORFAC, Ent.MOORING); 159 EntMAP.put(Obj.OFSPLF, Ent.PLATFORM); 158 160 EntMAP.put(Obj.SISTAW, Ent.STATION); 159 161 EntMAP.put(Obj.SISTAT, Ent.STATION); … … 161 163 162 164 public enum Grp { 163 NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS 165 NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS, PLF 164 166 } 165 167 … … 189 191 GrpMAP.put(Obj.LNDMRK, Grp.LGT); 190 192 GrpMAP.put(Obj.MORFAC, Grp.SPP); 193 GrpMAP.put(Obj.OFSPLF, Grp.PLF); 191 194 GrpMAP.put(Obj.SISTAW, Grp.SIS); 192 195 GrpMAP.put(Obj.SISTAT, Grp.SIS); … … 203 206 SIS_TSTM, SIS_TGAG, SIS_TSCL, SIS_DIVE, SIS_LGAG, LIT_DIRF, LIT_LEDG, 204 207 LMK_CHMY, LMK_CARN, LMK_DSHA, LMK_FLGS, LMK_FLRS, LMK_MNMT, LMK_TOWR, LMK_WNDM, LMK_WTRT, 205 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR 208 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR, 209 OFP_OIL, OFP_PRD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOR, OFP_ISL, OFP_FPSO, OFP_ACC, OFP_NCCB 206 210 } 207 211 … … 284 288 CatSTR.put(Cat.LMK_WNDL, "windmill"); 285 289 CatSTR.put(Cat.LMK_SPIR, "spire"); 290 CatSTR.put(Cat.OFP_OIL, "oil"); 291 CatSTR.put(Cat.OFP_PRD, "production"); 292 CatSTR.put(Cat.OFP_OBS, "observation"); 293 CatSTR.put(Cat.OFP_ALP, "alp"); 294 CatSTR.put(Cat.OFP_SALM, "salm"); 295 CatSTR.put(Cat.OFP_MOR, "mooring"); 296 CatSTR.put(Cat.OFP_ISL, "island"); 297 CatSTR.put(Cat.OFP_FPSO, "fpso"); 298 CatSTR.put(Cat.OFP_ACC, "accommodation"); 299 CatSTR.put(Cat.OFP_NCCB, "nccb"); 286 300 } 287 301 … … 1118 1132 case SISTAW: 1119 1133 case SISTAT: 1134 case OFSPLF: 1120 1135 tmp = true; 1121 1136 break; … … 1875 1890 case SISTAT: 1876 1891 imgStr += "Signal_Station"; 1892 break; 1893 case OFSPLF: 1894 imgStr += "Platform"; 1877 1895 break; 1878 1896 }
Note:
See TracChangeset
for help on using the changeset viewer.