java.lang.Object
org.jfree.chart3d.TitleUtils
Some utility methods for creating chart titles.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic TableElementcreateTitle(String title) Creates a chart title using the default font and alignment.static TableElementCreates a chart title and subtitle using the specified fonts and alignment.static TableElementcreateTitle(String title, String subtitle) Creates a chart title and subtitle using default fonts and left alignment.static TableElementcreateTitle(String title, String subtitle, Anchor2D anchor) Creates a chart title and subtitle (optional) using default fonts and alignment that is standard for the specified anchor point (that is, left alignment when the title is anchored left, center alignment when the title is anchored centrally, and right alignment when the title is anchored to the right).
-
Field Details
-
DEFAULT_TITLE_FONT
The default title font. -
DEFAULT_TITLE_COLOR
The default foreground color for titles. -
DEFAULT_SUBTITLE_FONT
The default sub-title font.
-
-
Method Details
-
createTitle
Creates a chart title using the default font and alignment.- Parameters:
title- the chart title (nullnot permitted).- Returns:
- The chart title.
-
createTitle
Creates a chart title and subtitle using default fonts and left alignment. Thesubtitleis optional.- Parameters:
title- the title text (nullnot permitted).subtitle- the subtitle text (nullpermitted).- Returns:
- A composite title.
-
createTitle
Creates a chart title and subtitle (optional) using default fonts and alignment that is standard for the specified anchor point (that is, left alignment when the title is anchored left, center alignment when the title is anchored centrally, and right alignment when the title is anchored to the right).- Parameters:
title- the title text (nullnot permitted).subtitle- the subtitle text (nullpermitted).anchor- the anchor point (nullnot permitted).- Returns:
- A composite title.
-
createTitle
public static TableElement createTitle(String title, Font titleFont, String subtitle, Font subtitleFont, HAlign alignment) Creates a chart title and subtitle using the specified fonts and alignment.- Parameters:
title- the title text (nullnot permitted).titleFont- the title font (nullnot permitted).subtitle- the subtitle text (nullpermitted).subtitleFont- the subtitle font (nullpermitted).alignment- the horizontal alignment (nullnot permitted).- Returns:
- A chart title (never
null).
-