Gridarta Editor
DefaultPickmapSettings.java
Go to the documentation of this file.
1
/*
2
* Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3
* Copyright (C) 2000-2023 The Gridarta Developers.
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
package
net.sf.gridarta.model.pickmapsettings;
21
22
import
java.util.prefs.Preferences;
23
import
net
.
sf
.
gridarta
.
MainControl
;
24
import
org.jetbrains.annotations.NotNull;
25
32
public
class
DefaultPickmapSettings
extends
AbstractPickmapSettings
{
33
37
@NotNull
38
private
static
final
String
LOCKED_KEY
=
"pickmapSettings.locked"
;
39
43
@NotNull
44
private
static
final
Preferences
PREFERENCES
= Preferences.userNodeForPackage(
MainControl
.class);
45
46
@Override
47
protected
boolean
loadLocked
() {
48
return
PREFERENCES
.getBoolean(
LOCKED_KEY
,
false
);
49
}
50
51
@Override
52
protected
void
saveLocked
(
final
boolean
locked
) {
53
PREFERENCES
.putBoolean(
LOCKED_KEY
,
locked
);
54
}
55
56
}
net.sf.gridarta.model.pickmapsettings.AbstractPickmapSettings
Abstract base class for PickmapSettings implementations.
Definition:
AbstractPickmapSettings.java:30
net.sf.gridarta
Base package of all Gridarta classes.
net.sf.gridarta.model.pickmapsettings.DefaultPickmapSettings.saveLocked
void saveLocked(final boolean locked)
Saves the locked value.
Definition:
DefaultPickmapSettings.java:52
net.sf
net.sf.gridarta.model.pickmapsettings.DefaultPickmapSettings.PREFERENCES
static final Preferences PREFERENCES
Preferences.
Definition:
DefaultPickmapSettings.java:44
net.sf.gridarta.model.pickmapsettings.DefaultPickmapSettings.LOCKED_KEY
static final String LOCKED_KEY
Key for saving isLocked() state in preferences.
Definition:
DefaultPickmapSettings.java:38
net
net.sf.gridarta.model.pickmapsettings.DefaultPickmapSettings.loadLocked
boolean loadLocked()
Loads the default value for locked.
Definition:
DefaultPickmapSettings.java:47
net.sf.gridarta.model.pickmapsettings.DefaultPickmapSettings
Default PickmapSettings implementation.
Definition:
DefaultPickmapSettings.java:32
net.sf.gridarta.model.pickmapsettings.AbstractPickmapSettings.locked
boolean locked
The immutable state.
Definition:
AbstractPickmapSettings.java:41
net.sf.gridarta.MainControl
Interface used as preferences location.
Definition:
MainControl.java:27
src
model
src
main
java
net
sf
gridarta
model
pickmapsettings
DefaultPickmapSettings.java
Generated on Mon Sep 1 2025 00:35:57 for Gridarta Editor by
1.8.17