Last change
on this file since 3734 was 3730, checked in by bastiK, 13 years ago |
improve migration when remotecontrol plugin is removed (set remotecontol.enabled=yes) (see also #5748)
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/plain
|
File size:
635 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 BooleanProperty extends AbstractProperty {
|
---|
7 |
|
---|
8 | protected final boolean defaultValue;
|
---|
9 |
|
---|
10 | public BooleanProperty(String key, boolean defaultValue) {
|
---|
11 | super(key);
|
---|
12 | this.defaultValue = defaultValue;
|
---|
13 | }
|
---|
14 |
|
---|
15 | public boolean get() {
|
---|
16 | return Main.pref.getBoolean(getKey(), isDefaultValue());
|
---|
17 | }
|
---|
18 |
|
---|
19 | public boolean put(boolean value) {
|
---|
20 | return Main.pref.put(getKey(), value);
|
---|
21 | }
|
---|
22 |
|
---|
23 | public boolean isDefaultValue() {
|
---|
24 | return defaultValue;
|
---|
25 | }
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.