Changeset 30738 in osm for applications/editors/josm/plugins/proj4j
- Timestamp:
- 2014-10-19T01:27:04+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/proj4j/src/org/openstreetmap/josm/plugins/proj4j/Proj4JProjectionChoice.java
r30737 r30738 64 64 sorter = new TableRowSorter<>(model); 65 65 } 66 66 67 67 @Override 68 68 public String getId() { … … 74 74 return new Proj4JPanel(actionListener); 75 75 } 76 76 77 77 protected class Proj4JPanel extends JPanel { 78 78 79 79 public Proj4JPanel(ActionListener actionListener) { 80 80 GridBagConstraints c = new GridBagConstraints(); … … 94 94 new DocumentListener() { 95 95 96 @Override 96 97 public void insertUpdate(DocumentEvent e) { 97 98 newFilter(); 98 99 } 99 100 101 @Override 100 102 public void removeUpdate(DocumentEvent e) { 101 103 newFilter(); 102 104 } 103 105 106 @Override 104 107 public void changedUpdate(DocumentEvent e) { 105 108 newFilter(); … … 213 216 } 214 217 218 @Override 215 219 public void valueChanged(ListSelectionEvent e) { 216 220 updateSelectedCode(); … … 258 262 public CRSTableModel() throws java.io.IOException { 259 263 // Read projection information from file, (authority, code, description) 260 InputStream inStr = getClass().getResourceAsStream("/resources/projections.txt"); 261 BufferedReader fh = new BufferedReader(new InputStreamReader(inStr)); 262 263 String s; 264 while ((s = fh.readLine()) != null) { 265 String f[] = s.split("\t"); 266 if (f.length >= 3) { 267 crsList.add(new CRSEntry(f[0], f[1], f[2])); 264 try ( 265 InputStream inStr = getClass().getResourceAsStream("/resources/projections.txt"); 266 BufferedReader fh = new BufferedReader(new InputStreamReader(inStr)); 267 ) { 268 String s; 269 while ((s = fh.readLine()) != null) { 270 String f[] = s.split("\t"); 271 if (f.length >= 3) { 272 crsList.add(new CRSEntry(f[0], f[1], f[2])); 273 } 268 274 } 269 275 } 270 fh.close();271 276 } 272 277
Note:
See TracChangeset
for help on using the changeset viewer.