Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323905 - How to get a custom property of a text item in emitter?
Summary: How to get a custom property of a text item in emitter?
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 08:04 EDT by Ivan CLA
Modified: 2011-05-26 13:32 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan CLA 2010-08-29 08:04:12 EDT
Build Identifier: 2.5.2

I need to implement an editable text field in PDF with iText and BIRT 2.5.2.

Suppose that we creat a cell like following:

<cell id="5737">
<property name="colSpan">5</property>
<property name="rowSpan">1</property>
<property name="paddingLeft">15pt</property>
<property name="textAlign">left</property>

<property name="CUST_PROPERTY">left</property>

<text id="57371">

<property name="CUST_PROPERTY_2">left</property>

<property name="contentType">html</property>
<text-property name="content"><![CDATA[<B>Content</B>]]></text-property >
</text>
</cell>

In BIRT 2.3.2, ITextArea has the Interface getContent(), but in 2.5.2, that remove the method, so my question is:
In Emitter method
protected void drawTextAt( ITextArea text, int x, int y, int width, int height, TextStyle textInfo )
How can I get custom defined propery "CUST_PROPERTY" or "CUST_PROPERTY_2" here?

Thanks,

Reproducible: Always

Steps to Reproduce:
Developing
Comment 1 Jun Ouyang CLA 2011-03-28 22:30:52 EDT
Please override method startText(ITextContext text) in org.eclipse.birt.report.engine.layout.emitter.PageEmitter. You can get text content from the argument and the corresponding textArea by text.getExtension( IContent.LAYOUT_EXTENSION ).