Class EmbeddedImageHandle
java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.StructureHandle
org.eclipse.birt.report.model.api.EmbeddedImageHandle
Represents the handle of an embedded image. The class gives the name and type
of the image. Used when an image element
ImageItem
gives a name. Each
embedded image has the following properties:
- Name
- an embedded image has a unique and required name, so the image item can use the image name to identify an embedded image.
- Type
- an embedded image has a choice and required type: bmp, gif, png or x-png.
- Data
- value of the image data in Base64 encoding.
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle
structContext
Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddedImageHandle
(SimpleValueHandle valueHandle, int index) Constructs the handle of embedded image. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getData()
Returns the byte array of image data.getName()
Returns the embedded image name.Returns the qualified name of this element.getType()
Returns the image type.boolean
Checks whetherEmbeddedImage
has reference to library embedded image.void
setData
(byte[] data) Sets the byte array of image data.void
Sets the embedded image name.void
Sets the image type.Methods inherited from class org.eclipse.birt.report.model.api.StructureHandle
drop, getContext, getDefn, getExpressionProperty, getExternalizedValue, getExternalizedValue, getIntProperty, getMember, getProperty, getPropertyDefn, getStringProperty, getStructure, isDesignTime, isLocal, iterator, setDesignTime, setExpressionProperty, setProperty, setPropertySilently
Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle
getReference
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
-
Constructor Details
-
EmbeddedImageHandle
Constructs the handle of embedded image.- Parameters:
valueHandle
- the value handle for embedded image list of one propertyindex
- the position of this embedded image in the list
-
-
Method Details
-
getData
public byte[] getData()Returns the byte array of image data.- Returns:
- the byte array of image data
-
setData
public void setData(byte[] data) Sets the byte array of image data.- Parameters:
data
- the byte array to set
-
getName
Returns the embedded image name. This name is used to identify an embedded image by image item.- Returns:
- the embedded image name
-
setName
Sets the embedded image name. This name is used to identify an embedded image by image item.- Parameters:
name
- the embedded image name to set- Throws:
SemanticException
- value required exception
-
getType
Returns the image type. The possible values are defined inDesignChoiceConstants
, and they are:IMAGE_TYPE_IMAGE_JPEG
IMAGE_TYPE_IMAGE_BMP
IMAGE_TYPE_IMAGE_GIF
IMAGE_TYPE_IMAGE_PNG
IMAGE_TYPE_IMAGE_X_PNG
- Returns:
- the image type
-
setType
Sets the image type. The allowed values are defined inDesignChoiceConstants
, and they are:IMAGE_TYPE_IMAGE_JPEG
IMAGE_TYPE_IMAGE_BMP
IMAGE_TYPE_IMAGE_GIF
IMAGE_TYPE_IMAGE_PNG
IMAGE_TYPE_IMAGE_X_PNG
- Parameters:
type
- the image type to set- Throws:
SemanticException
- if the image type is not in the choice list.
-
getQualifiedName
Returns the qualified name of this element. The qualified name is the name of this element if this element is in module user is editing.- Returns:
- the qualified name of thie element.
-
isLibReference
public boolean isLibReference()Checks whetherEmbeddedImage
has reference to library embedded image.- Returns:
- if
EmbeddedImage
has reference to library image and the reference is resolved returntrue
else returnfalse
-