Changeset 23072 in osm for applications/editors/josm
- Timestamp:
- 2010-09-08T10:42:51+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r23058 r23072 116 116 public JRadioButton rbM01RegionA = null; 117 117 public JRadioButton rbM01RegionB = null; 118 public JLabel lM01Icon = null; 119 public JLabel lM02Icon = null; 120 public JLabel lM03Icon = null; 121 public JLabel lM04Icon = null; 122 public JLabel lM05Icon = null; 118 public JLabel lM01Icon = null; // Shape 119 public JLabel lM02Icon = null; // Light 120 public JLabel lM03Icon = null; // Reflector 121 public JLabel lM04Icon = null; // Racon 122 public JLabel lM05Icon = null; // Fog 123 123 public JLabel lM01FireMark = null; 124 124 private JLabel lM01TypeOfMark = null; … … 172 172 173 173 public boolean paintlock = false; 174 174 175 175 public JMenuItem getSmpItem() { 176 176 return SmpItem; … … 1023 1023 public void actionPerformed(ActionEvent e) { 1024 1024 int rac = cbM01Racon.getSelectedIndex(); 1025 buoy.setRa typ(rac);1025 buoy.setRaType(rac); 1026 1026 buoy.paintSign(); 1027 1027 } … … 1037 1037 tfM01Racon.addFocusListener(new FocusAdapter() { 1038 1038 public void focusLost(FocusEvent e) { 1039 buoy.set Name(tfM01Racon.getText());1039 buoy.setRaconGroup(tfM01Racon.getText()); 1040 1040 } 1041 1041 }); … … 1065 1065 cbM01Fog.setBounds(new Rectangle(100, 220, 70, 20)); 1066 1066 cbM01Fog.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 1067 cbM01Fog.removeAllItems(); 1068 cbM01Fog.addItem("Not Set"); 1069 cbM01Fog.addItem("Horn"); 1070 cbM01Fog.addItem("Siren"); 1071 cbM01Fog.addItem("Dia"); 1072 cbM01Fog.addItem("Bell"); 1073 cbM01Fog.addItem("Whis"); 1074 cbM01Fog.addItem("Gong"); 1075 cbM01Fog.addItem("Explos"); 1067 1076 cbM01Fog.addActionListener(new ActionListener() { 1068 1077 public void actionPerformed(ActionEvent e) { 1069 int fog = cbM01Fog.getSelectedIndex(); 1078 if (cbM01Fog.getSelectedIndex() > 0) 1079 buoy.setFogSound((String) cbM01Fog.getSelectedItem()); 1080 else 1081 buoy.setFogSound(""); 1082 buoy.paintSign(); 1070 1083 } 1071 1084 }); … … 1080 1093 tfM01FogGroup.addFocusListener(new FocusAdapter() { 1081 1094 public void focusLost(FocusEvent e) { 1082 buoy.set Name(tfM01FogGroup.getText());1095 buoy.setFogGroup(tfM01FogGroup.getText()); 1083 1096 } 1084 1097 }); … … 1093 1106 tfM01FogPeriod.addFocusListener(new FocusAdapter() { 1094 1107 public void focusLost(FocusEvent e) { 1095 buoy.set Name(tfM01FogPeriod.getText());1108 buoy.setFogPeriod(tfM01FogPeriod.getText()); 1096 1109 } 1097 1110 }); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23060 r23072 77 77 } 78 78 79 private int Ratyp = 0; 80 81 public int getRatyp() { 82 return Ratyp; 83 } 84 85 public void setRatyp(int typ) { 86 Ratyp = typ; 87 } 88 79 private int RaType = 0; 80 81 public int getRaType() { 82 return RaType; 83 } 84 85 public void setRaType(int type) { 86 RaType = type; 87 } 88 89 private String RaconGroup = ""; 90 91 public String getRaconGroup() { 92 return RaconGroup; 93 } 94 95 public void setRaconGroup(String raconGroup) { 96 RaconGroup = raconGroup; 97 } 98 89 99 private boolean Fog = false; 90 100 … … 95 105 public void setFog(boolean fog) { 96 106 Fog = fog; 107 } 108 109 private String FogSound = ""; 110 111 public String getFogSound() { 112 return FogSound; 113 } 114 115 public void setFogSound(String fogSound) { 116 FogSound = fogSound; 117 } 118 119 private String FogGroup = ""; 120 121 public String getFogGroup() { 122 return FogGroup; 123 } 124 125 public void setFogGroup(String fogGroup) { 126 FogSound = fogGroup; 127 } 128 129 private String FogPeriod = ""; 130 131 public String getFogPeriod() { 132 return FogPeriod; 133 } 134 135 public void setFogPeriod(String fogPeriod) { 136 FogPeriod = fogPeriod; 97 137 } 98 138 … … 254 294 public void paintSign() { 255 295 256 if (dlg.paintlock) return; 296 if (dlg.paintlock) 297 return; 257 298 dlg.lM01Icon.setIcon(null); 258 299 dlg.lM02Icon.setIcon(null); … … 260 301 dlg.lM04Icon.setIcon(null); 261 302 dlg.lM05Icon.setIcon(null); 262 303 263 304 dlg.rbM01RegionA.setSelected(!getRegion()); 264 305 dlg.rbM01RegionB.setSelected(getRegion()); … … 270 311 271 312 dlg.tfM01Name.setText(getName()); 272 313 273 314 if (hasRadar()) { 274 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 275 } 276 315 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource( 316 "/images/Radar_Reflector.png"))); 317 } 318 277 319 if (hasRacon()) { 278 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Station.png"))); 320 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource( 321 "/images/Radar_Station.png"))); 279 322 dlg.cbM01Racon.setVisible(true); 280 if (getRa typ() == RATYP_RACON) {323 if (getRaType() == RATYP_RACON) { 281 324 dlg.lM01Racon.setVisible(true); 282 325 dlg.tfM01Racon.setVisible(true); … … 291 334 dlg.tfM01Racon.setVisible(false); 292 335 } 293 336 294 337 if (hasFog()) { 295 dlg.lM05Icon.setIcon(new ImageIcon(getClass().getResource("/images/Fog_Signal.png"))); 296 } 297 338 dlg.lM05Icon.setIcon(new ImageIcon(getClass().getResource( 339 "/images/Fog_Signal.png"))); 340 dlg.cbM01Fog.setVisible(true); 341 if (getFogSound().equals("")) { 342 dlg.lM01FogGroup.setVisible(false); 343 dlg.tfM01FogGroup.setVisible(false); 344 dlg.lM01FogPeriod.setVisible(false); 345 dlg.tfM01FogPeriod.setVisible(false); 346 } else { 347 dlg.lM01FogGroup.setVisible(true); 348 dlg.tfM01FogGroup.setVisible(true); 349 dlg.lM01FogPeriod.setVisible(true); 350 dlg.tfM01FogPeriod.setVisible(true); 351 } 352 } else { 353 dlg.cbM01Fog.setVisible(false); 354 dlg.lM01FogGroup.setVisible(false); 355 dlg.tfM01FogGroup.setVisible(false); 356 dlg.lM01FogPeriod.setVisible(false); 357 dlg.tfM01FogPeriod.setVisible(false); 358 } 359 298 360 if (isFired()) { 299 361 String lp, c; … … 303 365 String col = getLightColour(); 304 366 if (col.equals("W")) 305 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource("/images/Light_White_120.png"))); 367 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 368 "/images/Light_White_120.png"))); 306 369 else if (col.equals("R")) 307 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Red_120.png"))); 370 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 371 "/images/Light_Red_120.png"))); 308 372 else if (col.equals("G")) 309 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Green_120.png"))); 373 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 374 "/images/Light_Green_120.png"))); 310 375 else 311 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource("/images/Light_Magenta_120.png"))); 312 376 dlg.lM02Icon.setIcon(new ImageIcon(getClass().getResource( 377 "/images/Light_Magenta_120.png"))); 378 313 379 dlg.cbM01Kennung.setEnabled(true); 314 380 … … 437 503 dlg.lM01Racon.setVisible(false); 438 504 setRacon(false); 439 setRa typ(0);505 setRaType(0); 440 506 dlg.cM01Fog.setSelected(false); 441 507 dlg.cM01Fog.setVisible(false); 442 dlg.cbM01Fog.removeAllItems();443 508 dlg.cbM01Fog.setVisible(false); 509 setFogSound(""); 444 510 dlg.tfM01FogGroup.setText(""); 445 511 dlg.tfM01FogGroup.setVisible(false);
Note:
See TracChangeset
for help on using the changeset viewer.