* Adding many autotexts in the same position (header/footer and
* aligment) makes them to be one on top of the other
*/
Style atStyle = new StyleBuilder(true).setFont(Font.COMIC_SANS_SMALL).setTextColor(Color.red).build();
AutoText created = new AutoText(Labels.getLabel("common.Created") + ": " + ZksampleDateFormat.getDateTimeFormater().format(new Date()), AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
created.setWidth(new Integer(120));
created.setStyle(atStyle);
drb.addAutoText(created);
AutoText autoText = new AutoText(AutoText.AUTOTEXT_PAGE_X_SLASH_Y, AutoText.POSITION_HEADER, HorizontalBandAlignment.RIGHT);
autoText.setWidth(new Integer(20));
autoText.setStyle(atStyle);
drb.addAutoText(autoText);
AutoText atCustomerHeader = new AutoText(Labels.getLabel("orderDialogWindow.title") + " : " + getOrder().getAufBezeichnung(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
atCustomerHeader.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
atCustomerHeader.setStyle(subtitleStyleUL);
AutoText name1 = new AutoText(getCustomer().getKunName1(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
name1.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
AutoText name2 = new AutoText(getCustomer().getKunName2(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
name2.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
AutoText city = new AutoText(getCustomer().getKunOrt(), AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
city.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
AutoText emptyLine = new AutoText("", AutoText.POSITION_HEADER, HorizontalBandAlignment.LEFT);
emptyLine.setPrintWhenExpression(ExpressionHelper.printInFirstPage());
drb.addAutoText(atCustomerHeader).addAutoText(emptyLine).addAutoText(name1).addAutoText(name2).addAutoText(city).addAutoText(emptyLine);
// Footer
AutoText footerText = new AutoText("Help to prevent the global warming by writing cool software.", AutoText.POSITION_FOOTER, HorizontalBandAlignment.CENTER);
footerText.setStyle(footerStyle);
drb.addAutoText(footerText);
/**
* Columns Definitions. A new ColumnBuilder instance for each column.
*/