Changeset 33893 in osm for applications/editors/josm/plugins
- Timestamp:
- 2017-11-25T01:42:32+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/rasterfilters
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/rasterfilters/build.xml
r33585 r33893 10 10 11 11 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 12 <property name="plugin.main.version" value="1 2782" />13 <property name="plugin.version" value="1.0. 2"/>12 <property name="plugin.main.version" value="13007" /> 13 <property name="plugin.version" value="1.0.3"/> 14 14 15 15 <property name="plugin.icon" value="images/josm_filters_48.png"/> -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/RasterFiltersPlugin.java
r33585 r33893 44 44 Logging.debug("Loading RasterFiltersPlugin"); 45 45 46 File file = new File(getPluginDir());46 File file = getPluginDirs().getUserDataDirectory(false); 47 47 if (file.mkdir()) { 48 48 … … 58 58 } 59 59 60 FiltersDownloader.setPluginDir( getPluginDir());60 FiltersDownloader.setPluginDir(file); 61 61 } 62 62 -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/FiltersDownloader.java
r33585 r33893 49 49 */ 50 50 public class FiltersDownloader implements ActionListener { 51 private static volatile StringpluginDir;51 private static volatile File pluginDir; 52 52 53 53 public static Set<JsonObject> filtersMeta = new HashSet<>(); 54 54 public static Set<String> filterTitles = new TreeSet<>(); 55 public static Set<URL> binariesLocalUrls = new HashSet<>();55 public static List<URL> binariesLocalUrls = new ArrayList<>(); 56 56 public static ClassLoader loader; 57 57 public static Map<String, String> urlsMap = new HashMap<>(); … … 312 312 } 313 313 314 public static void setPluginDir( Stringdir) {314 public static void setPluginDir(File dir) { 315 315 pluginDir = dir; 316 316 } … … 327 327 328 328 String localFile = null; 329 File plugin = new File(pluginDir);329 File plugin = pluginDir; 330 330 Logging.debug("plugin dir" + plugin.getAbsolutePath()); 331 331 -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/RasterFiltersPreferences.java
r33269 r33893 4 4 import java.awt.GridBagLayout; 5 5 import java.util.List; 6 import java.util.Objects; 6 7 7 8 import javax.json.JsonObject; … … 90 91 String paramName = meta.getString("name"); 91 92 paramName = "rasterfilters." + paramName; 92 Main.pref.put (paramName, temp.isNeedToDownload());93 Main.pref.putBoolean(paramName, temp.isNeedToDownload()); 93 94 } 94 95 … … 244 245 @Override 245 246 public String toString() { 246 return "name: " + getName() + "\nDescription: " + getDescription() 247 + "\nMeta: " + getMeta(); 247 return "name: " + getName() + "\nDescription: " + getDescription() + "\nMeta: " + getMeta(); 248 } 249 250 @Override 251 public int hashCode() { 252 return Objects.hash(name, meta, description); 248 253 } 249 254 -
applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/values/SliderValue.java
r33269 r33893 4 4 * @author Nipel-Crumple 5 5 */ 6 public class SliderValue< Number> implements Value<Number> {6 public class SliderValue<T> implements Value<T> { 7 7 8 8 private String parameterName; 9 private Numbervalue;9 private T value; 10 10 11 public SliderValue(String parameterName, Numbervalue) {11 public SliderValue(String parameterName, T value) { 12 12 this.value = value; 13 13 this.parameterName = parameterName; … … 15 15 16 16 @Override 17 public NumbergetValue() {17 public T getValue() { 18 18 return value; 19 19 } 20 20 21 21 @Override 22 public void setValue( Numbervalue) {22 public void setValue(T value) { 23 23 this.value = value; 24 24 }
Note:
See TracChangeset
for help on using the changeset viewer.