public abstract class AbstractFacesManager extends java.lang.Object implements FacesManager
FacesManager
implementations.Modifier | Constructor and Description |
---|---|
protected |
AbstractFacesManager(@NotNull FaceCache faceCache)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addFacesManagerListener(@NotNull FacesManagerListener facesManagerListener)
Adds a
FacesManagerListener to be notified about updated faces. |
protected void |
fireFaceUpdated(@NotNull Face face)
Notifies all
FacesManagerListeners that a
face has been updated. |
@NotNull Face |
getFace(int faceNum)
Returns the
Face instance for a given face ID. |
@Nullable Face |
getFace2(int faceNum)
Returns the
Face instance for a given face ID. |
protected abstract @NotNull FaceImages |
getFaceImages(int faceNum,
@Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
Returns the
FaceImages information for a face ID. |
@NotNull javax.swing.ImageIcon |
getMagicMapImageIcon(int faceNum,
@Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
Returns the "magic map" face for a face ID.
|
@NotNull javax.swing.ImageIcon |
getOriginalImageIcon(int faceNum,
@Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
Returns the "original" face for a face ID.
|
@NotNull javax.swing.ImageIcon |
getScaledImageIcon(int faceNum,
@Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
Returns the "scaled" face for a face ID.
|
protected @NotNull Face |
lookupFace(int faceNum)
Returns the
Face instance for a given face ID. |
void |
removeFacesManagerListener(@NotNull FacesManagerListener facesManagerListener)
Removes a
FacesManagerListener to be notified about updated
faces. |
void |
reset()
Forgets about pending faces.
|
protected AbstractFacesManager(@NotNull @NotNull FaceCache faceCache)
faceCache
- the face cache instance for storing in-memory facespublic void addFacesManagerListener(@NotNull @NotNull FacesManagerListener facesManagerListener)
FacesManager
FacesManagerListener
to be notified about updated faces.addFacesManagerListener
in interface FacesManager
facesManagerListener
- the listenerpublic void removeFacesManagerListener(@NotNull @NotNull FacesManagerListener facesManagerListener)
FacesManager
FacesManagerListener
to be notified about updated
faces.removeFacesManagerListener
in interface FacesManager
facesManagerListener
- the listenerprotected void fireFaceUpdated(@NotNull @NotNull Face face)
FacesManagerListeners
that a
face has been updated.face
- the face@NotNull public @NotNull javax.swing.ImageIcon getOriginalImageIcon(int faceNum, @Nullable @Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
FacesManager
getOriginalImageIcon
in interface FacesManager
faceNum
- the face IDreturnIsUnknownImage
- returns whether the returned face is the
"unknown" face; ignored if null
@NotNull public @NotNull javax.swing.ImageIcon getScaledImageIcon(int faceNum, @Nullable @Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
FacesManager
getScaledImageIcon
in interface FacesManager
faceNum
- the face IDreturnIsUnknownImage
- returns whether the returned face is the
"unknown" face; ignored if null
@NotNull public @NotNull javax.swing.ImageIcon getMagicMapImageIcon(int faceNum, @Nullable @Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
FacesManager
getMagicMapImageIcon
in interface FacesManager
faceNum
- the face IDreturnIsUnknownImage
- returns whether the returned face is the
"unknown" face; ignored if null
@NotNull public @NotNull Face getFace(int faceNum)
FacesManager
Face
instance for a given face ID. Requests the face
from the server if necessary.getFace
in interface FacesManager
faceNum
- the face ID to request@NotNull protected abstract @NotNull FaceImages getFaceImages(int faceNum, @Nullable @Nullable java.util.concurrent.atomic.AtomicBoolean returnIsUnknownImage)
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 IDreturnIsUnknownImage
- returns whether the returned face is the
"unknown" face; ignored if null
@NotNull protected @NotNull Face lookupFace(int faceNum)
Face
instance for a given face ID. Other than
getFace(int)
, does not request the face face from the server if
unknown.faceNum
- the face ID to look up@Nullable public @Nullable Face getFace2(int faceNum)
FacesManager
Face
instance for a given face ID. Requests the face
from the server if necessary.getFace2
in interface FacesManager
faceNum
- the face ID to requestnull
for the empty facepublic void reset()
FacesManager
reset
in interface FacesManager