Class Image
java.lang.Object
com.aquima.interactions.composer.model.Element
com.aquima.interactions.composer.model.Image
- All Implemented Interfaces:
IElement
,IImage
,Serializable
The image model represents a image node that needs to be displayed in the document or page.
- Since:
- 6.0
- Author:
- Jon van Leuven
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionImage
(ImageDefinition imageDefinition) Construct an image model.protected
Image
(String name, byte[] imageData, ImageType imageType, ImageContentType imageContentType, String qrCodeContent) -
Method Summary
Modifier and TypeMethodDescriptionThis method should clone the element and return the cloned element.boolean
This method returns the height of the image.This method returns the image content type.byte[]
This method returns the image data.Returns an identifier based on the image data, two images with the same data will always have the same identifier.This method returns the image type.THis method returns the QR Code content.getWidth()
This method returns the width of the image.int
hashCode()
boolean
Indicates whether this image is dynamic.void
setHeight
(IntegerValue height) This method sets the height for this image model.void
void
setWidth
(IntegerValue width) This method sets the width for this image model.Methods inherited from class com.aquima.interactions.composer.model.Element
accept, addPresentationStyle, evaluateTsl, getName, getParent, getPresentationStyles, getProperty, getPropertyKeys, getRuntimeKey, getVisibilityCondition, hasFocus, hasPresentationStyle, isReadonly, isReadonlyInheritFromParent, isVisible, setFocus, setParent, setPresentationStyle, setPresentationStyles, setPresentationStyles, setProperty, setReadonly, setReadonlyInheritFromParent, setRuntimeKey, setVisibilityCondition, setVisible
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.composer.IElement
accept, getName, getParent, getPresentationStyles, getProperty, getPropertyKeys, getRuntimeKey, hasFocus, hasPresentationStyle, isReadonly, isReadonlyInheritFromParent, isVisible, setProperty
-
Constructor Details
-
Image
public Image(String name, byte[] imageData, ImageType imageType, ImageContentType imageContentType, String qrCodeContent) -
Image
Construct an image model.- Parameters:
imageDefinition
- The definition of the image (required)
-
Image
-
-
Method Details
-
getImageDataIdentifier
Description copied from interface:IImage
Returns an identifier based on the image data, two images with the same data will always have the same identifier.The identifier can be used to identify dynamic image based on their content rather than based on its name, as multiple dynamic images may share the same name, but have different content.
- Specified by:
getImageDataIdentifier
in interfaceIImage
- Returns:
- the identifier of the image data
-
isDynamic
public boolean isDynamic()Description copied from interface:IImage
Indicates whether this image is dynamic.If an image is not dynamic, then all images with the same name will have the same image content. If an image is dynamic, then two images with the same name are not guaranteed to have the same image content, as the image content may have been generated based on a dynamic value (e.g. a QR code).
-
setName
-
getImageData
public byte[] getImageData()This method returns the image data.- Specified by:
getImageData
in interfaceIImage
- Returns:
- byte array containing raw image data.
-
getImageType
This method returns the image type.- Specified by:
getImageType
in interfaceIImage
- Returns:
- ImageType
-
getImageContentType
Description copied from interface:IImage
This method returns the image content type.- Specified by:
getImageContentType
in interfaceIImage
- Returns:
- the image's content type
-
getQRCodeContent
Description copied from interface:IImage
THis method returns the QR Code content.- Specified by:
getQRCodeContent
in interfaceIImage
- Returns:
- the image's QR Code content
-
getWidth
This method returns the width of the image. -
getHeight
This method returns the height of the image. -
setWidth
This method sets the width for this image model.- Parameters:
width
- The width of the image.
-
setHeight
This method sets the height for this image model.- Parameters:
height
- The height of the image.
-
equals
-
hashCode
public int hashCode() -
duplicate
Description copied from interface:IElement
This method should clone the element and return the cloned element. The duplicate method should usually make a deep copy of the element, with the exception of members that are not mutable (and thus can safely be shared between multiple copies). The properties of an element are considered to be non-mutable, and will thus by default be copied.
-