Last change
on this file since 4282 was 4282, checked in by jttt, 13 years ago |
Allow to specify custom pattern for marker text labels
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/plain
|
File size:
646 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.preferences;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.Main;
|
---|
5 |
|
---|
6 | public class StringProperty extends AbstractProperty<String> {
|
---|
7 |
|
---|
8 | protected final String defaultValue;
|
---|
9 |
|
---|
10 | public StringProperty(String key, String defaultValue) {
|
---|
11 | super(key);
|
---|
12 | this.defaultValue = defaultValue;
|
---|
13 | }
|
---|
14 |
|
---|
15 | public String get() {
|
---|
16 | return Main.pref.get(getKey(), getDefaultValue());
|
---|
17 | }
|
---|
18 |
|
---|
19 | public boolean put(String value) {
|
---|
20 | return Main.pref.put(getKey(), value);
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override
|
---|
24 | public String getDefaultValue() {
|
---|
25 | return defaultValue;
|
---|
26 | }
|
---|
27 |
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.