else if ("right".equals(alignParam))
align = HorizontalAlignment.RIGHT;
}
*/
if (title != null || "title".equals(type)) {
TextTitle tt = null;
if ("subtitle".equals(type)) {
// search for subtitle
List subTitles = localChart.getSubtitles();
Iterator iter = subTitles.iterator();
while (iter.hasNext()) {
Object o = iter.next();
if (o instanceof TextTitle) {
tt = (TextTitle) o;
break;
}
}
if (tt == null) {
tt = new TextTitle(title);
localChart.addSubtitle(tt);
}
} else {
tt = localChart.getTitle();
}
Font font = new Font(fontName,
(isBold ? Font.BOLD : 0) + (isItalic ? Font.ITALIC : 0),
fontSize);
tt.setFont(font);
if (paint != null)
tt.setPaint(paint);
if (backgroundPaint != null)
tt.setBackgroundPaint(backgroundPaint);
}
}