Interface FacesManager
-
- All Known Implementing Classes:
AbstractFacesManager,DefaultFacesManager
public interface FacesManagerMaintains a mapping of face numbers to face data. Face data can be queried fororiginal size,scaled data for map views, orreduced size for minimap views.Listeners can be attachedto be notified when face data has been loaded.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddFacesManagerListener(@NotNull FacesManagerListener facesManagerListener)Adds aFacesManagerListenerto be notified about updated faces.@NotNull FacegetFace(int faceNum)Returns theFaceinstance for a given face ID.@Nullable FacegetFace2(int faceNum)Returns theFaceinstance for a given face ID.@NotNull javax.swing.ImageIcongetMagicMapImageIcon(int faceNum, boolean @Nullable [] isUnknownImage)Returns the "magic map" face for a face ID.@NotNull javax.swing.ImageIcongetOriginalImageIcon(int faceNum, boolean @Nullable [] isUnknownImage)Returns the "original" face for a face ID.@NotNull javax.swing.ImageIcongetScaledImageIcon(int faceNum, boolean @Nullable [] isUnknownImage)Returns the "scaled" face for a face ID.voidremoveFacesManagerListener(@NotNull FacesManagerListener facesManagerListener)Removes aFacesManagerListenerto be notified about updated faces.voidreset()Forgets about pending faces.
-
-
-
Method Detail
-
getOriginalImageIcon
@NotNull @NotNull javax.swing.ImageIcon getOriginalImageIcon(int faceNum, boolean @Nullable [] 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:
faceNum- the face IDisUnknownImage- returns whether the returned face is the "unknown" face; ignored ifnull- Returns:
- the face, or the "unknown" face if the face is not loaded
-
getScaledImageIcon
@NotNull @NotNull javax.swing.ImageIcon getScaledImageIcon(int faceNum, boolean @Nullable [] 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:
faceNum- the face IDisUnknownImage- returns whether the returned face is the "unknown" face; ignored ifnull- Returns:
- the face, or the "unknown" face if the face is not loaded
-
getMagicMapImageIcon
@NotNull @NotNull javax.swing.ImageIcon getMagicMapImageIcon(int faceNum, boolean @Nullable [] 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:
faceNum- the face IDisUnknownImage- returns whether the returned face is the "unknown" face; ignored ifnull- Returns:
- the face, or the "unknown" face if the face is not loaded
-
getFace
@NotNull @NotNull Face getFace(int faceNum)
Returns theFaceinstance for a given face ID. Requests the face face from the server if necessary.- Parameters:
faceNum- the face ID to request- Returns:
- the face
-
getFace2
@Nullable @Nullable Face getFace2(int faceNum)
Returns theFaceinstance for a given face ID. Requests the face from the server if necessary.- Parameters:
faceNum- the face ID to request- Returns:
- the face or
nullfor the empty face
-
addFacesManagerListener
void addFacesManagerListener(@NotNull @NotNull FacesManagerListener facesManagerListener)Adds aFacesManagerListenerto be notified about updated faces.- Parameters:
facesManagerListener- the listener
-
removeFacesManagerListener
void removeFacesManagerListener(@NotNull @NotNull FacesManagerListener facesManagerListener)Removes aFacesManagerListenerto be notified about updated faces.- Parameters:
facesManagerListener- the listener
-
reset
void reset()
Forgets about pending faces.
-
-