Understanding widgets

MBWidget

MBWidget is a parent for all the widgets

Div

Div is a container unit that divides the document into sections and encapsulates other widgets. It implements BorderProperties and ColorProperties.

The available methods are:

Void setFreezeChildren(Boolean freezeChildren); 
boolean isFreezeChildren();
circle-info

setfreezeChildren(true) will render all the child components of Div in a single page.

Example:

Div div = new Div(); 
div.setFreezeChildren(true); 
div.setWidth(200); 
div.setHeight(100); 
div.borders(true); 
div.setBorderColor(Color.decode("#057dcd")); 
Div childDiv1 = new Div();
childDiv1.setWidth(div.getWidth() / 2);
childDiv1.setHeight(90); 
childDiv1.borders(true); 
childDiv1.setBorderColor(Color.decode("#464646")); 
div.appendChild(childDiv1); 
Div childDiv2 = new Div(); 
childDiv2.setWidthPercentage(50); 
childDiv2.setHeight(90); 
childDiv2.borders(true); 
childDiv2.setMarginLeft(childDiv1.getWidth()); 
childDiv2.setBorderColor(Color.decode("#464646")); 
div.appendChild(childDiv2); 
page.addWidget(div);

Table

Table allows you to arrange data like text, images, links, etc. in rows and columns. It implements FontProperties.

The available methods are:

Example:

DataTable

DataTable is a wrapper on top of the Table to provide abstraction of low-level details for table construction like, creating table, row objects etc. It provides methods to deal with data.

The available methods are:

Example:

FormPanel

Formpanel allows you to arrange a row of data in a form-like structure and provides methods to customize the form.

circle-info

The widget uses the properties of its parent component.

Example:

Image

Image is a container to hold an image. You can use all methods of widget provider.

The available constructors are:

Example:

TextBox

TextBox is the wrapper for a paragraph in a PDF. It automatically breaks and aligns the paragraph to fit into its width. You can use all methods of widget provider.

circle-info

The widget uses the properties of its parent component.

Example:

BorderProps

BorderProps can be used to implement methods for creating and customizing borders.

The available methods are:

Example:

ColorPros

ColorPros can be used to implement methods to assign colors.

The available methods are:

Example:

FontPros

FontPros can be used to implement methods to define a font style.

The available methods are:

Example:

PageCounter

PageCounter is the wrapper to render a dynamic value of current page index or total pages count in PDF. You can use all methods of MBWidget provider.

The available methods and expressions are:

Example:

Header is the wrapper for an area at the top of a PDF Page. You can use all methods of the Div provider.

The available methods are:

Example:

Footer is the wrapper for an area at the bottom of a PDF Page. You can use all methods of the Div provider.

The available methods are:

Example:

Last updated