Changeset 27439 in osm
- Timestamp:
- 2012-01-13T21:11:18+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/images/PlatformButton.svg
r27389 r27439 26187 26187 inkscape:pageopacity="0.0" 26188 26188 inkscape:pageshadow="2" 26189 inkscape:zoom=" 22.627416"26190 inkscape:cx=" 1.8124961"26189 inkscape:zoom="3.9999998" 26190 inkscape:cx="-5.6784167" 26191 26191 inkscape:cy="15.194363" 26192 26192 inkscape:document-units="px" … … 26216 26216 <dc:type 26217 26217 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> 26218 <dc:title ></dc:title>26218 <dc:title /> 26219 26219 </cc:Work> 26220 26220 </rdf:RDF> … … 26239 26239 transform="translate(-125.22893,1000.408)" /> 26240 26240 <g 26241 style="display:inline" 26242 id="g7823" 26243 transform="matrix(0.2,0,0,0.2,-14,996.3622)"> 26241 id="g12177" 26242 transform="matrix(0.2,0,0,0.2,12.8,829.08976)"> 26244 26243 <g 26245 inkscape:label="Platform" 26246 id="layer9"> 26247 <rect 26248 y="152" 26249 x="102" 26250 height="96" 26251 width="96" 26252 id="rect3584" 26253 style="fill:none;stroke:#000000;stroke-width:20;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> 26254 <path 26255 transform="matrix(0.6222222,0,0,0.57931037,56.555558,83.517238)" 26256 d="m 155,201.07143 c 0,2.86004 -2.15862,5.17857 -4.82143,5.17857 -2.6628,0 -4.82143,-2.31853 -4.82143,-5.17857 0,-2.86005 2.15863,-5.17857 4.82143,-5.17857 2.66281,0 4.82143,2.31852 4.82143,5.17857 z" 26257 sodipodi:ry="5.1785712" 26258 sodipodi:rx="4.8214288" 26259 sodipodi:cy="201.07143" 26260 sodipodi:cx="150.17857" 26261 id="path4354" 26262 style="fill:#000000;fill-opacity:1;stroke:none" 26263 sodipodi:type="arc" /> 26244 transform="translate(-134,836.3622)" 26245 id="g7823" 26246 style="display:inline"> 26247 <g 26248 id="layer9" 26249 inkscape:label="Platform"> 26250 <path 26251 inkscape:connector-curvature="0" 26252 d="m 100,150 0,2 0,96 0,2 2,0 96,0 2,0 0,-2 0,-96 0,-2 -2,0 -96,0 -2,0 z m 4,4 92,0 0,92 -92,0 0,-92 z" 26253 style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:none;stroke-width:4;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" 26254 id="path12181" /> 26255 <path 26256 sodipodi:type="arc" 26257 style="fill:#000000;fill-opacity:1;stroke:none" 26258 id="path4354" 26259 sodipodi:cx="150.17857" 26260 sodipodi:cy="201.07143" 26261 sodipodi:rx="4.8214288" 26262 sodipodi:ry="5.1785712" 26263 d="m 155,201.07143 c 0,2.86004 -2.15862,5.17857 -4.82143,5.17857 -2.6628,0 -4.82143,-2.31853 -4.82143,-5.17857 0,-2.86005 2.15863,-5.17857 4.82143,-5.17857 2.66281,0 4.82143,2.31852 4.82143,5.17857 z" 26264 transform="matrix(0.6222222,0,0,0.57931037,56.555558,83.517238)" /> 26265 </g> 26264 26266 </g> 26265 26267 </g> -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r27389 r27439 64 64 int idx = platformCats.get(cat); 65 65 if (dlg.node != null && (idx == platformCatBox.getSelectedIndex())) { 66 dlg.panelMain.mark.setCategory(cat); 67 dlg.panelMain.mark.testValid(); 68 } 69 } 70 } 71 }; 72 public JComboBox pilotCatBox; 73 public EnumMap<Cat, Integer> pilotCats = new EnumMap<Cat, Integer>(Cat.class); 74 private ActionListener alPilotCatBox = new ActionListener() { 75 public void actionPerformed(java.awt.event.ActionEvent e) { 76 for (Cat cat : pilotCats.keySet()) { 77 int idx = pilotCats.get(cat); 78 if (dlg.node != null && (idx == pilotCatBox.getSelectedIndex())) { 66 79 dlg.panelMain.mark.setCategory(cat); 67 80 dlg.panelMain.mark.testValid(); … … 80 93 public JRadioButton warningButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/WarningButton.png"))); 81 94 public JRadioButton platformButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PlatformButton.png"))); 95 public JRadioButton coastguardButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/CoastguardButton.png"))); 96 public JRadioButton pilotButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PilotButton.png"))); 97 public JRadioButton rescueButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RescueButton.png"))); 98 public JRadioButton radioButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RadioStationButton.png"))); 99 public JRadioButton radarButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/RadarStationButton.png"))); 82 100 public EnumMap<Obj, JRadioButton> objects = new EnumMap<Obj, JRadioButton>(Obj.class); 83 101 private ActionListener alObj = new ActionListener() { … … 96 114 dlg.panelMain.mark.setShape(Shp.FLOAT); 97 115 else dlg.panelMain.mark.setShape(Shp.UNKSHP); 116 categoryLabel.setVisible(false); 117 landCatBox.setVisible(false); 118 trafficCatBox.setVisible(false); 119 warningCatBox.setVisible(false); 120 platformCatBox.setVisible(false); 121 pilotCatBox.setVisible(false); 122 dlg.panelMain.mark.setCategory(Cat.NOCAT); 98 123 if (landButton.isSelected()) { 99 124 categoryLabel.setVisible(true); 100 125 landCatBox.setVisible(true); 101 trafficCatBox.setVisible(false);102 warningCatBox.setVisible(false);103 platformCatBox.setVisible(false);104 126 alLandCatBox.actionPerformed(null); 105 127 } else if (trafficButton.isSelected()) { 106 128 categoryLabel.setVisible(true); 107 129 trafficCatBox.setVisible(true); 108 landCatBox.setVisible(false);109 warningCatBox.setVisible(false);110 platformCatBox.setVisible(false);111 130 alTrafficCatBox.actionPerformed(null); 112 131 } else if (warningButton.isSelected()) { 113 132 categoryLabel.setVisible(true); 114 133 warningCatBox.setVisible(true); 115 landCatBox.setVisible(false);116 trafficCatBox.setVisible(false);117 platformCatBox.setVisible(false);118 134 alWarningCatBox.actionPerformed(null); 119 135 } else if (platformButton.isSelected()) { 120 136 categoryLabel.setVisible(true); 121 137 platformCatBox.setVisible(true); 122 warningCatBox.setVisible(false);123 landCatBox.setVisible(false);124 trafficCatBox.setVisible(false);125 138 alPlatformCatBox.actionPerformed(null); 126 } else { 127 dlg.panelMain.mark.setCategory(Cat.NOCAT); 128 categoryLabel.setVisible(false); 129 landCatBox.setVisible(false); 130 trafficCatBox.setVisible(false); 131 warningCatBox.setVisible(false); 132 platformCatBox.setVisible(false); 139 } else if (pilotButton.isSelected()) { 140 categoryLabel.setVisible(true); 141 pilotCatBox.setVisible(true); 142 alPilotCatBox.actionPerformed(null); 133 143 } 134 144 dlg.panelMain.mark.testValid(); … … 148 158 add(getObjButton(trafficButton, 68, 35, 34, 32, "SSTraffic", Obj.SISTAT)); 149 159 add(getObjButton(warningButton, 102, 35, 34, 32, "SSWarning", Obj.SISTAW)); 160 add(getObjButton(coastguardButton, 0, 70, 34, 32, "Coastguard", Obj.CGUSTA)); 161 add(getObjButton(pilotButton, 34, 70, 34, 32, "PilotBoarding", Obj.PILBOP)); 162 add(getObjButton(rescueButton, 68, 70, 34, 32, "RescueStation", Obj.RSCSTA)); 163 add(getObjButton(radioButton, 102, 70, 34, 32, "RadioStation", Obj.RDOSTA)); 164 add(getObjButton(radarButton, 136, 70, 34, 32, "RadarStation", Obj.RADSTA)); 150 165 151 166 categoryLabel = new JLabel(Messages.getString("Category"), SwingConstants.CENTER); 152 categoryLabel.setBounds(new Rectangle(5, 80, 160, 20));167 categoryLabel.setBounds(new Rectangle(5, 110, 160, 20)); 153 168 add(categoryLabel); 154 169 categoryLabel.setVisible(false); 155 170 156 171 landCatBox = new JComboBox(); 157 landCatBox.setBounds(new Rectangle(5, 1 00, 160, 20));172 landCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 158 173 add(landCatBox); 159 174 landCatBox.addActionListener(alLandCatBox); … … 181 196 182 197 trafficCatBox = new JComboBox(); 183 trafficCatBox.setBounds(new Rectangle(5, 1 00, 160, 20));198 trafficCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 184 199 add(trafficCatBox); 185 200 trafficCatBox.addActionListener(alTrafficCatBox); … … 198 213 199 214 warningCatBox = new JComboBox(); 200 warningCatBox.setBounds(new Rectangle( 10, 100, 160, 20));215 warningCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 201 216 add(warningCatBox); 202 217 warningCatBox.addActionListener(alWarningCatBox); … … 220 235 221 236 platformCatBox = new JComboBox(); 222 platformCatBox.setBounds(new Rectangle( 10, 100, 160, 20));237 platformCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 223 238 add(platformCatBox); 224 239 platformCatBox.addActionListener(alPlatformCatBox); … … 235 250 addPLItem(Messages.getString("NCCB"), Cat.OFP_NCCB); 236 251 platformCatBox.setVisible(false); 252 253 pilotCatBox = new JComboBox(); 254 pilotCatBox.setBounds(new Rectangle(5, 130, 160, 20)); 255 add(pilotCatBox); 256 pilotCatBox.addActionListener(alPilotCatBox); 257 addPTItem("", Cat.NOCAT); 258 addPTItem(Messages.getString("CruisingVessel"), Cat.PIL_VESS); 259 addPTItem(Messages.getString("Helicopter"), Cat.PIL_HELI); 260 addPTItem(Messages.getString("FromShore"), Cat.PIL_SHORE); 261 pilotCatBox.setVisible(false); 237 262 } 238 263 239 264 public void syncPanel() { 265 categoryLabel.setVisible(false); 266 landCatBox.setVisible(false); 267 trafficCatBox.setVisible(false); 268 warningCatBox.setVisible(false); 269 platformCatBox.setVisible(false); 270 pilotCatBox.setVisible(false); 240 271 if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && (dlg.panelMain.mark.getCategory() != Cat.NOCAT)) { 241 272 categoryLabel.setVisible(true); 242 273 landCatBox.setVisible(true); 243 trafficCatBox.setVisible(false);244 warningCatBox.setVisible(false);245 platformCatBox.setVisible(false);246 274 for (Cat cat : landCats.keySet()) { 247 275 int item = landCats.get(cat); … … 252 280 categoryLabel.setVisible(true); 253 281 trafficCatBox.setVisible(true); 254 landCatBox.setVisible(false);255 warningCatBox.setVisible(false);256 platformCatBox.setVisible(false);257 282 for (Cat cat : trafficCats.keySet()) { 258 283 int item = trafficCats.get(cat); … … 263 288 categoryLabel.setVisible(true); 264 289 warningCatBox.setVisible(true); 265 landCatBox.setVisible(false);266 trafficCatBox.setVisible(false);267 platformCatBox.setVisible(false);268 290 for (Cat cat : warningCats.keySet()) { 269 291 int item = warningCats.get(cat); … … 274 296 categoryLabel.setVisible(true); 275 297 platformCatBox.setVisible(true); 276 landCatBox.setVisible(false);277 warningCatBox.setVisible(false);278 trafficCatBox.setVisible(false);279 298 for (Cat cat : platformCats.keySet()) { 280 299 int item = platformCats.get(cat); … … 282 301 platformCatBox.setSelectedIndex(item); 283 302 } 303 } else if (dlg.panelMain.mark.getObject() == Obj.PILBOP) { 304 categoryLabel.setVisible(true); 305 pilotCatBox.setVisible(true); 306 for (Cat cat : pilotCats.keySet()) { 307 int item = pilotCats.get(cat); 308 if (dlg.panelMain.mark.getCategory() == cat) 309 pilotCatBox.setSelectedIndex(item); 310 } 284 311 } else { 285 categoryLabel.setVisible(false);286 landCatBox.setVisible(false);287 trafficCatBox.setVisible(false);288 warningCatBox.setVisible(false);289 platformCatBox.setVisible(false);290 312 } 291 313 for (Obj obj : objects.keySet()) { … … 314 336 platformCats.put(cat, platformCatBox.getItemCount()); 315 337 platformCatBox.addItem(str); 338 } 339 340 private void addPTItem(String str, Cat cat) { 341 pilotCats.put(cat, pilotCatBox.getItemCount()); 342 pilotCatBox.addItem(str); 316 343 } 317 344 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r27423 r27439 313 313 case SIS: 314 314 case PLF: 315 case CGS: 316 case PLT: 315 317 lightsButton.setBorderPainted(true); 316 318 panelLights.setVisible(true); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java
r27423 r27439 138 138 139 139 categoryLabel = new JLabel(Messages.getString("Category"), SwingConstants.CENTER); 140 categoryLabel.setBounds(new Rectangle(5, 1 00, 160, 20));140 categoryLabel.setBounds(new Rectangle(5, 110, 160, 20)); 141 141 add(categoryLabel); 142 142 categoryBox = new JComboBox(); 143 categoryBox.setBounds(new Rectangle(5, 1 20, 160, 20));143 categoryBox.setBounds(new Rectangle(5, 130, 160, 20)); 144 144 add(categoryBox); 145 145 categoryBox.setVisible(true); … … 164 164 addCatItem(Messages.getString("Anchorage"), Cat.SPM_ANCH); 165 165 mooringBox = new JComboBox(); 166 mooringBox.setBounds(new Rectangle(5, 1 20, 160, 20));166 mooringBox.setBounds(new Rectangle(5, 130, 160, 20)); 167 167 add(mooringBox); 168 168 mooringBox.setVisible(false); … … 187 187 add(topmarkButton); 188 188 189 //mooringButton.setBounds(new Rectangle(136, 64, 34, 32));190 //mooringButton.setToolTipText(Messages.getString("Mooring"));191 //mooringButton.setBorder(BorderFactory.createLoweredBevelBorder());192 //mooringButton.addActionListener(alMooring);193 //add(mooringButton);189 mooringButton.setBounds(new Rectangle(136, 64, 34, 32)); 190 mooringButton.setToolTipText(Messages.getString("Mooring")); 191 mooringButton.setBorder(BorderFactory.createLoweredBevelBorder()); 192 mooringButton.addActionListener(alMooring); 193 add(mooringButton); 194 194 } 195 195 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27423 r27439 65 65 FLTCAR, FLTISD, FLTLAT, FLTSAW, FLTSPP, 66 66 LITMAJ, LITMIN, LITFLT, LITVES, LITHSE, LNDMRK, 67 MORFAC, BOYINB, SISTAW, SISTAT, OFSPLF 67 MORFAC, BOYINB, SISTAW, SISTAT, OFSPLF, 68 CGUSTA, PILBOP, RSCSTA, RDOSTA, RADSTA 68 69 } 69 70 … … 96 97 ObjSTR.put(Obj.SISTAW, "signal_station_warning"); 97 98 ObjSTR.put(Obj.SISTAT, "signal_station_traffic"); 99 ObjSTR.put(Obj.CGUSTA, "coastguard_station"); 100 ObjSTR.put(Obj.PILBOP, "pilot_boarding"); 101 ObjSTR.put(Obj.RSCSTA, "rescue_station"); 102 ObjSTR.put(Obj.RDOSTA, "radio_station"); 103 ObjSTR.put(Obj.RADSTA, "radar_station"); 98 104 } 99 105 … … 131 137 132 138 public enum Ent { 133 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION, PLATFORM 139 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION, PLATFORM, 140 COASTGUARD, PILOT 134 141 } 135 142 … … 162 169 EntMAP.put(Obj.SISTAW, Ent.STATION); 163 170 EntMAP.put(Obj.SISTAT, Ent.STATION); 171 EntMAP.put(Obj.CGUSTA, Ent.COASTGUARD); 172 EntMAP.put(Obj.PILBOP, Ent.PILOT); 164 173 } 165 174 166 175 public enum Grp { 167 NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS, PLF 176 NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS, PLF, CGS, PLT 168 177 } 169 178 … … 197 206 GrpMAP.put(Obj.SISTAW, Grp.SIS); 198 207 GrpMAP.put(Obj.SISTAT, Grp.SIS); 208 GrpMAP.put(Obj.CGUSTA, Grp.CGS); 209 GrpMAP.put(Obj.PILBOP, Grp.PLT); 199 210 } 200 211 … … 210 221 LMK_CHMY, LMK_CARN, LMK_DSHA, LMK_FLGS, LMK_FLRS, LMK_MNMT, LMK_TOWR, LMK_WNDM, LMK_WTRT, 211 222 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR, 212 OFP_OIL, OFP_PRD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOR, OFP_ISL, OFP_FPSO, OFP_ACC, OFP_NCCB 223 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 213 225 } 214 226 … … 305 317 CatSTR.put(Cat.OFP_ACC, "accommodation"); 306 318 CatSTR.put(Cat.OFP_NCCB, "nccb"); 319 CatSTR.put(Cat.PIL_VESS, "cruising_vessel"); 320 CatSTR.put(Cat.PIL_HELI, "helicopter"); 321 CatSTR.put(Cat.PIL_SHORE, "from_shore"); 307 322 } 308 323 … … 1141 1156 case MORFAC: 1142 1157 case BOYINB: 1143 tmp = true; 1158 case PILBOP: 1159 tmp = true; 1144 1160 break; 1145 1161 case LNDMRK: … … 1898 1914 break; 1899 1915 case OFSPLF: 1900 imgStr += "Platform"; 1916 if (getCategory() == Cat.OFP_FPSO) 1917 imgStr += "Storage"; 1918 else 1919 imgStr += "Platform"; 1901 1920 break; 1902 1921 case MORFAC: … … 1918 1937 case BOYINB: 1919 1938 imgStr += "Super"; 1939 break; 1940 case CGUSTA: 1941 imgStr += "Signal_Station"; 1942 break; 1943 case PILBOP: 1944 imgStr += "Pilot"; 1920 1945 break; 1921 1946 }
Note:
See TracChangeset
for help on using the changeset viewer.