 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.settings;
23 import java.util.prefs.PreferenceChangeListener;
24 import java.util.prefs.Preferences;
27 import net.
sf.japi.swing.action.ActionBuilder;
28 import net.
sf.japi.swing.action.ActionBuilderFactory;
29 import org.jetbrains.annotations.NotNull;
41 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
106 final PreferenceChangeListener preferenceChangeListener = evt -> {
111 PREFERENCES.addPreferenceChangeListener(preferenceChangeListener);
166 return PREFERENCES.get(key.getKey(), defaultValue);
void setShowMainToolbar(final boolean selected)
Sets whether the main toolbar should be shown.
boolean SHOW_MAIN_TOOLBAR_DEFAULT
Default value for whether the main window's toolbar is shown.
final String mediaDirectoryDefault
The default value for the media directory.
Base package of all Gridarta classes.
final boolean hasMediaDirectory
Whether a media directory is used.
File getMapsDirectoryDefault()
Returns the default maps directory.
boolean hasImageSet()
Returns whether an image set is used.
File getArchDirectoryDefault()
Returns the default archetype directory.
final String imageSetDefault
The default value for the image set.
File getMediaDirectoryDefault()
Returns the default media directory.
boolean hasMediaDirectory()
Returns whether a media directory is used.
static final ActionBuilder ACTION_BUILDER
The ActionBuilder.
Possible keys for saving values in the EditorSettings.
final String mapsDirectoryDefault
The default value for the maps directory.
final boolean hasImageSet
Whether an image set is used.
static final String SHOW_MAIN_TOOLBAR_KEY
Key for info whether the main window's toolbar is shown.
static boolean getBoolean(@NotNull final ActionBuilder actionBuilder, @NotNull final String key)
Returns the value of a key as a.
Abstract base class for EditorSettings implementations.
static final String PREFERENCES_USER_NAME_DEFAULT
Preferences default value for user name.
String getUserNameDefault()
Returns the default user name.
void fireShowMainToolbarChanged()
Notifies all listeners about a changed visibility of the main toolbar.
Default implementation of EditorSettings.
static String getString(@NotNull final ActionBuilder actionBuilder, @NotNull final String key, @NotNull final String defaultValue)
Returns the value of a key.
static final Preferences PREFERENCES
Preferences.
final String archDirectoryDefault
The default value for the archetype directory.
String getImageSetDefault()
Returns the default image set.
boolean isShowMainToolbar()
Returns whether the main toolbar should be shown.
Utility class for ActionBuilder related functions.
void setKey(@NotNull final EditorSettingsKey key, @NotNull final String value)
Saves a settings value.
DefaultEditorSettings()
Creates a new instance.
String getKey(@NotNull final EditorSettingsKey key, @NotNull final String defaultValue)
Returns a settings value.
Interface used as preferences location.