Package com.six.timapi
Class DisplayProductInfo
- java.lang.Object
-
- com.six.timapi.DisplayProductInfo
-
public class DisplayProductInfo extends Object
Holds a product picture and related information for display. For use byGuides.VALUE_ADDED_SERVICES. The image is stored as byte array containing the image data. Convenience methods are present to set image from typical java sources like BufferedImage.
-
-
Constructor Summary
Constructors Constructor Description DisplayProductInfo()Create instance ofDisplayProductInfo.DisplayProductInfo(DisplayProductInfo displayProductInfo)Create copy ofDisplayProductInfo.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetBackgroundColor()Background color.ImageFileFormatgetImageFileFormat()Defines file format of image data.intgetImageHeight()Height in pixels of image.intgetImageWidth()Width in pixels of image.StringgetProductDisplayName()Name of a product for display purposes.byte[]getValue()Image data.voidsetBackgroundColor(Color color)Background color.voidsetImage(BufferedImage image, ImageFileFormat imageFileFormat)Set image.voidsetImage(String pathImageFile, ImageFileFormat imageFileFormat)Set image loading it from file.voidsetImageFileFormat(ImageFileFormat format)File format of image data.voidsetImageHeight(int height)Height in pixels of the image.voidsetImageWidth(int width)Width in pixels of image.voidsetProductDisplayName(String value)Name of a product for display purposes.voidsetValue(byte[] data)Image data.StringtoString()
-
-
-
Constructor Detail
-
DisplayProductInfo
public DisplayProductInfo()
Create instance ofDisplayProductInfo.
-
DisplayProductInfo
public DisplayProductInfo(DisplayProductInfo displayProductInfo)
Create copy ofDisplayProductInfo. This is a shallow copy. If you modifyimageDatain the source display product information it will also change in this copy too.
-
-
Method Detail
-
getValue
public byte[] getValue()
Image data.
-
setValue
public void setValue(byte[] data)
Image data.
-
getImageFileFormat
public ImageFileFormat getImageFileFormat()
Defines file format of image data.
-
setImageFileFormat
public void setImageFileFormat(ImageFileFormat format)
File format of image data.
-
getImageWidth
public int getImageWidth()
Width in pixels of image.
-
setImageWidth
public void setImageWidth(int width)
Width in pixels of image.
-
getImageHeight
public int getImageHeight()
Height in pixels of image.
-
setImageHeight
public void setImageHeight(int height)
Height in pixels of the image.
-
getProductDisplayName
public String getProductDisplayName()
Name of a product for display purposes.
-
setProductDisplayName
public void setProductDisplayName(String value)
Name of a product for display purposes.
-
getBackgroundColor
public Color getBackgroundColor()
Background color.
-
setBackgroundColor
public void setBackgroundColor(Color color)
Background color.
-
setImage
public void setImage(BufferedImage image, ImageFileFormat imageFileFormat)
Set image. This is the preferred method to set images avoiding potential mistakes.
-
setImage
public void setImage(String pathImageFile, ImageFileFormat imageFileFormat) throws IOException
Set image loading it from file.- Throws:
IOException- File can not be loaded.
-
-