Crossfire JXClient, Trunk
|
Public Member Functions | |
FileCache (@NotNull final Path cacheDir) | |
ImageIcon | load (@NotNull final Face face) |
void | save (@NotNull final Face face, @NotNull final ImageIcon imageIcon) |
void | save (@NotNull final String faceName, final int faceChecksum, @NotNull final Icon imageIcon) |
Private Member Functions | |
Path | getImageFileName (@NotNull final String faceName, final int faceChecksum) |
ImageIcon | load (@NotNull final String faceName, final int faceChecksum) |
Private Attributes | |
final Path | cacheDir |
A disk based cache for image files.
Definition at line 40 of file FileCache.java.
com.realtime.crossfire.jxclient.faces.FileCache.FileCache | ( | @NotNull final Path | cacheDir | ) |
Creates a new instance.
cacheDir | the directory where the images are saved |
Definition at line 52 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 122 of file FileCache.java.
References com.realtime.crossfire.jxclient.faces.FileCache.cacheDir, and com.realtime.crossfire.jxclient.util.FilenameUtils.quoteName().
Referenced by com.realtime.crossfire.jxclient.faces.FileCache.load(), and com.realtime.crossfire.jxclient.faces.FileCache.save().
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 63 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 75 of file FileCache.java.
References com.realtime.crossfire.jxclient.faces.FileCache.getImageFileName().
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 101 of file FileCache.java.
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 111 of file FileCache.java.
References com.realtime.crossfire.jxclient.faces.FileCache.getImageFileName(), and com.realtime.crossfire.jxclient.util.Images.saveImageIcon().
|
private |
The directory where the images are saved.
Definition at line 46 of file FileCache.java.
Referenced by com.realtime.crossfire.jxclient.faces.FileCache.FileCache(), and com.realtime.crossfire.jxclient.faces.FileCache.getImageFileName().