band = new JRDesignBand();
getDesign().setTitle(band);
}
}
JRDesignExpression printWhenExpression = new JRDesignExpression();
printWhenExpression.setValueClass(Boolean.class);
printWhenExpression.setText(EXPRESSION_TRUE_WHEN_FIRST_PAGE);
JRDesignTextField title = new JRDesignTextField();
JRDesignExpression exp = new JRDesignExpression();
exp.setText("\"" + getReport().getTitle() + "\"");
exp.setValueClass(String.class);
title.setExpression(exp);
title.setWidth(getReport().getOptions().getPrintableWidth());
title.setHeight(getReport().getOptions().getTitleHeight().intValue());
title.setY(yOffset);
title.setPrintWhenExpression(printWhenExpression);
title.setRemoveLineWhenBlank(true);
applyStyleToElement(getReport().getTitleStyle(), title);
title.setStretchType(JRGraphicElement.STRETCH_TYPE_NO_STRETCH);
band.addElement(title);
JRDesignTextField subtitle = new JRDesignTextField();
if (getReport().getSubtitle() != null) {
JRDesignExpression exp2 = new JRDesignExpression();
exp2.setText("\"" + getReport().getSubtitle() + "\"");
exp2.setValueClass(String.class);
subtitle.setExpression(exp2);
subtitle.setWidth(getReport().getOptions().getPrintableWidth());
subtitle.setHeight(getReport().getOptions().getSubtitleHeight().intValue());
subtitle.setY(title.getY() + title.getHeight());
subtitle.setPrintWhenExpression(printWhenExpression);