Changeset 33893 in osm


Ignore:
Timestamp:
2017-11-25T01:42:32+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 13007

Location:
applications/editors/josm/plugins/rasterfilters
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/rasterfilters/build.xml

    r33585 r33893  
    1010       
    1111        <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    12         <property name="plugin.main.version" value="12782" />
    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"/>
    1414
    1515    <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  
    4444        Logging.debug("Loading RasterFiltersPlugin");
    4545
    46         File file = new File(getPluginDir());
     46        File file = getPluginDirs().getUserDataDirectory(false);
    4747        if (file.mkdir()) {
    4848
     
    5858        }
    5959
    60         FiltersDownloader.setPluginDir(getPluginDir());
     60        FiltersDownloader.setPluginDir(file);
    6161    }
    6262
  • applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/FiltersDownloader.java

    r33585 r33893  
    4949 */
    5050public class FiltersDownloader implements ActionListener {
    51     private static volatile String pluginDir;
     51    private static volatile File pluginDir;
    5252
    5353    public static Set<JsonObject> filtersMeta = new HashSet<>();
    5454    public static Set<String> filterTitles = new TreeSet<>();
    55     public static Set<URL> binariesLocalUrls = new HashSet<>();
     55    public static List<URL> binariesLocalUrls = new ArrayList<>();
    5656    public static ClassLoader loader;
    5757    public static Map<String, String> urlsMap = new HashMap<>();
     
    312312    }
    313313
    314     public static void setPluginDir(String dir) {
     314    public static void setPluginDir(File dir) {
    315315        pluginDir = dir;
    316316    }
     
    327327
    328328        String localFile = null;
    329         File plugin = new File(pluginDir);
     329        File plugin = pluginDir;
    330330        Logging.debug("plugin dir" + plugin.getAbsolutePath());
    331331
  • applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/preferences/RasterFiltersPreferences.java

    r33269 r33893  
    44import java.awt.GridBagLayout;
    55import java.util.List;
     6import java.util.Objects;
    67
    78import javax.json.JsonObject;
     
    9091            String paramName = meta.getString("name");
    9192            paramName = "rasterfilters." + paramName;
    92             Main.pref.put(paramName, temp.isNeedToDownload());
     93            Main.pref.putBoolean(paramName, temp.isNeedToDownload());
    9394        }
    9495
     
    244245    @Override
    245246    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);
    248253    }
    249254
  • applications/editors/josm/plugins/rasterfilters/src/org/openstreetmap/josm/plugins/rasterfilters/values/SliderValue.java

    r33269 r33893  
    44 * @author Nipel-Crumple
    55 */
    6 public class SliderValue<Number> implements Value<Number> {
     6public class SliderValue<T> implements Value<T> {
    77
    88    private String parameterName;
    9     private Number value;
     9    private T value;
    1010
    11     public SliderValue(String parameterName, Number value) {
     11    public SliderValue(String parameterName, T value) {
    1212        this.value = value;
    1313        this.parameterName = parameterName;
     
    1515
    1616    @Override
    17     public Number getValue() {
     17    public T getValue() {
    1818        return value;
    1919    }
    2020
    2121    @Override
    22     public void setValue(Number value) {
     22    public void setValue(T value) {
    2323        this.value = value;
    2424    }
Note: See TracChangeset for help on using the changeset viewer.