Gridarta Editor
EditorSettings.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2015 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.settings;
21 
22 import java.io.File;
23 import org.jetbrains.annotations.NotNull;
24 
29 public interface EditorSettings {
30 
34  boolean SHOW_MAIN_TOOLBAR_DEFAULT = true;
35 
40  void addEditorSettingsListener(@NotNull EditorSettingsListener listener);
41 
47 
52  @NotNull
54 
59  @NotNull
61 
66  boolean hasMediaDirectory();
67 
72  @NotNull
74 
79  boolean hasImageSet();
80 
85  @NotNull
86  String getImageSetDefault();
87 
92  boolean isShowMainToolbar();
93 
98  void setShowMainToolbar(boolean selected);
99 
104  @NotNull
105  String getUserNameDefault();
106 
113  String getKey(@NotNull EditorSettingsKey key, @NotNull String defaultValue);
114 
120  void setKey(@NotNull EditorSettingsKey key, @NotNull String value);
121 
122 }
String getImageSetDefault()
Returns the default image set.
File getMediaDirectoryDefault()
Returns the default media directory.
File getMapsDirectoryDefault()
Returns the default maps directory.
Interface for listeners interested in EditorSettings events.
boolean SHOW_MAIN_TOOLBAR_DEFAULT
Default value for whether the main window's toolbar is shown.
void addEditorSettingsListener(@NotNull EditorSettingsListener listener)
Adds a EditorSettingsListener to be notified of changes.
boolean hasMediaDirectory()
Returns whether a media directory is used.
boolean hasImageSet()
Returns whether an image set is used.
String getUserNameDefault()
Returns the default user name.
boolean isShowMainToolbar()
Returns whether the main toolbar should be shown.
Possible keys for saving values in the EditorSettings.
void setKey(@NotNull EditorSettingsKey key, @NotNull String value)
Saves a settings value.
String getKey(@NotNull EditorSettingsKey key, @NotNull String defaultValue)
Returns a settings value.
File getArchDirectoryDefault()
Returns the default archetype directory.
Settings that apply to the editor.
void removeEditorSettingsListener(@NotNull EditorSettingsListener listener)
Removes a EditorSettingsListener to be notified of changes.
void setShowMainToolbar(boolean selected)
Sets whether the main toolbar should be shown.