Interface FacesManager

All Known Implementing Classes:
AbstractFacesManager, DefaultFacesManager

public interface FacesManager
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.
  • Method Details

    • getOriginalImageIcon

      @NotNull @NotNull ImageIcon getOriginalImageIcon(int faceNum, @Nullable @Nullable AtomicBoolean returnIsUnknownImage)
      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 ID
      returnIsUnknownImage - returns whether the returned face is the "unknown" face; ignored if null
      Returns:
      the face, or the "unknown" face if the face is not loaded
    • getScaledImageIcon

      @NotNull @NotNull ImageIcon getScaledImageIcon(int faceNum, @Nullable @Nullable AtomicBoolean returnIsUnknownImage)
      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 ID
      returnIsUnknownImage - returns whether the returned face is the "unknown" face; ignored if null
      Returns:
      the face, or the "unknown" face if the face is not loaded
    • getMagicMapImageIcon

      @NotNull @NotNull ImageIcon getMagicMapImageIcon(int faceNum, @Nullable @Nullable AtomicBoolean returnIsUnknownImage)
      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 ID
      returnIsUnknownImage - returns whether the returned face is the "unknown" face; ignored if null
      Returns:
      the face, or the "unknown" face if the face is not loaded
    • getFace

      @NotNull @NotNull Face getFace(int faceNum)
      Returns the Face instance for a given face ID. Requests the face from the server if necessary.
      Parameters:
      faceNum - the face ID to request
      Returns:
      the face
    • getFace2

      @Nullable @Nullable Face getFace2(int faceNum)
      Returns the Face instance for a given face ID. Requests the face from the server if necessary.
      Parameters:
      faceNum - the face ID to request
      Returns:
      the face or null for the empty face
    • addFacesManagerListener

      void addFacesManagerListener(@NotNull @NotNull FacesManagerListener facesManagerListener)
      Adds a FacesManagerListener to be notified about updated faces.
      Parameters:
      facesManagerListener - the listener
    • removeFacesManagerListener

      void removeFacesManagerListener(@NotNull @NotNull FacesManagerListener facesManagerListener)
      Removes a FacesManagerListener to be notified about updated faces.
      Parameters:
      facesManagerListener - the listener
    • reset

      void reset()
      Forgets about pending faces.