|
Gridarta Editor
|
Collaboration diagram for net.sf.gridarta.gui.spells.SpellsUtils:Public Member Functions | |
| void | importSpells (@NotNull final File dir, @NotNull final Component parent) |
| Opens a file chooser to select the spell list file, then import spells. More... | |
| SpellsUtils (@NotNull final String spellFile) | |
| Creates a new instance. More... | |
Private Member Functions | |
| int | importSpells (final File spellFile, @NotNull final File dir) |
| Reads all spells from a Crossfire or Daimonin spell list file and write an alphabetical list into "spells.def". More... | |
Static Private Member Functions | |
| static void | readUntil (@NotNull final Reader stream, @NotNull final CharSequence tag, @Nullable final CharSequence abort) throws IOException |
| Reads characters from the BufferedReader stream till 'tag' is found. More... | |
| static String | readUntil (@NotNull final Reader stream, @NotNull final CharSequence tag) throws IOException |
| Reads characters from the BufferedReader stream till 'tag' is found. More... | |
Private Attributes | |
| final String | spellFile |
| The spell file name. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| Action Builder. More... | |
| static final Category | LOG = Logger.getLogger(SpellsUtils.class) |
| The Logger for printing log messages. More... | |
| static final long | READ_MAX = 10000L |
| Maximum number of characters to read in readUntil. More... | |
| static final FileFilter | SPELL_LIST_H_FILE_FILTER = new FilenameFileFilter(true, "spellist.h", "spellist.h") |
| File filter for filtering spellist.h files. More... | |
Definition at line 53 of file SpellsUtils.java.
| net.sf.gridarta.gui.spells.SpellsUtils.SpellsUtils | ( | @NotNull final String | spellFile | ) |
Creates a new instance.
| spellFile | the spell file name |
Definition at line 88 of file SpellsUtils.java.
References net.sf.gridarta.gui.spells.SpellsUtils.spellFile.
| void net.sf.gridarta.gui.spells.SpellsUtils.importSpells | ( | @NotNull final File | dir, |
| @NotNull final Component | parent | ||
| ) |
Opens a file chooser to select the spell list file, then import spells.
| dir | the directory to use |
| parent | the parent component for dialog boxes |
Definition at line 97 of file SpellsUtils.java.
References net.sf.gridarta.utils.FileChooserUtils.setCurrentDirectory().
Referenced by net.sf.gridarta.action.CollectSpellsAction.collectSpells().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Reads all spells from a Crossfire or Daimonin spell list file and write an alphabetical list into "spells.def".
| spellFile | spell file to read |
| dir | the base directory to load the spells file from |
Definition at line 131 of file SpellsUtils.java.
References net.sf.gridarta.gui.spells.SpellsUtils.readUntil().
Here is the call graph for this function:
|
staticprivate |
Reads characters from the BufferedReader stream till 'tag' is found.
If found, the method returns with stream pointing right after the appearance of 'tag'.
| stream | ascii input stream to read from |
| tag | stop reading at the string 'tag' |
| abort | throw EOFException |
| IOException | an I/O-error occurred while reading the file |
| EOFException | the end of file was reached, or the 'abort' string has been encountered |
Definition at line 220 of file SpellsUtils.java.
Referenced by net.sf.gridarta.gui.spells.SpellsUtils.importSpells().
Here is the caller graph for this function:
|
staticprivate |
Reads characters from the BufferedReader stream till 'tag' is found.
Similar to readUntil(), except that the read String is returned. 'tag' is not included in the returned String.
| stream | ascii input stream to read from |
| tag | stop reading at the string 'tag' |
| IOException | an I/O-error occurred while reading the file |
| EOFException | the end of file was reached |
Definition at line 274 of file SpellsUtils.java.
References net.sf.gridarta.gui.spells.SpellsUtils.READ_MAX.
|
staticprivate |
Action Builder.
Definition at line 70 of file SpellsUtils.java.
|
staticprivate |
The Logger for printing log messages.
Definition at line 64 of file SpellsUtils.java.
|
staticprivate |
Maximum number of characters to read in readUntil.
Definition at line 58 of file SpellsUtils.java.
Referenced by net.sf.gridarta.gui.spells.SpellsUtils.readUntil().
|
staticprivate |
File filter for filtering spellist.h files.
Definition at line 76 of file SpellsUtils.java.
|
private |
The spell file name.
Definition at line 82 of file SpellsUtils.java.
Referenced by net.sf.gridarta.gui.spells.SpellsUtils.SpellsUtils().