|
Gridarta Editor
|
Abstract Base class for FaceProviders which implements a memory sensitive cache. More...
Inheritance diagram for net.sf.gridarta.model.face.AbstractFaceProvider:
Collaboration diagram for net.sf.gridarta.model.face.AbstractFaceProvider:Public Member Functions | |
| ImageIcon | getImageIconForFacename (@NotNull final String faceName, final long stretch) |
| Get an image from this FaceProvider. More... | |
| void | reload () |
| Reload faces. More... | |
Protected Member Functions | |
| abstract ImageIcon | createImage (@NotNull String faceName, long stretch) |
| Create an image not found in the cache. More... | |
Private Attributes | |
| final Map< String, SoftReference< ImageIcon > > | cache = new HashMap<>() |
| The HashMap to provide the icons from. More... | |
Static Private Attributes | |
| static final Category | LOG = Logger.getLogger(AbstractFaceProvider.class) |
| The Logger for printing log messages. More... | |
Abstract Base class for FaceProviders which implements a memory sensitive cache.
Definition at line 36 of file AbstractFaceProvider.java.
|
abstractprotected |
Create an image not found in the cache.
| faceName | face name to get image for, excluding path and ending |
| stretch | stretch factor |
Referenced by net.sf.gridarta.model.face.AbstractFaceProvider.getImageIconForFacename(), and net.sf.gridarta.model.face.AbstractFaceProvider.reload().
Here is the caller graph for this function:| ImageIcon net.sf.gridarta.model.face.AbstractFaceProvider.getImageIconForFacename | ( | @NotNull final String | faceName, |
| final long | stretch | ||
| ) |
Get an image from this FaceProvider.
| faceName | face name to get image for, excluding path and ending |
Implements net.sf.gridarta.model.face.FaceProvider.
Definition at line 53 of file AbstractFaceProvider.java.
References net.sf.gridarta.model.face.AbstractFaceProvider.createImage().
Here is the call graph for this function:| void net.sf.gridarta.model.face.AbstractFaceProvider.reload | ( | ) |
Reload faces.
This method does not really immediately reload all faces, lazy loading is allowed. But all old face information definitely is flushed, so in case the files on hard disk have changed, they will be freshly loaded from hard disk.
Implements net.sf.gridarta.model.face.FaceProvider.
Definition at line 70 of file AbstractFaceProvider.java.
References net.sf.gridarta.model.face.AbstractFaceProvider.createImage().
Here is the call graph for this function:
|
private |
The HashMap to provide the icons from.
Note: Weak hashing does not differ because the keys are definitely referenced elsewhere.
Definition at line 49 of file AbstractFaceProvider.java.
|
staticprivate |
The Logger for printing log messages.
Definition at line 42 of file AbstractFaceProvider.java.