Crossfire JXClient, Trunk
R20561
|
Retrieves Face information by face ID. More...
Public Member Functions | |||||
DefaultFacesManager (@NotNull final FaceCache faceCache, @NotNull final FaceQueue faceQueue) throws IOException | |||||
Creates a new instance. More... | |||||
void | reset () | ||||
Forgets about pending faces. More... | |||||
![]() | |||||
void | addFacesManagerListener (@NotNull final FacesManagerListener facesManagerListener) | ||||
Adds a FacesManagerListener to be notified about updated faces.
| |||||
Face | getFace (final int faceNum) | ||||
Returns the Face instance for a given face ID.Requests the face face from the server if necessary.
| |||||
Face | getFace2 (final int faceNum) | ||||
Returns the Face instance for a given face ID.Requests the face from the server if necessary.
| |||||
ImageIcon | getMagicMapImageIcon (final int faceNum, @Nullable final boolean[] isUnknownImage) | ||||
Returns the "magic map" face for a face ID.This function returns immediately even if the face is not loaded. A not loaded face will be updated as soon as loading has finished.
| |||||
ImageIcon | getOriginalImageIcon (final int faceNum, @Nullable final boolean[] isUnknownImage) | ||||
Returns the "original" face for a face ID.This function returns immediately even if the face is not loaded. A not loaded face will be updated as soon as loading has finished.
| |||||
ImageIcon | getScaledImageIcon (final int faceNum, @Nullable final boolean[] isUnknownImage) | ||||
Returns the "scaled" face for a face ID.This function returns immediately even if the face is not loaded. A not loaded face will be updated as soon as loading has finished.
| |||||
void | removeFacesManagerListener (@NotNull final FacesManagerListener facesManagerListener) | ||||
Removes a FacesManagerListener to be notified about updated faces.
| |||||
void | reset () | ||||
Forgets about pending faces. More... | |||||
Protected Member Functions | |
FaceImages | getFaceImages (final int faceNum, @Nullable final boolean[] isUnknownImage) |
Returns the FaceImages information for a face ID. More... | |
![]() | |
AbstractFacesManager (@NotNull final FaceCache faceCache) | |
Creates a new instance. More... | |
void | fireFaceUpdated (@NotNull final Face face) |
Notifies all FacesManagerListeners that a face has been updated. More... | |
abstract FaceImages | getFaceImages (final int faceNum, @Nullable boolean[] isUnknownImage) |
Returns the FaceImages information for a face ID. More... | |
Face | lookupFace (final int faceNum) |
Returns the Face instance for a given face ID. More... | |
Private Attributes | |
final FaceImages | emptyFaceImages |
The empty face; returned for face ID 0. More... | |
final FaceQueue | faceQueue |
The FaceQueue instance used to load faces not present in-memory. More... | |
final FaceQueueListener | faceQueueListener |
The FaceQueueListener registered to faceQueue. More... | |
final FaceImages | unknownFaceImages |
The unknown face. More... | |
Retrieves Face information by face ID.
If a face is not available in-memory, an "unknown" (question mark) face is returned immediately. Asynchronously, the face is loaded from the file cache. If loading fails, the face is requested from the server (and later stored into the file cache). As soon as the face becomes available, all registered FacesManagerListeners are notified.
Definition at line 38 of file DefaultFacesManager.java.
com.realtime.crossfire.jxclient.faces.DefaultFacesManager.DefaultFacesManager | ( | @NotNull final FaceCache | faceCache, |
@NotNull final FaceQueue | faceQueue | ||
) | throws IOException |
Creates a new instance.
faceCache | the face cache instance for storing in-memory faces |
faceQueue | the face queue to use |
IOException | if the unknown image resource cannot be loaded |
Definition at line 85 of file DefaultFacesManager.java.
References com.realtime.crossfire.jxclient.faces.FaceQueue.addFaceQueueListener(), com.realtime.crossfire.jxclient.faces.AbstractFacesManager.faceCache, com.realtime.crossfire.jxclient.faces.DefaultFacesManager.faceQueue, com.realtime.crossfire.jxclient.faces.DefaultFacesManager.faceQueueListener, com.realtime.crossfire.jxclient.util.ResourceUtils.loadImage(), com.realtime.crossfire.jxclient.faces.FaceImagesUtils.newEmptyFaceImages(), com.realtime.crossfire.jxclient.faces.FaceImagesUtils.newFaceImages(), and com.realtime.crossfire.jxclient.util.ResourceUtils.UNKNOWN_PNG.
|
protected |
Returns the FaceImages information for a face ID.
This function returns immediately even if the face is not loaded. A not loaded face will be updated as soon as loading has finished.
faceNum | the face ID |
Definition at line 103 of file DefaultFacesManager.java.
References com.realtime.crossfire.jxclient.faces.DefaultFacesManager.emptyFaceImages, com.realtime.crossfire.jxclient.faces.Face.getFaceImages(), com.realtime.crossfire.jxclient.faces.FaceQueue.loadFace(), com.realtime.crossfire.jxclient.faces.AbstractFacesManager.lookupFace(), and com.realtime.crossfire.jxclient.faces.DefaultFacesManager.unknownFaceImages.
void com.realtime.crossfire.jxclient.faces.DefaultFacesManager.reset | ( | ) |
Forgets about pending faces.
Implements com.realtime.crossfire.jxclient.faces.FacesManager.
Definition at line 131 of file DefaultFacesManager.java.
References com.realtime.crossfire.jxclient.faces.FaceQueue.reset().
|
private |
The empty face; returned for face ID 0.
Definition at line 56 of file DefaultFacesManager.java.
Referenced by com.realtime.crossfire.jxclient.faces.DefaultFacesManager.getFaceImages().
|
private |
The FaceQueue instance used to load faces not present in-memory.
Definition at line 44 of file DefaultFacesManager.java.
Referenced by com.realtime.crossfire.jxclient.faces.DefaultFacesManager.DefaultFacesManager().
|
private |
The FaceQueueListener registered to faceQueue.
Definition at line 63 of file DefaultFacesManager.java.
Referenced by com.realtime.crossfire.jxclient.faces.DefaultFacesManager.DefaultFacesManager().
|
private |
The unknown face.
Definition at line 50 of file DefaultFacesManager.java.
Referenced by com.realtime.crossfire.jxclient.faces.DefaultFacesManager.getFaceImages().