Class AbstractImageAdapter
java.lang.Object
com.jalios.jcms.uicomponent.image.AbstractImageAdapter
- All Implemented Interfaces:
ImageAdapter
- Direct Known Subclasses:
DefaultImageAdapter,LandscapeImageAdapter
Abstract class for ImageAdapter implementations
- Since:
- jcms-9.0.2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetImage()protected ImageInfogetImageInfo(File imageFile) Utility method to get ImageInfo from an image file.intintprotected FilegetThumbnail(File image, int maxWidth) An utility method to create, or retrieve the existing thumbnail.voidvoidsetMaxHeight(int maxHeight) voidsetMaxWidth(int maxWidth) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jalios.jcms.uicomponent.image.ImageAdapter
getAdaptedImage
-
Field Details
-
sourceImage
-
-
Constructor Details
-
AbstractImageAdapter
public AbstractImageAdapter()
-
-
Method Details
-
setImage
- Specified by:
setImagein interfaceImageAdapter
-
getImage
- Specified by:
getImagein interfaceImageAdapter
-
setMaxHeight
public void setMaxHeight(int maxHeight) -
getMaxHeight
public int getMaxHeight() -
setMaxWidth
public void setMaxWidth(int maxWidth) -
getMaxWidth
public int getMaxWidth() -
getImageInfo
Utility method to get ImageInfo from an image file.- Parameters:
imageFile- the image File- Returns:
- the
ImageInfoof the given image file - Since:
- jcms-9.0.2
-
getThumbnail
An utility method to create, or retrieve the existing thumbnail.- Parameters:
image- the image FilemaxWidth- the max width of image- Returns:
- the thumbnail file for given image file and given maxWidth
- Since:
- jcms-9.0.2
-