Ignore:
Timestamp:
2010-08-24T10:32:50+02:00 (11 years ago)
Author:
bastiK
Message:

added gui preference for autosave; fixed #5359 - Button to delete autosaved data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/preferences/IntegerProperty.java

    r3451 r3461  
    2222    }
    2323
     24    /**
     25     * parses and saves an integer value
     26     * @param value the value to be parsed
     27     * @return true - preference value has changed
     28     *         false - parsing failed or preference value has not changed
     29     */
     30    public boolean parseAndPut(String value) {
     31        Integer intVal;
     32        try {
     33            intVal = Integer.parseInt(value);
     34        } catch (NumberFormatException ex) {
     35            return false;
     36        }
     37        return put(intVal);
     38    }
     39
    2440    public String getKey() {
    2541        return key;
Note: See TracChangeset for help on using the changeset viewer.