|
Gridarta Editor
|
Implementation of FaceProvider which reads images from the collected PNG archive. More...
Inheritance diagram for net.sf.gridarta.model.face.CollectedFaceProvider:
Collaboration diagram for net.sf.gridarta.model.face.CollectedFaceProvider:Public Member Functions | |
| void | addInfo (@NotNull final String faceName, final int pos, final int size) |
| Report position and size of a face for loading it later. More... | |
| CollectedFaceProvider (final File file) throws FileNotFoundException | |
| Creates a new instance. More... | |
| CollectedFaceProvider (final String fileName) throws FileNotFoundException | |
| Creates a new instance. More... | |
Public Member Functions inherited from net.sf.gridarta.model.face.AbstractFaceProvider | |
| ImageIcon | getImageIconForFacename (@NotNull final String faceName, final long stretch) |
| Get an image from this FaceProvider. More... | |
| void | reload () |
| Reload faces. More... | |
Protected Member Functions | |
| ImageIcon | createImage (@NotNull final String faceName, final long stretch) |
Protected Member Functions inherited from net.sf.gridarta.model.face.AbstractFaceProvider | |
| abstract ImageIcon | createImage (@NotNull String faceName, long stretch) |
| Create an image not found in the cache. More... | |
Private Attributes | |
| final RandomAccessFile | file |
| The file to read from. More... | |
| final Map< String, Long > | positions = new HashMap<>() |
| The icon position and size are stored here. More... | |
Implementation of FaceProvider which reads images from the collected PNG archive.
Construction of this class should succeed even in case the face file is unavailable.
Move parsing of the face files to this class, so the faces can be easily reloaded while the application is running.
Definition at line 42 of file CollectedFaceProvider.java.
| net.sf.gridarta.model.face.CollectedFaceProvider.CollectedFaceProvider | ( | final File | file | ) | throws FileNotFoundException |
Creates a new instance.
| file | file where icons are found |
| FileNotFoundException | in case the File wasn't found |
Definition at line 61 of file CollectedFaceProvider.java.
| net.sf.gridarta.model.face.CollectedFaceProvider.CollectedFaceProvider | ( | final String | fileName | ) | throws FileNotFoundException |
Creates a new instance.
| fileName | name of file where icons are found |
| FileNotFoundException | in case the File with name fileName |
Definition at line 71 of file CollectedFaceProvider.java.
| void net.sf.gridarta.model.face.CollectedFaceProvider.addInfo | ( | @NotNull final String | faceName, |
| final int | pos, | ||
| final int | size | ||
| ) |
Report position and size of a face for loading it later.
| faceName | face name to get image for, excluding path and ending |
| pos | position of image |
| size | Size of image |
Definition at line 81 of file CollectedFaceProvider.java.
Referenced by net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection().
Here is the caller graph for this function:
|
protected |
Definition at line 87 of file CollectedFaceProvider.java.
|
private |
The file to read from.
Definition at line 54 of file CollectedFaceProvider.java.
|
private |
The icon position and size are stored here.
The value is a long with the high-int being the position and the low-int being the size.
Definition at line 48 of file CollectedFaceProvider.java.