Changeset 23028 in osm for applications/editors
- Timestamp:
- 2010-09-06T18:41:37+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r23013 r23028 116 116 public JRadioButton rbM01RegionA = null; 117 117 public JRadioButton rbM01RegionB = null; 118 public JLabel lM01Icon01 = null; 119 public JLabel lM01Icon02 = null; 118 public JLabel lM01Icon = null; 119 public JLabel lM02Icon = null; 120 public JLabel lM03Icon = null; 121 public JLabel lM04Icon = null; 120 122 public JLabel lM01FireMark = null; 121 123 private JLabel lM01TypeOfMark = null; … … 499 501 if (pM01SeaMap == null) { 500 502 501 lM01Icon01 = new JLabel(); 502 lM01Icon01.setBounds(new Rectangle(210, 30, 160, 200)); 503 lM01Icon01.setIcon(null); 504 lM01Icon01.setText(""); //$NON-NLS-1$ 505 506 lM01Icon02 = new JLabel(); 507 lM01Icon02.setBounds(new Rectangle(210, 30, 160, 200)); 508 lM01Icon02.setIcon(null); 509 lM01Icon02.setText(""); //$NON-NLS-1$ 503 lM01Icon = new JLabel(); 504 lM01Icon.setBounds(new Rectangle(210, 30, 150, 200)); 505 lM01Icon.setIcon(null); 506 lM01Icon.setText(""); //$NON-NLS-1$ 507 508 lM02Icon = new JLabel(); 509 lM02Icon.setBounds(new Rectangle(210, 30, 150, 200)); 510 lM02Icon.setIcon(null); 511 lM02Icon.setText(""); //$NON-NLS-1$ 512 513 lM03Icon = new JLabel(); 514 lM03Icon.setBounds(new Rectangle(210, -40, 150, 200)); 515 lM03Icon.setIcon(null); 516 lM03Icon.setText(""); //$NON-NLS-1$ 517 518 lM04Icon = new JLabel(); 519 lM04Icon.setBounds(new Rectangle(210, 30, 150, 200)); 520 lM04Icon.setIcon(null); 521 lM04Icon.setText(""); //$NON-NLS-1$ 510 522 511 523 lM01FireMark = new JLabel(); … … 653 665 pM01SeaMap.add(lM01Region, null); 654 666 pM01SeaMap.add(lM02Region, null); 655 pM01SeaMap.add(lM01Icon01, null); 656 pM01SeaMap.add(lM01Icon02, null); 667 pM01SeaMap.add(lM01Icon, null); 668 pM01SeaMap.add(lM02Icon, null); 669 pM01SeaMap.add(lM03Icon, null); 670 pM01SeaMap.add(lM04Icon, null); 657 671 pM01SeaMap.add(getCbM01TypeOfMark(), null); 658 672 pM01SeaMap.add(lM01TypeOfMark, null); … … 942 956 cM01Radar.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 943 957 cM01Radar.setText(Messages.getString("SmpDialogAction.169")); //$NON-NLS-1$ 958 cM01Radar.addActionListener(new ActionListener() { 959 public void actionPerformed(ActionEvent e) { 960 buoy.setRadar(cM01Radar.isSelected()); 961 buoy.paintSign(); 962 } 963 }); 944 964 } 945 965 return cM01Radar; -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23012 r23028 57 57 dlg.rbM01RegionA.setSelected(!region); 58 58 dlg.rbM01RegionB.setSelected(region); 59 } 60 61 private boolean Radar = false; 62 63 public boolean hasRadar() { 64 return Radar; 65 } 66 67 public void setRadar(boolean radar) { 68 Radar = radar; 69 } 70 71 private boolean Fog = false; 72 73 public boolean hasFog() { 74 return Fog; 75 } 76 77 public void setFog(boolean fog) { 78 Fog = fog; 59 79 } 60 80 … … 258 278 } 259 279 260 dlg.lM01Icon01.setIcon(null); 261 dlg.lM01Icon02.setIcon(null); 280 dlg.lM01Icon.setIcon(null); 281 dlg.lM02Icon.setIcon(null); 282 dlg.lM03Icon.setIcon(null); 283 dlg.lM04Icon.setIcon(null); 262 284 } 263 285 … … 326 348 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); 327 349 328 dlg.lM01Icon01.setIcon(null); 329 dlg.lM01Icon02.setIcon(null); 350 dlg.lM01Icon.setIcon(null); 351 dlg.lM02Icon.setIcon(null); 352 dlg.lM03Icon.setIcon(null); 353 dlg.lM04Icon.setIcon(null); 330 354 331 355 dlg.rbM01RegionA.setEnabled(false); … … 347 371 dlg.cM01Radar.setSelected(false); 348 372 dlg.cM01Radar.setVisible(false); 373 setRadar(false); 349 374 dlg.cM01Racon.setSelected(false); 350 375 dlg.cM01Racon.setVisible(false); … … 364 389 dlg.tfM01FogPeriod.setVisible(false); 365 390 dlg.lM01FogPeriod.setVisible(false); 391 setFog(false); 366 392 dlg.cM01Fired.setSelected(false); 367 393 dlg.cM01Fired.setVisible(false); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r23013 r23028 191 191 192 192 dlg.sM01StatusBar.setText(getErrMsg()); 193 dlg.lM01Icon02.setIcon(null); 193 dlg.lM02Icon.setIcon(null); 194 dlg.lM03Icon.setIcon(null); 195 dlg.lM04Icon.setIcon(null); 194 196 195 197 dlg.tfM01Name.setEnabled(true); … … 199 201 dlg.cM01TopMark.setVisible(true); 200 202 dlg.cM01TopMark.setEnabled(false); 203 dlg.cM01Radar.setEnabled(true); 204 dlg.cM01Radar.setVisible(true); 201 205 dlg.cM01Fired.setEnabled(true); 202 206 dlg.cM01Fired.setVisible(true); … … 248 252 if (!image.equals("/images/Cardinal")) { 249 253 image += ".png"; 250 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image))); 254 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 255 256 if (hasRadar()) { 257 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 258 } 251 259 252 260 if (isFired()) { 253 dlg.lM0 1Icon02.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png")));261 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png"))); 254 262 255 263 if (getLightChar() != "") { … … 277 285 278 286 } else 279 dlg.lM01Icon 01.setIcon(null);287 dlg.lM01Icon.setIcon(null); 280 288 } 281 289 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r23013 r23028 23 23 keys = node.getKeys(); 24 24 setNode(node); 25 25 26 26 resetMask(); 27 27 … … 85 85 if (keys.containsKey("seamark:topmark:shape") 86 86 || keys.containsKey("seamark:topmark:colour")) { 87 87 setTopMark(true); 88 88 } 89 89 … … 109 109 110 110 dlg.sM01StatusBar.setText(getErrMsg()); 111 dlg.lM01Icon02.setIcon(null); 111 dlg.lM02Icon.setIcon(null); 112 dlg.lM03Icon.setIcon(null); 113 dlg.lM04Icon.setIcon(null); 112 114 113 115 dlg.tfM01Name.setEnabled(true); … … 115 117 dlg.cM01TopMark.setEnabled(false); 116 118 dlg.cM01TopMark.setVisible(false); 119 dlg.cM01Radar.setEnabled(true); 120 dlg.cM01Radar.setVisible(true); 117 121 dlg.cM01Fired.setEnabled(true); 118 122 … … 140 144 if (!image.equals("/images/Cardinal")) { 141 145 image += ".png"; 142 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image))); 146 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 147 148 if (hasRadar()) { 149 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 150 } 151 143 152 if (isFired()) { 144 dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png"))); 153 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 154 "/images/Light_White_120.png"))); 145 155 if (getLightChar() != "") { 146 156 String c; … … 153 163 } 154 164 } else 155 dlg.lM01Icon 01.setIcon(null);165 dlg.lM01Icon.setIcon(null); 156 166 } 157 167 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23013 r23028 348 348 349 349 dlg.sM01StatusBar.setText(getErrMsg()); 350 dlg.lM01Icon02.setIcon(null); 350 dlg.lM02Icon.setIcon(null); 351 dlg.lM03Icon.setIcon(null); 352 dlg.lM04Icon.setIcon(null); 351 353 352 354 dlg.tfM01Name.setEnabled(true); … … 354 356 dlg.cM01TopMark.setEnabled(true); 355 357 dlg.cM01TopMark.setVisible(true); 358 dlg.cM01Radar.setEnabled(true); 359 dlg.cM01Radar.setVisible(true); 356 360 dlg.cM01Fired.setEnabled(true); 357 361 … … 585 589 } 586 590 image += ".png"; 587 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image))); 588 591 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 592 593 if (hasRadar()) { 594 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 595 } 596 589 597 if (isFired()) 590 598 if (getLightColour().equals("R")) 591 dlg.lM0 1Icon02.setIcon(new ImageIcon(getClass().getResource(599 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 592 600 "/images/Light_Red_120.png"))); 593 601 else 594 dlg.lM0 1Icon02.setIcon(new ImageIcon(getClass().getResource(602 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 595 603 "/images/Light_Green_120.png"))); 596 604 if (getLightChar() != "") { … … 607 615 608 616 } else 609 dlg.lM01Icon 01.setIcon(null);617 dlg.lM01Icon.setIcon(null); 610 618 } 611 619 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r23012 r23028 50 50 51 51 dlg.sM01StatusBar.setText(getErrMsg()); 52 53 dlg.tfM01Name.setEnabled(true); 54 dlg.tfM01Name.setText(getName()); 55 dlg.cM01Fired.setSelected(true); 56 dlg.cM01Fired.setEnabled(false); 57 dlg.cM01TopMark.setVisible(false); 58 dlg.cM01TopMark.setSelected(false); 52 dlg.lM02Icon.setIcon(null); 53 dlg.lM03Icon.setIcon(null); 54 dlg.lM04Icon.setIcon(null); 59 55 60 56 switch (getStyleIndex()) { 61 57 case SeaMark.LIGHT_HOUSE: 62 dlg.lM01Icon 01.setIcon(new ImageIcon(getClass().getResource(58 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 63 59 "/images/Light_House.png"))); 64 60 break; 65 61 66 62 case SeaMark.LIGHT_MAJOR: 67 dlg.lM01Icon 01.setIcon(new ImageIcon(getClass().getResource(63 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 68 64 "/images/Light_Major.png"))); 69 65 break; 70 66 71 67 case SeaMark.LIGHT_MINOR: 72 dlg.lM01Icon 01.setIcon(new ImageIcon(getClass().getResource(68 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource( 73 69 "/images/Light_Minor.png"))); 74 70 break; -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r23013 r23028 106 106 107 107 dlg.sM01StatusBar.setText(getErrMsg()); 108 dlg.lM01Icon02.setIcon(null); 108 dlg.lM02Icon.setIcon(null); 109 dlg.lM03Icon.setIcon(null); 110 dlg.lM04Icon.setIcon(null); 109 111 110 112 dlg.tfM01Name.setEnabled(true); … … 112 114 dlg.cM01TopMark.setEnabled(true); 113 115 dlg.cM01TopMark.setVisible(true); 116 dlg.cM01Radar.setEnabled(true); 117 dlg.cM01Radar.setVisible(true); 114 118 dlg.cM01Fired.setEnabled(true); 115 119 … … 137 141 if (!image.equals("/images/Safe_Water")) { 138 142 image += ".png"; 139 dlg.lM01Icon 01.setIcon(new ImageIcon(getClass().getResource(image)));143 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 140 144 141 145 if (hasTopMark()) 142 146 image += "_Sphere"; 143 147 148 if (hasRadar()) { 149 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 150 } 151 144 152 if (isFired()) { 145 dlg.lM0 1Icon02.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png")));153 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png"))); 146 154 if (getLightChar() != "") { 147 155 String c; … … 155 163 } 156 164 } else 157 dlg.lM01Icon 01.setIcon(null);165 dlg.lM01Icon.setIcon(null); 158 166 } 159 167 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r23013 r23028 143 143 144 144 dlg.sM01StatusBar.setText(getErrMsg()); 145 dlg.lM01Icon02.setIcon(null); 145 dlg.lM02Icon.setIcon(null); 146 dlg.lM03Icon.setIcon(null); 147 dlg.lM04Icon.setIcon(null); 146 148 147 149 dlg.tfM01Name.setEnabled(true); … … 186 188 image += "_CrossY"; 187 189 image += ".png"; 188 dlg.lM01Icon01.setIcon(new ImageIcon(getClass().getResource(image))); 189 190 dlg.lM01Icon.setIcon(new ImageIcon(getClass().getResource(image))); 191 192 if (hasRadar()) { 193 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 194 } 195 190 196 if (isFired()) { 191 dlg.lM0 1Icon02.setIcon(new ImageIcon(getClass().getResource(197 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 192 198 "/images/Light_White_120.png"))); 193 199 if (getLightChar() != "") { … … 202 208 } 203 209 } else 204 dlg.lM01Icon 01.setIcon(null);210 dlg.lM01Icon.setIcon(null); 205 211 } 206 212
Note:
See TracChangeset
for help on using the changeset viewer.