Class AbstractImageAdapter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.File sourceImage  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File getImage()  
      protected ImageInfo getImageInfo​(java.io.File imageFile)
      Utility method to get ImageInfo from an image file.
      int getMaxHeight()  
      int getMaxWidth()  
      protected java.io.File getThumbnail​(java.io.File image, int maxWidth)
      An utility method to create, or retrieve the existing thumbnail.
      void setImage​(java.io.File sourceImage)  
      void setMaxHeight​(int maxHeight)  
      void setMaxWidth​(int maxWidth)  
      • Methods inherited from class java.lang.Object

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

      • sourceImage

        protected java.io.File sourceImage
    • Constructor Detail

      • AbstractImageAdapter

        public AbstractImageAdapter()
    • Method Detail

      • setImage

        public void setImage​(java.io.File sourceImage)
        Specified by:
        setImage in interface ImageAdapter
      • setMaxHeight

        public void setMaxHeight​(int maxHeight)
      • getMaxHeight

        public int getMaxHeight()
      • setMaxWidth

        public void setMaxWidth​(int maxWidth)
      • getMaxWidth

        public int getMaxWidth()
      • getImageInfo

        protected ImageInfo getImageInfo​(java.io.File imageFile)
        Utility method to get ImageInfo from an image file.
        Parameters:
        imageFile - the image File
        Returns:
        the ImageInfo of the given image file
        Since:
        jcms-9.0.2
      • getThumbnail

        protected java.io.File getThumbnail​(java.io.File image,
                                            int maxWidth)
        An utility method to create, or retrieve the existing thumbnail.
        Parameters:
        image - the image File
        maxWidth - the max width of image
        Returns:
        the thumbnail file for given image file and given maxWidth
        Since:
        jcms-9.0.2