Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api.elements.structures
Class EmbeddedImage

    java.lang.Object
      org.eclipse.birt.report.model.core.Structure
          org.eclipse.birt.report.model.core.ReferencableStructure
              org.eclipse.birt.report.model.api.elements.structures.EmbeddedImage

All Implemented Interfaces:
  java.lang.Cloneable, IStructure, org.eclipse.birt.report.model.core.IPropertySet, org.eclipse.birt.report.model.core.IReferencable

    public class EmbeddedImage

extends org.eclipse.birt.report.model.core.ReferencableStructure

Represents 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
`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.

Fields inherited from class org.eclipse.birt.report.model.core.ReferencableStructure
`clients, clientStructures, LIB_REFERENCE_MEMBER, libReference`

Constructor Summary
`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.

Method Summary
`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)`
`java.lang.String` | `getName()` Returns name of the image.
`java.lang.String` | `getReferencableProperty()`
`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)`
`boolean` | `isReferencableProperty(java.lang.String memberName)`
`void` | `setData(byte[] data)` Sets the data of the image.
`protected void` | `setIntrinsicProperty(java.lang.String propName, java.lang.Object value)`
`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)`

Methods inherited from class org.eclipse.birt.report.model.core.ReferencableStructure
`addClient, addClientStructure, broadcast, clone, dropClient, dropClientStructure, getClientList, getClientStructures, getLocalProperty, getProperty, hasReferences, isReferencable, updateReference`

Methods inherited from class org.eclipse.birt.report.model.core.Structure
`checkStringMember, copy, equals, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getHandle, getLocalProperty, getMemberDefn, getObjectDefn, getProperty, getStringProperty, isDesignTime, setContext, setExpressionProperty, setProperty, setProperty, setupContext, updateReference`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EMBEDDED_IMAGE_STRUCT

    public static final java.lang.String EMBEDDED_IMAGE_STRUCT

  Name of this structure. Matches the definition in the meta-data dictionary.

  See Also:
    Constant Field Values

### NAME_MEMBER

    public static final java.lang.String NAME_MEMBER

  Name of the "name" property.

  See Also:
    Constant Field Values

### TYPE_MEMBER

    public static final java.lang.String TYPE_MEMBER

  Name of the "type" property. It can be:

  - `IMAGE_TYPE_IMAGE_BMP`
  - `IMAGE_TYPE_IMAGE_GIF`
  - `IMAGE_TYPE_IMAGE_PNG`
  - `IMAGE_TYPE_IMAGE_X_PNG`

  See Also:
    Constant Field Values

### DATA_MEMBER

    public static final java.lang.String DATA_MEMBER

  Name of the "data" property.

  See Also:
    Constant Field Values

### CHARSET

    public static final java.lang.String CHARSET

  Encoding mode for the data member.

  See Also:
    Constant Field Values

### name

    protected java.lang.String name

  Value of the name property.

### type

    protected java.lang.String type

  Value of the expression property.

### data

    protected java.lang.String data

  String of the image data in 8859_1 encoding.

Constructor Detail

### EmbeddedImage

    public EmbeddedImage()

  Default constructor.

### EmbeddedImage

    public EmbeddedImage(java.lang.String name)

  Constructs the image with the given name. The type of the image is set to the default value `DesignChoiceConstants.IMAGE_TYPE_AUTO`.

  Parameters:
    `name` - name of the image

### EmbeddedImage

    public EmbeddedImage(java.lang.String name,
                         java.lang.String type)

  Constructs the image with the required name and type.

  Parameters:
    `name` - name of the image
    `type` - type of the image

Method Detail

### getStructName

    public java.lang.String getStructName()

  Description copied from interface: `IStructure`
  Returns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.

  Returns:
    the internal name of the structure a defined in the meta-data dictionary.

### getIntrinsicProperty

    protected java.lang.Object getIntrinsicProperty(java.lang.String propName)

  Overrides:
    `getIntrinsicProperty` in class `org.eclipse.birt.report.model.core.ReferencableStructure`

### setIntrinsicProperty

    protected void setIntrinsicProperty(java.lang.String propName,
                                        java.lang.Object value)

  Overrides:
    `setIntrinsicProperty` in class `org.eclipse.birt.report.model.core.ReferencableStructure`

### getName

    public java.lang.String getName()

  Returns name of the image.

  Returns:
    name of the image

### setName

    public void setName(java.lang.String name)

  Sets the name of the image.

  Parameters:
    `name` - the name to set

### getType

    public java.lang.String getType(org.eclipse.birt.report.model.core.Module module)

  Returns type value this node represents. It can be:

  - `IMAGE_TYPE_IMAGE_JPEG`
  - `IMAGE_TYPE_IMAGE_BMP`
  - `IMAGE_TYPE_IMAGE_GIF`
  - `IMAGE_TYPE_IMAGE_PNG`
  - `IMAGE_TYPE_IMAGE_X_PNG`

  Parameters:
    `module` - the module of this structure
  Returns:
    the type value

### setType

    public void setType(java.lang.String type)

  Sets the type of the image. The allowed values are defined in `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`

  Parameters:
    `type` - the type to set

### getData

    public byte[] getData(org.eclipse.birt.report.model.core.Module module)

  Returns the image data in Base64 encoding.

  Parameters:
    `module` - the module of this structure
  Returns:
    the image data

### setData

    public void setData(byte[] data)

  Sets the data of the image.

  Parameters:
    `data` - the image data to set

### handle

    public StructureHandle handle(SimpleValueHandle valueHandle,
                                  int index)

  Specified by:
    `handle` in class `org.eclipse.birt.report.model.core.Structure`

### validate

    public java.util.List validate(org.eclipse.birt.report.model.core.Module module,
                                   org.eclipse.birt.report.model.core.DesignElement element)

  Overrides:
    `validate` in class `org.eclipse.birt.report.model.core.ReferencableStructure`

### isReferencableProperty

    public boolean isReferencableProperty(java.lang.String memberName)

  Specified by:
    `isReferencableProperty` in class `org.eclipse.birt.report.model.core.ReferencableStructure`

### getReferencableProperty

    public java.lang.String getReferencableProperty()

  Overrides:
    `getReferencableProperty` in class `org.eclipse.birt.report.model.core.Structure`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.