Interface ImageManager<T,D>

  • Type Parameters:
    T - the type of things this manager provides images for.
    D - the type of data.
    All Known Subinterfaces:
    PriorityImageManager<T,D,P>
    All Known Implementing Classes:
    AbstractImageManager


    public interface ImageManager<T,D>
    • Method Summary

      Modifier and Type Method and Description
      void addLoadListener(LoadListener<T,D> listener)
       
      void destroy()
      Destroy this manager and release all resources occupied
      D get(T thing)
      Get the image for the given thing.
      void removeLoadListener(LoadListener<T,D> listener)
       
      void setCacheHintMinimumSize(int size)
      Let the implementation optimize the cache by having a minimum size.
      void willNeed(T thing)
      Notify the manager that the specified thing will be needed soon.
    • Method Detail

      • get

        D get(T thing)
        Get the image for the given thing.
        Parameters:
        thing - the thing to get an image for.
        Returns:
        an instance of BufferedImage
      • willNeed

        void willNeed(T thing)
        Notify the manager that the specified thing will be needed soon. This methods should be called before actually calling get subsequently for more than one item so that the manager may be able to reorganize its structures to not throwing out things out of its cache that are known to be used soon.
        Parameters:
        thing - the thing you need to use soon.
      • addLoadListener

        void addLoadListener(LoadListener<T,D> listener)
        Parameters:
        listener - the listener to add.
      • removeLoadListener

        void removeLoadListener(LoadListener<T,D> listener)
        Parameters:
        listener - the listener to remove.
      • destroy

        void destroy()
        Destroy this manager and release all resources occupied
      • setCacheHintMinimumSize

        void setCacheHintMinimumSize(int size)
        Let the implementation optimize the cache by having a minimum size.