Class AbstractImageAdapter
- java.lang.Object
-
- com.jalios.jcms.uicomponent.image.AbstractImageAdapter
-
- All Implemented Interfaces:
ImageAdapter
- Direct Known Subclasses:
DefaultImageAdapter,LandscapeImageAdapter
public abstract class AbstractImageAdapter extends java.lang.Object implements ImageAdapter
Abstract class for ImageAdapter implementations- Since:
- jcms-9.0.2
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.FilesourceImage
-
Constructor Summary
Constructors Constructor Description AbstractImageAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetImage()protected ImageInfogetImageInfo(java.io.File imageFile)Utility method to get ImageInfo from an image file.intgetMaxHeight()intgetMaxWidth()protected java.io.FilegetThumbnail(java.io.File image, int maxWidth)An utility method to create, or retrieve the existing thumbnail.voidsetImage(java.io.File sourceImage)voidsetMaxHeight(int maxHeight)voidsetMaxWidth(int maxWidth)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jalios.jcms.uicomponent.image.ImageAdapter
getAdaptedImage
-
-
-
-
Method Detail
-
setImage
public void setImage(java.io.File sourceImage)
- Specified by:
setImagein interfaceImageAdapter
-
getImage
public java.io.File 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
protected ImageInfo getImageInfo(java.io.File imageFile)
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
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 FilemaxWidth- the max width of image- Returns:
- the thumbnail file for given image file and given maxWidth
- Since:
- jcms-9.0.2
-
-