Crossfire JXClient, Trunk
R20561
|
Abstract base class for FacesManager implementations. More...
Public Member Functions | |||||
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 | |
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< FacesManagerListener > | facesManagerListeners = new EventListenerList2<>() |
The FacesManagerListeners to notify about changed faces. More... | |
Abstract base class for FacesManager implementations.
Definition at line 33 of file AbstractFacesManager.java.
|
protected |
Creates a new instance.
faceCache | the face cache instance for storing in-memory faces |
Definition at line 52 of file AbstractFacesManager.java.
References com.realtime.crossfire.jxclient.faces.AbstractFacesManager.faceCache.
void com.realtime.crossfire.jxclient.faces.AbstractFacesManager.addFacesManagerListener | ( | @NotNull final FacesManagerListener | facesManagerListener | ) |
Adds a FacesManagerListener to be notified about updated faces.
facesManagerListener | the 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().
|
protected |
Notifies all FacesManagerListeners that a face has been updated.
face | the face |
Definition at line 77 of file AbstractFacesManager.java.
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.
faceNum | the face ID to request |
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().
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.
faceNum | the face ID to request |
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().
|
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.
faceNum | the face ID |
isUnknownImage | returns whether the returned face is the "unknown" face; ignored if null |
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().
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.
faceNum | the face ID |
isUnknownImage | returns whether the returned face is the "unknown" face; ignored if null |
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().
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.
faceNum | the face ID |
isUnknownImage | returns whether the returned face is the "unknown" face; ignored if null |
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().
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.
faceNum | the face ID |
isUnknownImage | returns whether the returned face is the "unknown" face; ignored if null |
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().
|
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.
faceNum | the face ID to look up |
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().
void com.realtime.crossfire.jxclient.faces.AbstractFacesManager.removeFacesManagerListener | ( | @NotNull final FacesManagerListener | facesManagerListener | ) |
Removes a FacesManagerListener to be notified about updated faces.
facesManagerListener | the 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().
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().
|
private |
The FaceCache instance used to look up in-memory faces.
Definition at line 46 of file AbstractFacesManager.java.
Referenced by com.realtime.crossfire.jxclient.faces.AbstractFacesManager.AbstractFacesManager(), and com.realtime.crossfire.jxclient.faces.DefaultFacesManager.DefaultFacesManager().
|
private |
The FacesManagerListeners to notify about changed faces.
Definition at line 40 of file AbstractFacesManager.java.