Changeset 3345 in osm for applications/editors/josm/plugins/surveyor/src/at
- Timestamp:
- 2007-06-25T19:14:27+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java
r3097 r3345 12 12 import java.io.Reader; 13 13 import java.util.ArrayList; 14 import java.util.HashSet; 14 15 import java.util.List; 16 import java.util.Set; 15 17 16 18 import javax.swing.JComponent; 17 19 import javax.swing.JFrame; 18 20 import javax.swing.JLabel; 21 import javax.swing.JOptionPane; 19 22 import javax.swing.JPanel; 20 23 … … 38 41 private JLabel streetLabel; 39 42 private JPanel buttonPanel; 43 private Set<String>hotKeys; 40 44 41 45 public SurveyorComponent() { 42 46 super(); 47 hotKeys = new HashSet<String>(); 43 48 setLayout(new BorderLayout()); 44 49 streetLabel = new JLabel("Way: "); … … 97 102 98 103 public void addButton(ButtonDescription description) { 99 if(rows == 0 && columns == 0) { 100 setColumns("4"); 104 if(hotKeys.contains(description.getHotkey())) { 105 // <FIXXME date="23.06.2007" author="cdaller"> 106 // TODO if i18n is done 107 //JOptionPane.showMessageDialog(Main.parent, tr("Duplicate hotkey for button '{0}' - button will be ignored!",description.getLabel())); 108 JOptionPane.showMessageDialog(Main.parent, "Duplicate hotkey for button '" + description.getLabel() 109 + "' - button will be ignored!"); 110 // </FIXXME> 111 } else { 112 if(rows == 0 && columns == 0) { 113 setColumns("4"); 114 } 115 description.setGpsDataSource(this); 116 buttonPanel.add(description.createComponent()); 117 hotKeys.add(description.getHotkey()); 101 118 } 102 description.setGpsDataSource(this);103 buttonPanel.add(description.createComponent());104 119 } 105 120 … … 165 180 if("gpsdata".equals(evt.getPropertyName())) { 166 181 gpsData = (LiveGpsData) evt.getNewValue(); 167 streetLabel.setText("Way: " + gpsData.getWay ());182 streetLabel.setText("Way: " + gpsData.getWayInfo()); 168 183 } 169 184
Note:
See TracChangeset
for help on using the changeset viewer.