Changeset 24616 in osm for applications/editors/josm/plugins/smed/plugs
- Timestamp:
- 2010-12-06T16:13:22+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src
- Files:
-
- 8 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r24613 r24616 63 63 private JRadioButton hazButton = null; 64 64 private JRadioButton specButton = null; 65 private JRadioButton lightButton = null; 65 private JRadioButton lightsButton = null; 66 private ButtonGroup miscButtons = null; 67 private JRadioButton topButton = null; 68 private JRadioButton fogButton = null; 69 private JRadioButton radarButton = null; 70 private JRadioButton litButton = null; 66 71 private PanelChan panelChan = null; 67 72 private PanelHaz panelHaz = null; … … 121 126 oseamPanel.add(getHazButton(), null); 122 127 oseamPanel.add(getSpecButton(), null); 123 oseamPanel.add(getLightButton(), null); 128 oseamPanel.add(getLightsButton(), null); 124 129 oseamPanel.add(panelChan, null); 125 130 oseamPanel.add(panelHaz, null); … … 129 134 typeButtons.add(hazButton); 130 135 typeButtons.add(specButton); 131 typeButtons.add(lightButton); 136 typeButtons.add(lightsButton); 132 137 ActionListener alType = new ActionListener() { 133 138 public void actionPerformed(java.awt.event.ActionEvent e) { … … 153 158 panelSpec.setVisible(false); 154 159 } 155 lightButton.setEnabled(!lightButton.isSelected()); 156 //System.out.println("pressed: " + chanButton.isSelected() + " " + hazButton.isSelected() + " " + specButton.isSelected() + " " + lightButton.isSelected()); 160 lightsButton.setEnabled(!lightsButton.isSelected()); 157 161 } 158 162 }; … … 160 164 hazButton.addActionListener(alType); 161 165 specButton.addActionListener(alType); 162 lightButton.addActionListener(alType); 166 lightsButton.addActionListener(alType); 167 168 oseamPanel.add(getTopButton(), null); 169 oseamPanel.add(getFogButton(), null); 170 oseamPanel.add(getRadarButton(), null); 171 oseamPanel.add(getLitButton(), null); 172 miscButtons = new ButtonGroup(); 173 miscButtons.add(topButton); 174 miscButtons.add(fogButton); 175 miscButtons.add(radarButton); 176 miscButtons.add(litButton); 177 ActionListener alMisc = new ActionListener() { 178 public void actionPerformed(java.awt.event.ActionEvent e) { 179 topButton.setEnabled(!topButton.isSelected()); 180 fogButton.setEnabled(!fogButton.isSelected()); 181 radarButton.setEnabled(!radarButton.isSelected()); 182 litButton.setEnabled(!litButton.isSelected()); 183 } 184 }; 185 topButton.addActionListener(alMisc); 186 fogButton.addActionListener(alMisc); 187 radarButton.addActionListener(alMisc); 188 litButton.addActionListener(alMisc); 163 189 164 190 nameLabel = new JLabel(); … … 207 233 } 208 234 209 private JRadioButton getLightButton() { 210 if (lightButton == null) { 211 lightButton = new JRadioButton(new ImageIcon(getClass().getResource( 235 private JRadioButton getLightsButton() { 236 if (lightsButton == null) { 237 lightsButton = new JRadioButton(new ImageIcon(getClass().getResource( 212 238 Messages.getString("LightsButton")))); 213 lightButton.setBounds(new Rectangle(0, 120, 105, 40)); 214 lightButton.setToolTipText(Messages.getString("LightsTip")); 215 } 216 return lightButton; 239 lightsButton.setBounds(new Rectangle(0, 120, 105, 40)); 240 lightsButton.setToolTipText(Messages.getString("LightsTip")); 241 } 242 return lightsButton; 243 } 244 245 private JRadioButton getTopButton() { 246 if (topButton == null) { 247 topButton = new JRadioButton(new ImageIcon(getClass().getResource( 248 "/images/TopButton.png"))); 249 topButton.setBounds(new Rectangle(0, 165, 40, 40)); 250 topButton.setToolTipText(tr("Topmarks")); 251 } 252 return topButton; 253 } 254 255 private JRadioButton getFogButton() { 256 if (fogButton == null) { 257 fogButton = new JRadioButton(new ImageIcon(getClass().getResource( 258 "/images/FogButton.png"))); 259 fogButton.setBounds(new Rectangle(0, 200, 40, 40)); 260 fogButton.setToolTipText(tr("Fog signals")); 261 } 262 return fogButton; 263 } 264 265 private JRadioButton getRadarButton() { 266 if (radarButton == null) { 267 radarButton = new JRadioButton(new ImageIcon(getClass().getResource( 268 "/images/RadarButton.png"))); 269 radarButton.setBounds(new Rectangle(0, 235, 40, 40)); 270 radarButton.setToolTipText(tr("Radar")); 271 } 272 return radarButton; 273 } 274 275 private JRadioButton getLitButton() { 276 if (litButton == null) { 277 litButton = new JRadioButton(new ImageIcon(getClass().getResource( 278 "/images/LitButton.png"))); 279 litButton.setBounds(new Rectangle(0, 270, 40, 40)); 280 litButton.setToolTipText(tr("Lights")); 281 } 282 return litButton; 217 283 } 218 284
Note:
See TracChangeset
for help on using the changeset viewer.