|
Gridarta Editor
|
Abstract base class for AbstractResourcesReaders that read from individual files. More...
Inheritance diagram for net.sf.gridarta.model.resource.AbstractFilesResourcesReader< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.model.resource.AbstractFilesResourcesReader< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| FaceProvider | read (@NotNull final ErrorView errorView, @NotNull final List< G > invObjects) |
Public Member Functions inherited from net.sf.gridarta.model.resource.AbstractResourcesReader< G > | |
| abstract FaceProvider | read ( @NotNull ErrorView errorView, @NotNull List< G > invObjects) |
| Reads the resources. More... | |
Protected Member Functions | |
| AbstractFilesResourcesReader (@NotNull final File archDirectory, @NotNull final ArchetypeSet< G, A, R > archetypeSet, @NotNull final AbstractArchetypeParser< G, A, R, ?> archetypeParser, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjects faceObjects) | |
| Creates a new instance. More... | |
| abstract boolean | isValidEntry (int folderLevel, String name) |
| Returns whether a file name should be processed. More... | |
Protected Member Functions inherited from net.sf.gridarta.model.resource.AbstractResourcesReader< G > | |
| AbstractResourcesReader ( @NotNull final File collectedDirectory, @Nullable final String imageSet, @NotNull final AnimationObjects animationObjects, @NotNull final FaceObjects faceObjects) | |
| Creates a new instance. More... | |
| void | addPNGFace ( @NotNull final String filename, @NotNull final String path, @NotNull final String name, @NotNull final ErrorView errorView, @NotNull final ArchFaceProvider archFaceProvider) |
| Loads a png from the file, convert it to IconImage and attach it to the face list. More... | |
| void | loadAnimationsFromCollect ( @NotNull final ErrorView errorView, @NotNull final Map< String, String > animations) |
| Loads all animations from the big collected animations file. More... | |
Private Member Functions | |
| void | loadAnimationsFromFiles (@NotNull final ErrorViewCollector errorViewCollector, @NotNull final Iterable< Pair< String, File >> animFiles) |
| This method loads animations that are separately defined by looping through all files that were previously collected by AbstractArchetypeParser, String, File, int, String, String, List, ArchFaceProvider, ErrorView, Collection). More... | |
| void | loadArchetypesFromFiles (@NotNull final ErrorViewCollector errorViewCollector, @NotNull final AbstractArchetypeParser< G, A, R, ?> archetypeParser, @NotNull final String path, @NotNull final File f, final int folderLevel, @NotNull final String panelName, @NotNull final String folderName, @NotNull final List< G > invObjects, @NotNull final ArchFaceProvider archFaceProvider, @NotNull final ErrorView errorView, @NotNull final Collection< Pair< String, File >> animFiles) |
| Loads all archetypes and faces by recursing through the. More... | |
| void | parseDefFace (@NotNull final ErrorView errorView, @NotNull final String path, @NotNull final String filename) |
| Loads a .face file. More... | |
Private Attributes | |
| final AnimationObjects | animationObjects |
| The AnimationObjects to use. More... | |
| final File | archDirectory |
| The "arch" directory to read. More... | |
| final AbstractArchetypeParser< G, A, R, ?> | archetypeParser |
| The AbstractArchetypeParser to use. More... | |
| final ArchetypeSet< G, A, R > | archetypeSet |
| The ArchetypeSet to update. More... | |
| final ArchFaceProvider | archFaceProvider |
| The ArchFaceProvider to use. More... | |
Static Private Attributes | |
| static final Category | LOG = Logger.getLogger(AbstractFilesResourcesReader.class) |
| The logger for printing log messages. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from net.sf.gridarta.model.resource.AbstractResourcesReader< G > | |
| static Map< String, String > | loadAnimTree ( @NotNull final URL url) throws IOException |
| Loads animations from a file. More... | |
Abstract base class for AbstractResourcesReaders that read from individual files.
Definition at line 58 of file AbstractFilesResourcesReader.java.
|
protected |
Creates a new instance.
| archDirectory | the "arch" directory to read |
| archetypeSet | the archetype set to update |
| archetypeParser | the archetype parser to use |
| archFaceProvider | the arch face provider to use |
| collectedDirectory | the collected directory |
| imageSet | the active image set or null |
| animationObjects | the animation objects instance |
| faceObjects | the face objects instance |
Definition at line 106 of file AbstractFilesResourcesReader.java.
|
abstractprotected |
Returns whether a file name should be processed.
| folderLevel | the folder level |
| name | the base name of the file name |
Referenced by net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.loadAnimationsFromFiles(), and net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.loadArchetypesFromFiles().
Here is the caller graph for this function:
|
private |
This method loads animations that are separately defined by looping through all files that were previously collected by AbstractArchetypeParser, String, File, int, String, String, List, ArchFaceProvider, ErrorView, Collection).
Do not invoke this method if
wasn't invoked.
| errorViewCollector | the error view collector for reporting errors |
| animFiles | the animation files |
Definition at line 228 of file AbstractFilesResourcesReader.java.
Referenced by net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.read().
Here is the caller graph for this function:
|
private |
Loads all archetypes and faces by recursing through the.
directory tree.
| errorViewCollector | the error view collector for reporting errors |
| archetypeParser | the archetype parser to use |
| path | the base directory relative path of f |
| f | file path where we currently are |
| folderLevel | level of the folder |
| panelName | the panel to add archetypes to |
| folderName | the folder to add archetypes to |
| invObjects | collects all inventory objects |
| archFaceProvider | the arch face provider to add to |
| errorView | the error view to use |
| animFiles | the found animation files |
Definition at line 152 of file AbstractFilesResourcesReader.java.
Referenced by net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.loadArchetypesFromFiles(), and net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.read().
Here is the caller graph for this function:
|
private |
Loads a .face file.
| errorView | the error view for reporting errors |
| path | the base directory relative path of filename |
| filename | filename |
Definition at line 201 of file AbstractFilesResourcesReader.java.
Here is the caller graph for this function:| FaceProvider net.sf.gridarta.model.resource.AbstractFilesResourcesReader< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.read | ( | @NotNull final ErrorView | errorView, |
| @NotNull final List< G > | invObjects | ||
| ) |
Definition at line 117 of file AbstractFilesResourcesReader.java.
|
private |
The AnimationObjects to use.
Definition at line 87 of file AbstractFilesResourcesReader.java.
Referenced by net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.AbstractFilesResourcesReader(), and net.sf.gridarta.var.crossfire.resource.FilesResourcesReader.FilesResourcesReader().
|
private |
The "arch" directory to read.
Definition at line 69 of file AbstractFilesResourcesReader.java.
|
private |
The AbstractArchetypeParser to use.
Definition at line 81 of file AbstractFilesResourcesReader.java.
|
private |
The ArchetypeSet to update.
Definition at line 75 of file AbstractFilesResourcesReader.java.
|
private |
The ArchFaceProvider to use.
Definition at line 93 of file AbstractFilesResourcesReader.java.
Referenced by net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.AbstractFilesResourcesReader(), net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.loadArchetypesFromFiles(), and net.sf.gridarta.model.resource.AbstractFilesResourcesReader< TestGameObject, TestMapArchObject, TestArchetype >.read().
|
staticprivate |
The logger for printing log messages.
Definition at line 63 of file AbstractFilesResourcesReader.java.