Changeset 32754 in osm
- Timestamp:
- 2016-08-01T22:47:14+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/gui/FilterPanel.java
r31506 r32754 286 286 if ((i % 20) == 0) { 287 287 288 labelTable.put( newInteger(i),288 labelTable.put(Integer.valueOf(i), 289 289 new JLabel(String.valueOf(i * delta / 100))); 290 290 … … 294 294 try { 295 295 296 slider = new JSlider(JSlider.HORIZONTAL, minValue, maxValue, 297 new Double(initValue).intValue()); 296 slider = new JSlider(JSlider.HORIZONTAL, minValue, maxValue, (int) initValue); 298 297 slider.setMinorTickSpacing(maxValue / 4); 299 298 slider.setName(json.getString("name")); -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/model/FiltersManager.java
r32753 r32754 79 79 clazz = FiltersDownloader.loader.loadClass(filterState 80 80 .getFilterClassName()); 81 filter = (Filter) clazz.newInstance(); 82 83 } catch (InstantiationException | IllegalAccessException e) { 84 e.printStackTrace(); 85 } catch (ClassNotFoundException e) { 81 filter = (Filter) clazz.getConstructor().newInstance(); 82 83 } catch (ReflectiveOperationException | IllegalArgumentException | SecurityException e) { 86 84 e.printStackTrace(); 87 85 } -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/FiltersDownloader.java
r31527 r32754 20 20 import java.net.URLClassLoader; 21 21 import java.net.URLConnection; 22 import java.nio.charset.StandardCharsets; 23 import java.nio.file.Files; 22 24 import java.util.ArrayList; 23 25 import java.util.HashMap; … … 223 225 Main.debug("EXIST FILE? " + file.exists()); 224 226 225 try { 226 FileReader fileReader = new FileReader(file); 227 BufferedReader br = new BufferedReader(fileReader); 228 229 String temp = null; 227 try (BufferedReader br = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) { 228 String temp; 230 229 231 230 while ((temp = br.readLine()) != null) { … … 244 243 } 245 244 } 246 247 br.close();248 245 } catch (IOException e) { 249 246 e.printStackTrace(); … … 289 286 Main.debug("pluginDir and urls map" + file.getAbsoluteFile()); 290 287 291 FileWriter fileWriter = null; 292 BufferedWriter writer = null; 293 try { 294 fileWriter = new FileWriter(file); 295 writer = new BufferedWriter(fileWriter); 296 } catch (IOException e) { 297 e.printStackTrace(); 298 } 299 300 for (JsonObject temp : metaList) { 288 try (BufferedWriter writer = Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8)) { 289 for (JsonObject temp : metaList) { 301 290 JsonArray binaries = temp.getJsonArray("binaries"); 302 291 … … 314 303 } 315 304 } 316 } 317 318 try { 319 writer.close(); 320 fileWriter.close(); 305 } 321 306 } catch (IOException e) { 322 307 e.printStackTrace(); -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/RasterFiltersPreferences.java
r32503 r32754 108 108 } 109 109 110 class FiltersTableModel extends AbstractTableModel { 110 static class FiltersTableModel extends AbstractTableModel { 111 111 112 112 String[] columnNames = { "Filter Name", "Author", "Description", "" };
Note:
See TracChangeset
for help on using the changeset viewer.