org.eclipse.birt.report.model.api
Class EmbeddedImageHandle

java.lang.Object
  extended by org.eclipse.birt.report.model.api.ElementDetailHandle
      extended by org.eclipse.birt.report.model.api.ValueHandle
          extended by org.eclipse.birt.report.model.api.StructureHandle
              extended by org.eclipse.birt.report.model.api.EmbeddedImageHandle

public class EmbeddedImageHandle
extends StructureHandle

Represents the handle of an embedded image. The class gives the name and type of the image. Used when an image element ImageItemgives 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
structRef
 
Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
 
Constructor Summary
EmbeddedImageHandle(SimpleValueHandle valueHandle, int index)
          Constructs the handle of embedded image.
 
Method Summary
 byte[] getData()
          Returns the byte array of image data.
 java.lang.String getName()
          Returns the embedded image name.
 java.lang.String getQualifiedName()
          Returns the qualified name of this element.
 java.lang.String getType()
          Returns the image type.
 boolean isLibReference()
          Checks whether EmbeddedImage has reference to library embedded image.
 void setData(byte[] data)
          Sets the byte array of image data.
 void setName(java.lang.String name)
          Sets the embedded image name.
 void setType(java.lang.String type)
          Sets the image type.
 
Methods inherited from class org.eclipse.birt.report.model.api.StructureHandle
drop, getDefn, getExternalizedValue, getMember, getProperty, getPropertyDefn, getReference, getStringProperty, getStructure, isDesignTime, iterator, setDesignTime, setProperty, setPropertySilently
 
Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedImageHandle

public EmbeddedImageHandle(SimpleValueHandle valueHandle,
                           int index)
Constructs the handle of embedded image.

Parameters:
valueHandle - the value handle for embedded image list of one property
index - the position of this embedded image in the list
Method Detail

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

public java.lang.String getName()
Returns the embedded image name. This name is used to identify an embedded image by image item.

Returns:
the embedded image name

setName

public void setName(java.lang.String name)
             throws SemanticException
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

public java.lang.String getType()
Returns the image type. The possible values are defined in DesignChoiceConstants, and they are:

Returns:
the image type

setType

public void setType(java.lang.String type)
             throws SemanticException
Sets the image type. The allowed values are defined in DesignChoiceConstants, and they are:

Parameters:
type - the image type to set
Throws:
SemanticException - if the image type is not in the choice list.

getQualifiedName

public java.lang.String 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 whether EmbeddedImage has reference to library embedded image.

Returns:
if EmbeddedImage has reference to library image and the reference is resolved return true else return false


Copyright © 2008 Actuate Corp. All rights reserved.