{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Java Beans

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.

Usage:

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'.

Example beans:

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:

pbar.jpg

The class name of the example progress bar is "com.inet.report.beans.ProgressBar" and it has the following properties:

  • minimum - the minimum value (default 0)
  • maximum - the maximum value (default 100)
  • value - the current value (default 50)
  • alignLeft - align the bar left if true, align right otherwise (default true)

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:

  • date - the date to be shown (default current date)
  • titleBackground - the color of the title background (default dark blue)
  • titleFontColor - the color of the title font (default white)
  • selectedFontColor - the color of the highlighted days font (default black)
  • selectedBackground - the background color of the highlighted days cell (default orange)
  • cellFontSize - the font size of the day cells (default 12)
  • drawGrid - if true a grid is drawn (default true)

The following beans were supported also:

  • A simple diagonal line. The class name is "com.inet.report.beans.DiagonalLine"
  • A bean loading images from a path or URL. The class name is "com.inet.report.beans.Image"
  • A bean displaying the content of a web site. The class name is "com.inet.report.beans.Html"

External Beans:

During setup you can choose to install some third party JavaBeans as well. The following section will list these supported JavaBeans.

Gauge Bean

Gauge Bean is a JavaBean which can display Gauge charts in the report.

gauge.jpg

JBarcodeBean

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:

  • checkDigit - indicates if a checksum should be used
  • code - the barcode to display
  • codeType - the type of barcode to use
  • showText - indicates if the barcode should be shown as text representation too

JEuclid

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:

  • content - the MathML content defined in XML
  • horizontalAlignment - the horizontal alignment of the content
  • verticalAlignment - the vertical alignment of the content

SVG

SVG is a JavaBean which can display a SVG file using the svgSalamander library. The class name of SVG is "com.inet.report.beans.SVG"and it has the following properties:

  • drawAntialiased - indicates whether antialiasing should be used or not
  • keepRatio - keep the ratio of width/height when the size of the bean has been changed
  • originalSize - indicates if the original size or a scaled version of the SVG should be used
  • pathOrUrlToSVG - a file path or an URL to the SVG file
i-net Clear Reports
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - JavaBeans