Class AbstractFacesManager

    • Constructor Detail

      • AbstractFacesManager

        protected AbstractFacesManager​(@NotNull
                                       @NotNull FaceCache faceCache)
        Creates a new instance.
        Parameters:
        faceCache - the face cache instance for storing in-memory faces
    • Method Detail

      • fireFaceUpdated

        protected void fireFaceUpdated​(@NotNull
                                       @NotNull Face face)
        Notifies all FacesManagerListeners that a face has been updated.
        Parameters:
        face - the face
      • getOriginalImageIcon

        @NotNull
        public @NotNull javax.swing.ImageIcon getOriginalImageIcon​(int faceNum,
                                                                   boolean @Nullable [] isUnknownImage)
        Description copied from interface: FacesManager
        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.
        Specified by:
        getOriginalImageIcon in interface FacesManager
        Parameters:
        faceNum - the face ID
        isUnknownImage - 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
        public @NotNull javax.swing.ImageIcon getScaledImageIcon​(int faceNum,
                                                                 boolean @Nullable [] isUnknownImage)
        Description copied from interface: FacesManager
        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.
        Specified by:
        getScaledImageIcon in interface FacesManager
        Parameters:
        faceNum - the face ID
        isUnknownImage - 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
        public @NotNull javax.swing.ImageIcon getMagicMapImageIcon​(int faceNum,
                                                                   boolean @Nullable [] isUnknownImage)
        Description copied from interface: FacesManager
        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.
        Specified by:
        getMagicMapImageIcon in interface FacesManager
        Parameters:
        faceNum - the face ID
        isUnknownImage - 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
        public @NotNull Face getFace​(int faceNum)
        Description copied from interface: FacesManager
        Returns the Face instance for a given face ID. Requests the face face from the server if necessary.
        Specified by:
        getFace in interface FacesManager
        Parameters:
        faceNum - the face ID to request
        Returns:
        the face
      • getFaceImages

        @NotNull
        protected abstract @NotNull FaceImages getFaceImages​(int faceNum,
                                                             boolean @Nullable [] isUnknownImage)
        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:
        faceNum - the face ID
        isUnknownImage - returns whether the returned face is the "unknown" face; ignored if null
        Returns:
        the face images information
      • lookupFace

        @NotNull
        protected @NotNull Face lookupFace​(int faceNum)
        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:
        faceNum - the face ID to look up
        Returns:
        the face
      • getFace2

        @Nullable
        public @Nullable Face getFace2​(int faceNum)
        Description copied from interface: FacesManager
        Returns the Face instance for a given face ID. Requests the face from the server if necessary.
        Specified by:
        getFace2 in interface FacesManager
        Parameters:
        faceNum - the face ID to request
        Returns:
        the face or null for the empty face
      • reset

        public void reset()
        Description copied from interface: FacesManager
        Forgets about pending faces.
        Specified by:
        reset in interface FacesManager