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 Color
getBackgroundColor()
Background color.ImageFileFormat
getImageFileFormat()
Defines file format of image data.int
getImageHeight()
Height in pixels of image.int
getImageWidth()
Width in pixels of image.String
getProductDisplayName()
Name of a product for display purposes.byte[]
getValue()
Image data.void
setBackgroundColor(Color color)
Background color.void
setImage(BufferedImage image, ImageFileFormat imageFileFormat)
Set image.void
setImage(String pathImageFile, ImageFileFormat imageFileFormat)
Set image loading it from file.void
setImageFileFormat(ImageFileFormat format)
File format of image data.void
setImageHeight(int height)
Height in pixels of the image.void
setImageWidth(int width)
Width in pixels of image.void
setProductDisplayName(String value)
Name of a product for display purposes.void
setValue(byte[] data)
Image data.String
toString()
-
-
-
Constructor Detail
-
DisplayProductInfo
public DisplayProductInfo()
Create instance ofDisplayProductInfo
.
-
DisplayProductInfo
public DisplayProductInfo(DisplayProductInfo displayProductInfo)
Create copy ofDisplayProductInfo
. This is a shallow copy. If you modifyimageData
in 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.
-
-