Last change
on this file since 5039 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:
775 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.preferences;
|
---|
3 |
|
---|
4 | import java.util.Collection;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.Main;
|
---|
7 |
|
---|
8 | public class CollectionProperty extends AbstractProperty<Collection<String>> {
|
---|
9 | protected final Collection<String> defaultValue;
|
---|
10 |
|
---|
11 | public CollectionProperty(String key, Collection<String> defaultValue) {
|
---|
12 | super(key);
|
---|
13 | this.defaultValue = defaultValue;
|
---|
14 | }
|
---|
15 |
|
---|
16 | public Collection<String> get() {
|
---|
17 | return Main.pref.getCollection(getKey(), getDefaultValue());
|
---|
18 | }
|
---|
19 |
|
---|
20 | public boolean put(Collection<String> value) {
|
---|
21 | return Main.pref.putCollection(getKey(), value);
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override
|
---|
25 | public Collection<String> getDefaultValue() {
|
---|
26 | return defaultValue;
|
---|
27 | }
|
---|
28 |
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.