source: josm/trunk/src/org/openstreetmap/josm/data/preferences/StringProperty.java@ 3246

Last change on this file since 3246 was 3246, checked in by jttt, 14 years ago

Add simple wrapper for preferences, add projection changed event (will be used later to replace CachedLatLon)

  • Property svn:mime-type set to text/plain
File size: 542 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.preferences;
3
4import org.openstreetmap.josm.Main;
5
6public class StringProperty {
7
8 private final String key;
9 private final String defaultValue;
10
11 public StringProperty(String key, String defaultValue) {
12 this.key = key;
13 this.defaultValue = defaultValue;
14 }
15
16 public String get() {
17 return Main.pref.get(key, defaultValue);
18 }
19
20 public boolean put(String value) {
21 return Main.pref.put(key, value);
22 }
23
24}
Note: See TracBrowser for help on using the repository browser.