Using Java Beans is a flexible way to insert your own elements into a report. A Java Bean element is a view of a lightweight Java bean class that extends Component (for example javax.swing.JButton). The public properties (member variables) of a Java Bean can be assigned to static or formula values in the Java Bean properties dialog. At design time the Java Bean properties are set and a 'screenshot' of the bean is inserted into the report.
Please note that the Java classes you would like to add as Java Beans must be in the classpath of i-net Designer.
When you select Insert->Java Bean (or press the Java Bean toolbar button) you see the 'Add Java Bean' dialog which shows the Java Beans currently available to use in the report. To add a Java Bean to this list type in the beans class name in the class name field an press the add button. From the list select the Java Bean you would like to add to the report (see below section: Example beans) then press the OK button and insert the Java Bean into the desired report location by dragging the mouse.
Once the Java Bean is placed in the report you can select 'Properties...' in the context menu and change the bean properties in the category: 'JavaBean'.
i-net Designer comes with 5 built in example Java Beans demonstrating the abilities of JavaBeans, a simple progress bar and a simple calendar are described below. The progress bar typically shows the progress of a task:
The class name of the example progress bar is "com.inet.report.beans.ProgressBar" and it has the following properties:
the bar color is the elements Font color, which is automatically set to the foreground of the Java Bean.
The second example Java Bean is a simple calendar showing one month and highlighting the current day:
The class name of the simple calendar is "com.inet.report.beans.SimpleCalendar"and it has the following properties:
The following beans were supported also:
During setup you can choose to install some third party JavaBeans as well. The following section will list these supported JavaBeans.
Gauge Bean is a JavaBean which can display Gauge charts in the report.
JBarcodeBean is a JavaBean which can display barcodes of different types. It is recommended to use this JavaBean instead of a barcode font. For more details about JBarcodeBean please visit the homepage http://jbarcodebean.sourceforge.net/
The class name of JBarcodeBean is "jbarcodebean.JBarcodeBean"and it has the following properties:
JEuclid is a JavaBean which can display mathematical equations defined in MathML. For more details about JEuclid please visit the homepage http://jeuclid.sourceforge.net/
The class name of JEuclid is: "net.sourceforge.jeuclid.swing.JMathComponent" and it has the following properties:
SVG is a JavaBean which can display a SVG file using the library svgSalamander-tiny.jar. The class name of SVG is "com.inet.report.beans.SVG"and it has the following properties: