public class EmbeddedImage
extends org.eclipse.birt.report.model.core.ReferencableStructure
ImageItem
gives a name. Each embedded
image has the following properties:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHARSET
Encoding mode for the data member.
|
protected java.lang.String |
data
String of the image data in 8859_1 encoding.
|
static java.lang.String |
DATA_MEMBER
Name of the "data" property.
|
static java.lang.String |
EMBEDDED_IMAGE_STRUCT
Name of this structure.
|
protected java.lang.String |
name
Value of the name property.
|
static java.lang.String |
NAME_MEMBER
Name of the "name" property.
|
protected java.lang.String |
type
Value of the expression property.
|
static java.lang.String |
TYPE_MEMBER
Name of the "type" property.
|
Constructor and Description |
---|
EmbeddedImage()
Default constructor.
|
EmbeddedImage(java.lang.String name)
Constructs the image with the given name.
|
EmbeddedImage(java.lang.String name,
java.lang.String type)
Constructs the image with the required name and type.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getData(org.eclipse.birt.report.model.core.Module module)
Returns the image data in Base64 encoding.
|
protected java.lang.Object |
getIntrinsicProperty(java.lang.String propName)
Returns the value of a structure property represented as a member
variable.
|
java.lang.String |
getName()
Returns name of the image.
|
java.lang.String |
getReferencableProperty()
Gets the value of the referencable member.
|
java.lang.String |
getStructName()
Returns the name of the structure definition.
|
java.lang.String |
getType(org.eclipse.birt.report.model.core.Module module)
Returns type value this node represents.
|
StructureHandle |
handle(SimpleValueHandle valueHandle,
int index)
Creates the specific handle of this structure.
|
boolean |
isReferencableProperty(java.lang.String memberName)
Checks whether the member of the input name is the referencable member or
not.
|
void |
setData(byte[] data)
Sets the data of the image.
|
protected void |
setIntrinsicProperty(java.lang.String propName,
java.lang.Object value)
Sets the value of of a structure property represented as a member
variable.
|
void |
setName(java.lang.String name)
Sets the name of the image.
|
void |
setType(java.lang.String type)
Sets the type of the image.
|
java.util.List |
validate(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Validate whether this structure is valid.
|
addClient, addClientStructure, broadcast, clone, dropClient, dropClientStructure, getClientList, getClientStructures, getLocalProperty, getProperty, hasReferences, isReferencable, updateReference
checkStringMember, copy, equals, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getHandle, getLocalProperty, getMemberDefn, getObjectDefn, getProperty, getStringProperty, isDesignTime, setContext, setExpressionProperty, setProperty, setProperty, setupContext, updateReference
public static final java.lang.String EMBEDDED_IMAGE_STRUCT
public static final java.lang.String NAME_MEMBER
public static final java.lang.String TYPE_MEMBER
IMAGE_TYPE_IMAGE_BMP
IMAGE_TYPE_IMAGE_GIF
IMAGE_TYPE_IMAGE_PNG
IMAGE_TYPE_IMAGE_X_PNG
public static final java.lang.String DATA_MEMBER
public static final java.lang.String CHARSET
protected java.lang.String name
protected java.lang.String type
protected java.lang.String data
public EmbeddedImage()
public EmbeddedImage(java.lang.String name)
DesignChoiceConstants.IMAGE_TYPE_AUTO
.name
- name of the imagepublic EmbeddedImage(java.lang.String name, java.lang.String type)
name
- name of the imagetype
- type of the imagepublic java.lang.String getStructName()
IStructure
protected java.lang.Object getIntrinsicProperty(java.lang.String propName)
org.eclipse.birt.report.model.core.Structure
getIntrinsicProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
propName
- name of the propertyprotected void setIntrinsicProperty(java.lang.String propName, java.lang.Object value)
org.eclipse.birt.report.model.core.Structure
setIntrinsicProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
propName
- the name of the property to setvalue
- the property valuepublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic java.lang.String getType(org.eclipse.birt.report.model.core.Module module)
IMAGE_TYPE_IMAGE_JPEG
IMAGE_TYPE_IMAGE_BMP
IMAGE_TYPE_IMAGE_GIF
IMAGE_TYPE_IMAGE_PNG
IMAGE_TYPE_IMAGE_X_PNG
module
- the module of this structurepublic void setType(java.lang.String type)
DesignChoiceConstants
,
and they are:
IMAGE_TYPE_IMAGE_JPEG
IMAGE_TYPE_IMAGE_BMP
IMAGE_TYPE_IMAGE_GIF
IMAGE_TYPE_IMAGE_PNG
IMAGE_TYPE_IMAGE_X_PNG
type
- the type to setpublic byte[] getData(org.eclipse.birt.report.model.core.Module module)
module
- the module of this structurepublic void setData(byte[] data)
data
- the image data to setpublic StructureHandle handle(SimpleValueHandle valueHandle, int index)
org.eclipse.birt.report.model.core.Structure
handle
in class org.eclipse.birt.report.model.core.Structure
valueHandle
- the value handle of this structure list property this
structure is inindex
- the position of this structure in structure listpublic java.util.List validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
org.eclipse.birt.report.model.core.Structure
PropertyValueException
.validate
in class org.eclipse.birt.report.model.core.ReferencableStructure
module
- the moduleelement
- the element contains this structurepublic boolean isReferencableProperty(java.lang.String memberName)
org.eclipse.birt.report.model.core.ReferencableStructure
isReferencableProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
memberName
- the member name to checkpublic java.lang.String getReferencableProperty()
org.eclipse.birt.report.model.core.Structure
getReferencableProperty
in class org.eclipse.birt.report.model.core.Structure
Copyright © 2014 OpenText Corp. All rights reserved.