|
Crossfire JXClient, Trunk
R20561
|
A disk based cache for image files. More...
Inheritance diagram for com.realtime.crossfire.jxclient.faces.FileCache:
Collaboration diagram for com.realtime.crossfire.jxclient.faces.FileCache:Public Member Functions | |||||
| FileCache (@NotNull final File cacheDir) | |||||
| Creates a new instance. More... | |||||
| ImageIcon | load (@NotNull final Face face) | ||||
Retrieves an image from the cache.
| |||||
| void | save (@NotNull final Face face, @NotNull final ImageIcon imageIcon) | ||||
Stores an ImageIcon into the cache.
| |||||
| void | save (@NotNull final String faceName, final int faceChecksum, @NotNull final Icon imageIcon) | ||||
| Stores an ImageIcon into the cache. More... | |||||
Private Member Functions | |
| File | getImageFileName (@NotNull final String faceName, final int faceChecksum) |
| Calculates a hashed image name to be used as a file name. More... | |
| ImageIcon | load (@NotNull final String faceName, final int faceChecksum) |
| Retrieves an image from the cache. More... | |
Private Attributes | |
| final File | cacheDir |
| The directory where the images are saved. More... | |
A disk based cache for image files.
Definition at line 38 of file FileCache.java.
| com.realtime.crossfire.jxclient.faces.FileCache.FileCache | ( | @NotNull final File | cacheDir | ) |
Creates a new instance.
| cacheDir | the directory where the images are saved |
Definition at line 50 of file FileCache.java.
References com.realtime.crossfire.jxclient.faces.FileCache.cacheDir.
|
private |
Calculates a hashed image name to be used as a file name.
| faceName | the image name to hash |
| faceChecksum | the checksum to hash |
Definition at line 119 of file FileCache.java.
References com.realtime.crossfire.jxclient.util.FilenameUtils.quoteName().
Referenced by com.realtime.crossfire.jxclient.faces.FileCache.load(), and com.realtime.crossfire.jxclient.faces.FileCache.save().
Here is the call graph for this function:
Here is the caller graph for this function:| ImageIcon com.realtime.crossfire.jxclient.faces.FileCache.load | ( | @NotNull final Face | face | ) |
Retrieves an image from the cache.
| face | the face to retrieve |
Implements com.realtime.crossfire.jxclient.faces.ImageCache.
Definition at line 62 of file FileCache.java.
|
private |
Retrieves an image from the cache.
| faceName | the image name to retrieve |
| faceChecksum | the checksum to retrieve |
Definition at line 74 of file FileCache.java.
References com.realtime.crossfire.jxclient.faces.FileCache.getImageFileName().
Here is the call graph for this function:| void com.realtime.crossfire.jxclient.faces.FileCache.save | ( | @NotNull final Face | face, |
| @NotNull final ImageIcon | imageIcon | ||
| ) |
Stores an ImageIcon into the cache.
| face | the face to save |
| imageIcon | the image icon to store |
Implements com.realtime.crossfire.jxclient.faces.ImageCache.
Definition at line 98 of file FileCache.java.
Referenced by com.realtime.crossfire.jxclient.faces.ImageScale2x.main().
Here is the caller graph for this function:| void com.realtime.crossfire.jxclient.faces.FileCache.save | ( | @NotNull final String | faceName, |
| final int | faceChecksum, | ||
| @NotNull final Icon | imageIcon | ||
| ) |
Stores an ImageIcon into the cache.
| faceName | the image name to save |
| faceChecksum | the checksum to save |
| imageIcon | the image icon to store |
Definition at line 108 of file FileCache.java.
References com.realtime.crossfire.jxclient.faces.FileCache.getImageFileName(), and com.realtime.crossfire.jxclient.util.Images.saveImageIcon().
Here is the call graph for this function:
|
private |
The directory where the images are saved.
Definition at line 44 of file FileCache.java.
Referenced by com.realtime.crossfire.jxclient.faces.FileCache.FileCache().