<!ELEMENT extension (reportItem+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT reportItem EMPTY>
<!ATTLIST reportItem
name CDATA #REQUIRED
class CDATA #REQUIRED
supportedFormats CDATA #IMPLIED>
IReportItemPresentation
<extension point=
"org.eclipse.birt.report.engine.reportitempresentation"
name=
"chart presentation extension"
>
<reportItem name=
"org.eclipse.birt.chart"
class=
"org.eclipse.birt.report.chartitem.ChartPresentation"
supportedFormats=
"FO,HTML,PDF"
/>
</extension>
org.eclipse.birt.engine.extension.IReportItemPresentation
. The interface provides the following functions:
public void setModelObject(ExtendedItemHandle handle)
----
passes the model object to the extension provider. public void setResolution(int dpi)
----
passes the rendering environment resolution (dpi, i.e., dot per inch) to extension provider.public void setOutputFormat(String outputFormat)
----
passes the output format, i.e., HTMl, PDF, etc. to extension provider.public void setSupportedImageFormats(String supportedImageFormats)
----
passes the supported image formats in the rendering environments to the extension provider. Image formats are separated by semi-colon. For example, the argument could be JPG;PNG;BMP;SVGpublic void setLocale(Locale locale)
---- passes the rendering locale to the extension provider.public Object onRowSets(IRowSet[] rowSets) throws BirtException
----
processes the extended item in report presentation environment. The data that the report item needs is passed in through the rowSets array. The return value captures the presentation time output of the report item, and differs for different rendering primitives. public void deserialize(InputStream istream)
----
deserializes the report item generation time statepublic int getOutputType(String mimeType)
----
returns the output type, which could be one of the supported primitive, i.e., image, string, html segment, etc.public void Size getSize()
----
gets 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. 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.public void finish()
----
performs cleanup jobs
Copyright (c) 2005 Actuate Corporation. All rights reserved. This program and
the accompanying materials are made available under the terms of the Eclipse
Public License v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors: Actuate Corporation - initial API and implementation