Class FixedResizerFactory

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Resizer resizer
      The resizer which is to be returned unconditionally by this class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Resizer getResizer()
      Returns the default Resizer.
      Resizer getResizer​(java.awt.Dimension originalSize, java.awt.Dimension thumbnailSize)
      Returns a suitable Resizer, given the Dimensions of the original image and the thumbnail image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resizer

        private final Resizer resizer
        The resizer which is to be returned unconditionally by this class.
    • Constructor Detail

      • FixedResizerFactory

        public FixedResizerFactory​(Resizer resizer)
        Creates an instance of the FixedResizerFactory which returns the speicifed Resizer under all circumstances.
        Parameters:
        resizer - The Resizer instance that is to be returned under all circumstances.
    • Method Detail

      • getResizer

        public Resizer getResizer​(java.awt.Dimension originalSize,
                                  java.awt.Dimension thumbnailSize)
        Description copied from interface: ResizerFactory
        Returns a suitable Resizer, given the Dimensions of the original image and the thumbnail image.
        Specified by:
        getResizer in interface ResizerFactory
        Parameters:
        originalSize - The size of the original image.
        thumbnailSize - The size of the thumbnail.
        Returns:
        The suitable Resizer to perform the resizing operation for the given condition.