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.engine.extension
Interface IReportItemPresentation

    public interface IReportItemPresentation

Represents the extended item presentation time extension. The calling sequence in presentation engine might work as follows:

- Design engine creates a new instance of the extended item.
- Presentation engine detects that the element is an extended item. It dynamically creates an object with type IReportItemPresentation.
- The presentation engine calls various setXXX methods to pass initialization parameters to the extension implementation.
- deserialize method restores the generation time state
- Render the extended item through onRowSets method, handled the returned image
- Call finish() for cleanup.

  Field Summary
  `static int` | `OUTPUT_AS_CUSTOM`
  `static int` | `OUTPUT_AS_DRAWING`
  `static int` | `OUTPUT_AS_HTML_TEXT`
  `static int` | `OUTPUT_AS_IMAGE`
  `static int` | `OUTPUT_AS_IMAGE_WITH_MAP`
  `static int` | `OUTPUT_AS_TEXT`
  `static int` | `OUTPUT_NONE`

  Method Summary
  `void` | `deserialize(java.io.InputStream istream)` deserializes generation time state information about the extended item
  `void` | `finish()` Performs clean up work
  `java.lang.String` | `getImageMIMEType()`
  `int` | `getOutputType()` returns the output type, which could be IMAGE, TEXT, HTML TEXT, DRAWING, etc.
  `IReportItemPresentationInfo` | `getPresentationConfig()`
  `Size` | `getSize()` Get the size of the extended item.
  `void` | `init(IReportItemPresentationInfo info)`
  `java.lang.Object` | `onRowSets(IBaseResultSet[] results)` Process the extended item.
  `java.lang.Object` | `onRowSets(IRowSet[] rowSets)` Deprecated. since BIRT 2.3
  `void` | `setActionHandler(IHTMLActionHandler ah)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setApplicationClassLoader(java.lang.ClassLoader loader)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setDynamicStyle(IStyle style)` Deprecated. implement #init(IReportItemPresentationInfo) instead. Set dynamic style.
  `void` | `setExtendedItemContent(IContent content)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setLocale(java.util.Locale locale)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setModelObject(ExtendedItemHandle modelHandle)` Deprecated. implement #init(IReportItemPresentationInfo) instead
  `void` | `setOutputFormat(java.lang.String outputFormat)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setReportQueries(IDataQueryDefinition[] queries)` Deprecated. implement #init(IReportItemPresentationInfo) instead. pass the prepared query definition to extended item implementation, so that it can access data.
  `void` | `setResolution(int dpi)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setScriptContext(IReportContext context)` Deprecated. implement #init(IReportItemPresentationInfo) instead.
  `void` | `setSupportedImageFormats(java.lang.String supportedImageFormats)` Deprecated. implement #init(IReportItemPresentationInfo) instead.

  Field Detail

  ### OUTPUT_NONE

      static final int OUTPUT_NONE

  See Also:
    Constant Field Values

  ### OUTPUT_AS_IMAGE

      static final int OUTPUT_AS_IMAGE

  See Also:
    Constant Field Values

  ### OUTPUT_AS_TEXT

      static final int OUTPUT_AS_TEXT

  See Also:
    Constant Field Values

  ### OUTPUT_AS_HTML_TEXT

      static final int OUTPUT_AS_HTML_TEXT

  See Also:
    Constant Field Values

  ### OUTPUT_AS_DRAWING

      static final int OUTPUT_AS_DRAWING

  See Also:
    Constant Field Values

  ### OUTPUT_AS_CUSTOM

      static final int OUTPUT_AS_CUSTOM

  See Also:
    Constant Field Values

  ### OUTPUT_AS_IMAGE_WITH_MAP

      static final int OUTPUT_AS_IMAGE_WITH_MAP

  See Also:
    Constant Field Values

  Method Detail

  ### init

      void init(IReportItemPresentationInfo info)

    Parameters:
      `info` - Presentation info of report item
    Since:
      BIRT 2.3

  ### setModelObject

      void setModelObject(ExtendedItemHandle modelHandle)

    Deprecated. implement #init(IReportItemPresentationInfo) instead

    passes a handle to the extended report item model to the extension

    Parameters:
      `modelHandle` - a handle to the extended item model object

  ### setApplicationClassLoader

      void setApplicationClassLoader(java.lang.ClassLoader loader)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    passes the class loader used to load user defined classes.

    Parameters:
      `loader` - class loader used to load the classes

  ### setScriptContext

      void setScriptContext(IReportContext context)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    pass the script context to the report item.

    Parameters:
      `context` - report context used by java-based script

  ### setReportQueries

      void setReportQueries(IDataQueryDefinition[] queries)

    Deprecated. implement #init(IReportItemPresentationInfo) instead. pass the prepared query definition to extended item implementation, so that it can access data.

  ### setLocale

      void setLocale(java.util.Locale locale)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    passes the locale used in the presentation.

    Parameters:
      `locale` - locale

  ### setResolution

      void setResolution(int dpi)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    passes the dpi (dot per inch) from the rendering environment to the extension. Mostly used for printing.

    Parameters:
      `dpi` - the dpi of the rendering environment

  ### setOutputFormat

      void setOutputFormat(java.lang.String outputFormat)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    sets the output format, i.e., HTML, PDF, etc.

    Parameters:
      `outputFormat` - the output format, i.e., html, pdf, etc.

  ### setActionHandler

      void setActionHandler(IHTMLActionHandler ah)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    Parameters:
      `ah` - the HTML action handler used to create a URL based on an action

  ### getImageMIMEType

      java.lang.String getImageMIMEType()

    Returns:
      the image MIME type (e.g. "image/svg+xml")

  ### setSupportedImageFormats

      void setSupportedImageFormats(java.lang.String supportedImageFormats)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    sets the image formats that are supported for this output format. Formats are separated by semi-colon. For example, the argument could be JPG;PNG;BMP;SVG

    Parameters:
      `supportedImageFormats` - the image formats that the presentation engine could support.

  ### deserialize

      void deserialize(java.io.InputStream istream)

    deserializes generation time state information about the extended item

    Parameters:
      `istream` - the input stream to deserialize generation time state from

  ### getOutputType

      int getOutputType()

    returns the output type, which could be IMAGE, TEXT, HTML TEXT, DRAWING, etc. For now, only Image is supported.

    Parameters:
      `mimeType` - an out parameter that returns the MIME type of the output
    Returns:
      output type, for now OUTPUT_AS_IMAGE only

  ### onRowSets

      java.lang.Object onRowSets(IRowSet[] rowSets)
                                 throws BirtException

    Deprecated. since BIRT 2.3

    processes the extended item in report presentation environment.

    Parameters:
      `rowSets` - rowSets an array of row sets that is passed to the extension
    Returns:
      the returned value could be different depending on the type of the output. For image, returns an input stream or byte array that the engine could retrieve data from
    Throws:
      `BirtException` - throws exception when there is a problem processing the extended item

  ### onRowSets

      java.lang.Object onRowSets(IBaseResultSet[] results)
                                 throws BirtException

    Process the extended item. It is called in render time.

    Parameters:
      `results` - results is an array of query results which is passed to the extended item. The extended item could retrieve data from those results.
    Returns:
      The returned value could be different depending on the type of the output. For image, returns an input stream or byte array.
    Throws:
      `BirtException` - Throws exception when there is a problem processing the extended item

  ### getSize

      Size getSize()

    Get the size of the extended item. The size is a Dimension object. The width and height can only be in absolute units (inch, mm, etc.) or pixel. It can not be a relative size such as 150% or 1.2em. Notice that an extended item can obtain its design-time size information by querying DE. This function is needed because the actual size may not be the same as the design-time size.

    Returns:
      the size of the extended item. Return null if the size does not matter or can not be determined.

  ### finish

      void finish()

    Performs clean up work

  ### setDynamicStyle

      void setDynamicStyle(IStyle style)

    Deprecated. implement #init(IReportItemPresentationInfo) instead. Set dynamic style.

  ### setExtendedItemContent

      void setExtendedItemContent(IContent content)

    Deprecated. implement #init(IReportItemPresentationInfo) instead.

    Set the content which is transformed from extended item. Extended item can process some properties itself, such as bookmark, style etc.

    Parameters:
      `content` - content which is transformed from extended item.

  ### getPresentationConfig

      IReportItemPresentationInfo getPresentationConfig()

  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.