Changeset 23034 in osm for applications/editors
- Timestamp:
- 2010-09-06T20:09:52+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r23028 r23034 203 203 204 204 public SmpDialogAction() { 205 super(Messages.getString("SmpDialogAction.4"), "Smp",Messages.getString("SmpDialogAction.0"), Shortcut //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 206 .registerShortcut("tools:Semarks", //$NON-NLS-1$ 207 tr("Tool: {0}", Messages.getString("SmpDialogAction.9")), KeyEvent.VK_S, //$NON-NLS-1$ //$NON-NLS-2$ 208 Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 205 super( 206 Messages.getString("SmpDialogAction.4"), "Smp", Messages.getString("SmpDialogAction.0"), Shortcut //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 207 .registerShortcut( 208 "tools:Semarks", //$NON-NLS-1$ 209 tr("Tool: {0}", Messages.getString("SmpDialogAction.9")), KeyEvent.VK_S, //$NON-NLS-1$ //$NON-NLS-2$ 210 Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 209 211 210 212 dia = this; … … 620 622 lM01Bearing.setText(Messages.getString("SmpDialogAction.133")); //$NON-NLS-1$ 621 623 622 rbM01RegionA = new JRadioButton(Messages.getString("SmpDialogAction.134"), Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$ 623 .equals("A")); //$NON-NLS-1$ 624 rbM01RegionA = new JRadioButton( 625 Messages.getString("SmpDialogAction.134"), Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$ 626 .equals("A")); //$NON-NLS-1$ 624 627 rbM01RegionA.setBounds(new Rectangle(305, 0, 50, 30)); 625 628 rbM01RegionB = new JRadioButton("-B", Main.pref.get("tomsplugin.IALA") //$NON-NLS-1$ //$NON-NLS-2$ … … 642 645 rbM01RegionB.addActionListener(alM01Region); 643 646 644 rbM01Fired1 = new JRadioButton(Messages.getString("SmpDialogAction.140"), true); //$NON-NLS-1$ 647 rbM01Fired1 = new JRadioButton( 648 Messages.getString("SmpDialogAction.140"), true); //$NON-NLS-1$ 645 649 rbM01Fired1.setBounds(new Rectangle(85, 240, 70, 30)); 646 rbM01FiredN = new JRadioButton(Messages.getString("SmpDialogAction.141"), false); //$NON-NLS-1$ 650 rbM01FiredN = new JRadioButton( 651 Messages.getString("SmpDialogAction.141"), false); //$NON-NLS-1$ 647 652 rbM01FiredN.setBounds(new Rectangle(155, 240, 80, 30)); 648 653 bgM01Fired = new ButtonGroup(); … … 737 742 738 743 cbM01TypeOfMark.setBounds(new Rectangle(45, 25, 165, 25)); 739 //cbM01TypeOfMark.setEditable(false);744 // cbM01TypeOfMark.setEditable(false); 740 745 cbM01TypeOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 741 746 cbM01TypeOfMark.setEnabled(true); … … 843 848 cbM01CatOfMark.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 844 849 cbM01CatOfMark.setEnabled(true); 845 850 846 851 cbM01CatOfMark.addActionListener(new ActionListener() { 847 852 public void actionPerformed(ActionEvent e) { … … 958 963 cM01Radar.addActionListener(new ActionListener() { 959 964 public void actionPerformed(ActionEvent e) { 960 buoy.setRadar(cM01Radar.isSelected()); 965 if (cM01Radar.isSelected()) { 966 buoy.setRadar(true); 967 buoy.setRacon(false); 968 cM01Racon.setSelected(false); 969 } else { 970 buoy.setRadar(false); 971 } 961 972 buoy.paintSign(); 962 973 } … … 972 983 cM01Racon.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$ 973 984 cM01Racon.setText(Messages.getString("SmpDialogAction.171")); //$NON-NLS-1$ 985 cM01Racon.addActionListener(new ActionListener() { 986 public void actionPerformed(ActionEvent e) { 987 if (cM01Racon.isSelected()) { 988 buoy.setRacon(true); 989 buoy.setRadar(false); 990 cM01Radar.setSelected(false); 991 } else { 992 buoy.setRacon(false); 993 } 994 buoy.paintSign(); 995 } 996 }); 974 997 } 975 998 return cM01Racon; … … 1355 1378 } 1356 1379 } else { 1357 cM01IconVisible.setIcon(new ImageIcon(getClass().getResource("/images/Auge.png"))); //$NON-NLS-1$ 1380 cM01IconVisible.setIcon(new ImageIcon(getClass().getResource( 1381 "/images/Auge.png"))); //$NON-NLS-1$ 1358 1382 PicRebuild(); 1359 1383 obuoy = null; -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23028 r23034 67 67 public void setRadar(boolean radar) { 68 68 Radar = radar; 69 } 70 71 private boolean Racon = false; 72 73 public boolean hasRacon() { 74 return Racon; 75 } 76 77 public void setRacon(boolean racon) { 78 Racon = racon; 69 79 } 70 80 … … 379 389 dlg.tfM01Racon.setVisible(false); 380 390 dlg.lM01Racon.setVisible(false); 391 setRacon(false); 381 392 dlg.cM01Fog.setSelected(false); 382 393 dlg.cM01Fog.setVisible(false); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r23028 r23034 203 203 dlg.cM01Radar.setEnabled(true); 204 204 dlg.cM01Radar.setVisible(true); 205 dlg.cM01Racon.setEnabled(true); 206 dlg.cM01Racon.setVisible(true); 207 if (hasRacon()) { 208 dlg.cbM01Racon.setEnabled(true); 209 dlg.cbM01Racon.setVisible(true); 210 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Station.png"))); 211 } else { 212 dlg.cbM01Racon.setVisible(false); 213 } 205 214 dlg.cM01Fired.setEnabled(true); 206 215 dlg.cM01Fired.setVisible(true); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r23028 r23034 149 149 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 150 150 } 151 dlg.cM01Racon.setEnabled(true); 152 dlg.cM01Racon.setVisible(true); 153 if (hasRacon()) { 154 dlg.cbM01Racon.setEnabled(true); 155 dlg.cbM01Racon.setVisible(true); 156 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Station.png"))); 157 } else { 158 dlg.cbM01Racon.setVisible(false); 159 } 151 160 152 161 if (isFired()) { -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23028 r23034 358 358 dlg.cM01Radar.setEnabled(true); 359 359 dlg.cM01Radar.setVisible(true); 360 dlg.cM01Racon.setEnabled(true); 361 dlg.cM01Racon.setVisible(true); 362 if (hasRacon()) { 363 dlg.cbM01Racon.setEnabled(true); 364 dlg.cbM01Racon.setVisible(true); 365 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Station.png"))); 366 } else { 367 dlg.cbM01Racon.setVisible(false); 368 } 360 369 dlg.cM01Fired.setEnabled(true); 361 370 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r23028 r23034 149 149 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 150 150 } 151 dlg.cM01Racon.setEnabled(true); 152 dlg.cM01Racon.setVisible(true); 153 if (hasRacon()) { 154 dlg.cbM01Racon.setEnabled(true); 155 dlg.cbM01Racon.setVisible(true); 156 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Station.png"))); 157 } else { 158 dlg.cbM01Racon.setVisible(false); 159 } 151 160 152 161 if (isFired()) { -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r23028 r23034 193 193 dlg.lM03Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Reflector.png"))); 194 194 } 195 dlg.cM01Racon.setEnabled(true); 196 dlg.cM01Racon.setVisible(true); 197 if (hasRacon()) { 198 dlg.cbM01Racon.setEnabled(true); 199 dlg.cbM01Racon.setVisible(true); 200 dlg.lM04Icon.setIcon(new ImageIcon(getClass().getResource("/images/Radar_Station.png"))); 201 } else { 202 dlg.cbM01Racon.setVisible(false); 203 } 195 204 196 205 if (isFired()) {
Note:
See TracChangeset
for help on using the changeset viewer.