Task 7: Create a Java class
In this procedure, create a Java class that contains the code to generate the XML data required by the Flash chart. This class implements the data extraction interface, IDataExtractionExtension.
1 In Package Explorer, right-click the src folder, then choose New➛Class.
2 In New Java Class, specify the following information:
1 In Package, type:
com.actuate.birt.flash.library.sample.combchart
2 In Name, type:
XMLGenerator
3 In Interfaces, choose Add to add the data extraction interface.
4 In Implemented Interfaces Selection, select IDataExtractionExtension. If the dialog box does not display any interfaces, do the following:
Under Choose interfaces, type:
IDataE
Matching items lists the interfaces that begin with IDataE.
Select IDataExtractionExtension.
Choose OK.
5 Use the default values for the other options.
Figure 15‑31 shows the properties for the class.
Figure 15‑31 Properties for the class
6 Choose Finish. In Package Explorer, the class, XMLGenerator.java, appears in the plug-in’s src folder. The content of XMLGenerator.java appears in the editor, as shown in
Figure 15‑32.
Figure 15‑32 Code template for XMLGenerator.java