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.File
sourceImage
-
Constructor Summary
Constructors Constructor Description AbstractImageAdapter()
-
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
-
Methods inherited from interface com.jalios.jcms.uicomponent.image.ImageAdapter
getAdaptedImage
-
-
-
-
Method Detail
-
setImage
public void setImage(java.io.File sourceImage)
- Specified by:
setImage
in interfaceImageAdapter
-
getImage
public java.io.File getImage()
- Specified by:
getImage
in 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
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 FilemaxWidth
- the max width of image- Returns:
- the thumbnail file for given image file and given maxWidth
- Since:
- jcms-9.0.2
-
-