Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.faces.AbstractFacesManager Class Referenceabstract

Abstract base class for FacesManager implementations. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.faces.AbstractFacesManager:
+ Collaboration diagram for com.realtime.crossfire.jxclient.faces.AbstractFacesManager:

Public Member Functions

void addFacesManagerListener (@NotNull final FacesManagerListener facesManagerListener)
 Adds a FacesManagerListener to be notified about updated faces.
Parameters
facesManagerListenerthe listener
More...
 
Face getFace (final int faceNum)
 Returns the Face instance for a given face ID.Requests the face face from the server if necessary.

Parameters
faceNumthe face ID to request
Returns
the face
More...
 
Face getFace2 (final int faceNum)
 Returns the Face instance for a given face ID.Requests the face from the server if necessary.

Parameters
faceNumthe face ID to request
Returns
the face or
null
for the empty face
More...
 
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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face, or the "unknown" face if the face is not loaded
More...
 
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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face, or the "unknown" face if the face is not loaded
More...
 
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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face, or the "unknown" face if the face is not loaded
More...
 
void removeFacesManagerListener (@NotNull final FacesManagerListener facesManagerListener)
 Removes a FacesManagerListener to be notified about updated faces.
Parameters
facesManagerListenerthe listener
More...
 
void reset ()
 Forgets about pending faces. More...
 

Protected Member Functions

 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 FaceCache faceCache
 The FaceCache instance used to look up in-memory faces. More...
 
final EventListenerList2< FacesManagerListenerfacesManagerListeners = new EventListenerList2<>()
 The FacesManagerListeners to notify about changed faces. More...
 

Detailed Description

Abstract base class for FacesManager implementations.

Author
Andreas Kirschbaum

Definition at line 33 of file AbstractFacesManager.java.

Constructor & Destructor Documentation

◆ AbstractFacesManager()

com.realtime.crossfire.jxclient.faces.AbstractFacesManager.AbstractFacesManager ( @NotNull final FaceCache  faceCache)
protected

Creates a new instance.

Parameters
faceCachethe face cache instance for storing in-memory faces

Definition at line 52 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.AbstractFacesManager.faceCache.

Member Function Documentation

◆ addFacesManagerListener()

void com.realtime.crossfire.jxclient.faces.AbstractFacesManager.addFacesManagerListener ( @NotNull final FacesManagerListener  facesManagerListener)

Adds a FacesManagerListener to be notified about updated faces.

Parameters
facesManagerListenerthe listener

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 60 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.add().

+ Here is the call graph for this function:

◆ fireFaceUpdated()

void com.realtime.crossfire.jxclient.faces.AbstractFacesManager.fireFaceUpdated ( @NotNull final Face  face)
protected

Notifies all FacesManagerListeners that a face has been updated.

Parameters
facethe face

Definition at line 77 of file AbstractFacesManager.java.

◆ getFace()

Face com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFace ( final int  faceNum)

Returns the Face instance for a given face ID.Requests the face face from the server if necessary.

Parameters
faceNumthe face ID to request
Returns
the face

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 115 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.getFace(), and com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFaceImages().

+ Here is the call graph for this function:

◆ getFace2()

Face com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFace2 ( final int  faceNum)

Returns the Face instance for a given face ID.Requests the face from the server if necessary.

Parameters
faceNumthe face ID to request
Returns
the face or
null
for the empty face

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 149 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.getFace(), and com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFaceImages().

+ Here is the call graph for this function:

◆ getFaceImages()

abstract FaceImages com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFaceImages ( final int  faceNum,
@Nullable boolean []  isUnknownImage 
)
abstractprotected

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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face images information

Referenced by com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFace(), com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFace2(), com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getMagicMapImageIcon(), com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getOriginalImageIcon(), and com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getScaledImageIcon().

+ Here is the caller graph for this function:

◆ getMagicMapImageIcon()

ImageIcon com.realtime.crossfire.jxclient.faces.AbstractFacesManager.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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face, or the "unknown" face if the face is not loaded

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 106 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFaceImages(), and com.realtime.crossfire.jxclient.faces.FaceImages.getMagicMapImageIcon().

+ Here is the call graph for this function:

◆ getOriginalImageIcon()

ImageIcon com.realtime.crossfire.jxclient.faces.AbstractFacesManager.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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face, or the "unknown" face if the face is not loaded

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 88 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFaceImages(), and com.realtime.crossfire.jxclient.faces.FaceImages.getOriginalImageIcon().

+ Here is the call graph for this function:

◆ getScaledImageIcon()

ImageIcon com.realtime.crossfire.jxclient.faces.AbstractFacesManager.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.

Parameters
faceNumthe face ID
isUnknownImagereturns whether the returned face is the "unknown" face; ignored if
null
Returns
the face, or the "unknown" face if the face is not loaded

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 97 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.AbstractFacesManager.getFaceImages(), and com.realtime.crossfire.jxclient.faces.FaceImages.getScaledImageIcon().

+ Here is the call graph for this function:

◆ lookupFace()

Face com.realtime.crossfire.jxclient.faces.AbstractFacesManager.lookupFace ( final int  faceNum)
protected

Returns the Face instance for a given face ID.

Other than getFace(int), does not request the face face from the server if unknown.

Parameters
faceNumthe face ID to look up
Returns
the face

Definition at line 140 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.getFace().

Referenced by com.realtime.crossfire.jxclient.faces.TestFacesManager.getFaceImages(), and com.realtime.crossfire.jxclient.faces.DefaultFacesManager.getFaceImages().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeFacesManagerListener()

void com.realtime.crossfire.jxclient.faces.AbstractFacesManager.removeFacesManagerListener ( @NotNull final FacesManagerListener  facesManagerListener)

Removes a FacesManagerListener to be notified about updated faces.

Parameters
facesManagerListenerthe listener

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 68 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.remove().

+ Here is the call graph for this function:

◆ reset()

void com.realtime.crossfire.jxclient.faces.AbstractFacesManager.reset ( )

Forgets about pending faces.

Implements com.realtime.crossfire.jxclient.faces.FacesManager.

Definition at line 162 of file AbstractFacesManager.java.

References com.realtime.crossfire.jxclient.faces.FaceCache.reset().

+ Here is the call graph for this function:

Member Data Documentation

◆ faceCache

final FaceCache com.realtime.crossfire.jxclient.faces.AbstractFacesManager.faceCache
private

◆ facesManagerListeners

final EventListenerList2<FacesManagerListener> com.realtime.crossfire.jxclient.faces.AbstractFacesManager.facesManagerListeners = new EventListenerList2<>()
private

The FacesManagerListeners to notify about changed faces.

Definition at line 40 of file AbstractFacesManager.java.


The documentation for this class was generated from the following file: