RectangleEdge titleEdge = getEdge(chartSettings.getTitlePosition(), RectangleEdge.TOP);
if (titleText != null)
{
TextTitle title = jfreechart.getTitle();
title.setText(titleText);
if(chartSettings.getTitleColor() != null)
{
title.setPaint(chartSettings.getTitleColor());
}
title.setFont(titleFont);
title.setPosition(titleEdge);
jfreechart.setTitle(title);
}
String subtitleText = spiderchartBean.getSubtitleText();
if (subtitleText != null)
{
TextTitle subtitle = new TextTitle(subtitleText);
subtitle.setText(subtitleText);
if(chartSettings.getSubtitleColor() != null)
{
subtitle.setPaint(chartSettings.getSubtitleColor());
}
if(chartSettings.getSubtitleColor() != null)
{
Font subtitleFont = chartSettings.getSubtitleFont() != null
? JRFontUtil.getAwtFont(chartSettings.getSubtitleFont(), Locale.getDefault())
: TextTitle.DEFAULT_FONT;
subtitle.setFont(subtitleFont);
}
subtitle.setPosition(titleEdge);
jfreechart.addSubtitle(subtitle);
}
// Apply all of the legend formatting options