|
Gridarta Editor
|
Saves or restores MapMenu contents to Preferences. More...
Collaboration diagram for net.sf.gridarta.gui.mapmenu.MapMenuLoader:Classes | |
| class | Result |
| Result value consisting of a MapMenuEntry and its location (directory). More... | |
| enum | Type |
| Preferences values for entries. More... | |
Public Member Functions | |
| Result | loadEntry (final int index) throws IOException |
| Loads an entry from preferences. More... | |
| int | loadNumEntries () |
| Returns the number of entries present in the preferences. More... | |
| MapMenuLoader (@NotNull final String key, @NotNull final PathManager pathManager) | |
| Creates a new instance. More... | |
| void | removeEntry (final int index) |
| Removes an entry. More... | |
| void | saveEntry (final int index, @NotNull final String title, @NotNull final String filename, @NotNull final String directory, @NotNull final Type type) |
| Saves an entry to preferences. More... | |
| void | saveNumEntries (final int num) |
| Sets the number of entries present in the preferences. More... | |
Private Attributes | |
| final String | key |
| The preferences key prefix. More... | |
| final PathManager | pathManager |
| The global path manager instance. More... | |
| final Preferences | preferences = Preferences.userNodeForPackage(MainControl.class) |
| The Preferences. More... | |
Static Private Attributes | |
| static final Category | LOG = Logger.getLogger(MapMenuLoader.class) |
| The Logger for printing log messages. More... | |
Saves or restores MapMenu contents to Preferences.
Definition at line 35 of file MapMenuLoader.java.
| net.sf.gridarta.gui.mapmenu.MapMenuLoader.MapMenuLoader | ( | @NotNull final String | key, |
| @NotNull final PathManager | pathManager | ||
| ) |
Creates a new instance.
| key | the preferences key prefix |
| pathManager | the global path manager instance |
Definition at line 84 of file MapMenuLoader.java.
References net.sf.gridarta.gui.mapmenu.MapMenuLoader.key, and net.sf.gridarta.gui.mapmenu.MapMenuLoader.pathManager.
| Result net.sf.gridarta.gui.mapmenu.MapMenuLoader.loadEntry | ( | final int | index | ) | throws IOException |
Loads an entry from preferences.
| index | the preference index |
| IOException | if the entry cannot be loaded |
Definition at line 123 of file MapMenuLoader.java.
References net.sf.gridarta.model.io.PathManager.getMapFile(), and net.sf.gridarta.gui.mapmenu.MapMenuLoader.Type.MAP.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenu.load(), and net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test1().
Here is the call graph for this function:
Here is the caller graph for this function:| int net.sf.gridarta.gui.mapmenu.MapMenuLoader.loadNumEntries | ( | ) |
Returns the number of entries present in the preferences.
Definition at line 97 of file MapMenuLoader.java.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenu.load(), net.sf.gridarta.gui.mapmenu.MapMenu.saveAlways(), and net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test1().
Here is the caller graph for this function:| void net.sf.gridarta.gui.mapmenu.MapMenuLoader.removeEntry | ( | final int | index | ) |
Removes an entry.
| index | the preference index |
Definition at line 209 of file MapMenuLoader.java.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenu.saveAlways(), and net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test1().
Here is the caller graph for this function:| void net.sf.gridarta.gui.mapmenu.MapMenuLoader.saveEntry | ( | final int | index, |
| @NotNull final String | title, | ||
| @NotNull final String | filename, | ||
| @NotNull final String | directory, | ||
| @NotNull final Type | type | ||
| ) |
Saves an entry to preferences.
| index | the preference index |
| title | the entry's title |
| filename | the entry's file name |
| directory | the entry's directory |
| type | the entry's type |
Definition at line 186 of file MapMenuLoader.java.
References net.sf.gridarta.gui.mapmenu.MapMenuLoader.Type.MAP.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenu.saveEntries(), and net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test1().
Here is the caller graph for this function:| void net.sf.gridarta.gui.mapmenu.MapMenuLoader.saveNumEntries | ( | final int | num | ) |
Sets the number of entries present in the preferences.
| num | the number of entries |
Definition at line 109 of file MapMenuLoader.java.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenu.saveAlways(), and net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test1().
Here is the caller graph for this function:
|
private |
The preferences key prefix.
Definition at line 71 of file MapMenuLoader.java.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenuLoader.MapMenuLoader().
|
staticprivate |
The Logger for printing log messages.
Definition at line 59 of file MapMenuLoader.java.
|
private |
The global path manager instance.
Definition at line 77 of file MapMenuLoader.java.
Referenced by net.sf.gridarta.gui.mapmenu.MapMenuLoader.MapMenuLoader().
|
private |
The Preferences.
Definition at line 65 of file MapMenuLoader.java.