22 package com.realtime.crossfire.jxclient.faces;
25 import java.io.IOException;
26 import org.jetbrains.annotations.NotNull;
27 import org.jetbrains.annotations.Nullable;
62 @SuppressWarnings(
"FieldCanBeLocal")
66 public void faceLoaded(@NotNull
final Face face, @NotNull
final FaceImages faceImages) {
67 face.setFaceImages(faceImages);
72 public void faceFailed(@NotNull
final Face face) {
73 face.setFaceImages(unknownFaceImages);
105 if (isUnknownImage != null) {
106 isUnknownImage[0] =
false;
113 if (faceImages != null) {
114 if (isUnknownImage != null) {
115 isUnknownImage[0] =
false;
121 if (isUnknownImage != null) {
122 isUnknownImage[0] =
true;
static FaceImages newFaceImages(@NotNull final ImageIcon originalImageIcon)
Creates a new FaceImages instance from an "original" face; the "scaled" and "magic map" sized images ...
final FaceImages emptyFaceImages
The empty face; returned for face ID 0.
FaceImages getFaceImages()
Returns the images.
FaceImages getFaceImages(final int faceNum, @Nullable final boolean[] isUnknownImage)
Returns the FaceImages information for a face ID.
static final String UNKNOWN_PNG
The resource name of the "unknown" face.
A cache for Face instances.
Utility class for creating FaceImages instances.
Interface for classes implementing a means to load Faces.
final FaceCache faceCache
The FaceCache instance used to look up in-memory faces.
void loadFace(@NotNull Face face)
Request a face.
void addFaceQueueListener(@NotNull FaceQueueListener faceQueueListener)
Adds a FaceQueueListener to be notified about processed faces.
Consists of three ImageIcons representing a Face.
final FaceQueueListener faceQueueListener
The FaceQueueListener registered to faceQueue.
static ImageIcon loadImage(@NotNull final String name)
Loads an image file.
void reset()
Reset the processing: forget about pending faces.
static FaceImages newEmptyFaceImages()
Creates a new FaceImages instance consisting of empty images.
Utility class for loading information from resources.
Interface for listeners interested in FaceQueue events.
Face lookupFace(final int faceNum)
Returns the Face instance for a given face ID.
DefaultFacesManager(@NotNull final FaceCache faceCache, @NotNull final FaceQueue faceQueue)
Creates a new instance.
final FaceQueue faceQueue
The FaceQueue instance used to load faces not present in-memory.
Retrieves Face information by face ID.
void reset()
Forgets about pending faces.
void fireFaceUpdated(@NotNull final Face face)
Notifies all FacesManagerListeners that a face has been updated.
Abstract base class for FacesManager implementations.
final FaceImages unknownFaceImages
The unknown face.