PDA

View Full Version : Multi-lines



Anonymous
06-15-2002, 01:51 AM
Hi,

I have just tryed the JFreeReport and I think it's very usefull.

I am not able to show a very long field (multi lines) in more than one line.

Can anyone help ?

Thanks

Regards

Fab.

Anonymous
06-18-2002, 03:26 AM
Hi,

For multiline elements you have to ensure that your elements height is at least twice the height of your font.

The number of text-lines in the element is calculated by using the formula

int maxLinesToDisplay = (int) (elementHeight / fontheight);

If maxLinesToDisplay is lesser than two lines, a single line print is assumed, the text will be displayed with full length on a single line. This behaviour is backward compatiblity with the old TextElements behaviour.

If maxLinesToDisplay is two or more lines, the text is broken into multiple lines, and if the last line is to long to be printed, the text is shortened and a "..." is appended.

Have more fun,

said Thomas