Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.faces.FacesManager Interface Reference

Maintains a mapping of face numbers to face data. More...

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

Public Member Functions

void addFacesManagerListener (@NotNull FacesManagerListener facesManagerListener)
 Adds a FacesManagerListener to be notified about updated faces. More...
 
Face getFace (int faceNum)
 Returns the Face instance for a given face ID. More...
 
Face getFace2 (int faceNum)
 Returns the Face instance for a given face ID. More...
 
ImageIcon getMagicMapImageIcon (int faceNum, @Nullable boolean[] isUnknownImage)
 Returns the "magic map" face for a face ID. More...
 
ImageIcon getOriginalImageIcon (int faceNum, @Nullable boolean[] isUnknownImage)
 Returns the "original" face for a face ID. More...
 
ImageIcon getScaledImageIcon (int faceNum, @Nullable boolean[] isUnknownImage)
 Returns the "scaled" face for a face ID. More...
 
void removeFacesManagerListener (@NotNull FacesManagerListener facesManagerListener)
 Removes a FacesManagerListener to be notified about updated faces. More...
 
void reset ()
 Forgets about pending faces. More...
 

Detailed Description

Maintains a mapping of face numbers to face data.

Face data can be queried for original size, scaled data for map views, or reduced size for minimap views. Listeners can be attached to be notified when face data has been loaded.

Author
Andreas Kirschbaum

Definition at line 37 of file FacesManager.java.

Member Function Documentation

◆ addFacesManagerListener()

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

◆ getFace()

◆ getFace2()

Face com.realtime.crossfire.jxclient.faces.FacesManager.getFace2 ( 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

Implemented in com.realtime.crossfire.jxclient.faces.AbstractFacesManager.

Referenced by com.realtime.crossfire.jxclient.map.MapUpdaterState.mapFace().

+ Here is the caller graph for this function:

◆ getMagicMapImageIcon()

ImageIcon com.realtime.crossfire.jxclient.faces.FacesManager.getMagicMapImageIcon ( int  faceNum,
@Nullable 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

Implemented in com.realtime.crossfire.jxclient.faces.AbstractFacesManager.

Referenced by com.realtime.crossfire.jxclient.faces.MagicMapFacesProvider.getImageIcon().

+ Here is the caller graph for this function:

◆ getOriginalImageIcon()

ImageIcon com.realtime.crossfire.jxclient.faces.FacesManager.getOriginalImageIcon ( int  faceNum,
@Nullable boolean []  isUnknownImage 
)

◆ getScaledImageIcon()

ImageIcon com.realtime.crossfire.jxclient.faces.FacesManager.getScaledImageIcon ( int  faceNum,
@Nullable 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

Implemented in com.realtime.crossfire.jxclient.faces.AbstractFacesManager.

Referenced by com.realtime.crossfire.jxclient.faces.ScaledFacesProvider.getImageIcon().

+ Here is the caller graph for this function:

◆ removeFacesManagerListener()

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

◆ reset()

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

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