本文整理了Java中org.jfree.chart.title.TextTitle.setPaint()
方法的一些代码示例,展示了TextTitle.setPaint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextTitle.setPaint()
方法的具体详情如下:
包路径:org.jfree.chart.title.TextTitle
类名称:TextTitle
方法名:setPaint
[英]Sets the paint used to display the title string. Registered listeners are notified that the title has been modified.
[中]设置用于显示标题字符串的绘制。已注册的听众将收到标题已被修改的通知。
代码示例来源:origin: org.jwall/streams-plotter
public void setTitle(String title) {
chart.setTitle(title);
chart.getTitle().setPaint(Color.DARK_GRAY);
}
代码示例来源:origin: com.atlassian.jira/jira-api
public static void setupTextTitle(TextTitle title)
{
if (title != null)
{
title.setFont(ChartDefaults.titleFont);
title.setTextAlignment(HorizontalAlignment.LEFT);
title.setPaint(ChartDefaults.titleTextColor);
title.setBackgroundPaint(ChartDefaults.transparent);
}
}
代码示例来源:origin: com.atlassian.confluence.extra.chart/chart-plugin
public static void setupTextTitle(TextTitle title)
{
if (title != null) {
title.setFont(ChartDefaults.titleFont);
title.setTextAlignment(HorizontalAlignment.LEFT);
title.setPaint(ChartDefaults.titleTextColor);
title.setBackgroundPaint(ChartDefaults.transparent);
}
}
代码示例来源:origin: afranken/jmeter-analysis-maven-plugin
public static JFreeChart createJFreeChart(String title, XYPlot result, int imageHeight) {
JFreeChart chart = new JFreeChart(title, result);
chart.getLegend().setPosition(RectangleEdge.TOP);
chart.getLegend().setHorizontalAlignment(HorizontalAlignment.LEFT);
chart.getLegend().setFrame(BlockBorder.NONE);
chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, imageHeight, new Color(229, 236, 246)));
chart.getTitle().setFont(new Font("SansSerif", Font.PLAIN | Font.BOLD, 16));
chart.getTitle().setPaint(Color.GRAY);
return chart;
}
}
代码示例来源:origin: org.n52.series-api/io
private void addNotice(JFreeChart chart) {
TextTitle notice = new TextTitle();
String msg = i18n.get("msg.io.chart.notice");
if (msg != null && !msg.isEmpty()) {
notice.setText(msg);
notice.setPaint(Color.BLACK);
notice.setFont(LabelConstants.FONT_LABEL_SMALL);
notice.setPosition(RectangleEdge.BOTTOM);
notice.setHorizontalAlignment(HorizontalAlignment.RIGHT);
notice.setVerticalAlignment(VerticalAlignment.BOTTOM);
notice.setPadding(new RectangleInsets(0, 0, 20, 20));
chart.addSubtitle(notice);
}
}
代码示例来源:origin: org.n52.sensorweb/timeseries-io
private void addNotice(JFreeChart chart) {
TextTitle notice = new TextTitle();
String msg = i18n.get("notice");
if (msg != null && !msg.isEmpty()) {
notice.setText(msg);
notice.setPaint(BLACK);
notice.setFont(FONT_LABEL_SMALL);
notice.setPosition(RectangleEdge.BOTTOM);
notice.setHorizontalAlignment(HorizontalAlignment.RIGHT);
notice.setVerticalAlignment(VerticalAlignment.BOTTOM);
notice.setPadding(new RectangleInsets(0, 0, 20, 20));
chart.addSubtitle(notice);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Applies this theme to the supplied chart.
*
* @param chart the chart (<code>null</code> not permitted).
*/
public void apply(JFreeChart chart) {
if (chart == null) {
throw new IllegalArgumentException("Null 'chart' argument.");
}
TextTitle title = chart.getTitle();
if (title != null) {
title.setFont(this.extraLargeFont);
title.setPaint(this.titlePaint);
}
int subtitleCount = chart.getSubtitleCount();
for (int i = 0; i < subtitleCount; i++) {
applyToTitle(chart.getSubtitle(i));
}
chart.setBackgroundPaint(this.chartBackgroundPaint);
// now process the plot if there is one
Plot plot = chart.getPlot();
if (plot != null) {
applyToPlot(plot);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam-pdf
public void configureTitle(TextTitle chartTitle) {
if (chartTitle != null) {
if (findColor(getTitleBackgroundPaint()) != null) {
chartTitle.setBackgroundPaint(findColor(getTitleBackgroundPaint()));
}
if (findColor(getTitlePaint()) != null) {
chartTitle.setPaint(findColor(getTitlePaint()));
}
}
}
代码示例来源:origin: jfree/jfreechart
TextTitle tt = (TextTitle) title;
tt.setFont(this.largeFont);
tt.setPaint(this.subtitlePaint);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
TextTitle tt = (TextTitle) title;
tt.setFont(this.largeFont);
tt.setPaint(this.subtitlePaint);
代码示例来源:origin: jfree/eastwood
for (int i = 0; i < s.length; i++) {
TextTitle t = new TextTitle(s[i].replace('+', ' '));
t.setPaint(Color.gray);
if (t instanceof TextTitle) {
TextTitle tt = (TextTitle) t;
tt.setPaint(color);
tt.setFont(font.deriveFont((float) size));
代码示例来源:origin: jfree/jfreechart
/**
* Sets the properties of the specified title to match the properties
* defined on this panel.
*
* @param chart the chart whose title is to be modified.
*/
public void setTitleProperties(JFreeChart chart) {
if (this.showTitle) {
TextTitle title = chart.getTitle();
if (title == null) {
title = new TextTitle();
chart.setTitle(title);
}
title.setText(getTitleText());
title.setFont(getTitleFont());
title.setPaint(getTitlePaint());
}
else {
chart.setTitle((TextTitle) null);
}
}
代码示例来源:origin: jfree/jfreechart
/**
* Applies this theme to the supplied chart.
*
* @param chart the chart ({@code null} not permitted).
*/
@Override
public void apply(JFreeChart chart) {
Args.nullNotPermitted(chart, "chart");
TextTitle title = chart.getTitle();
if (title != null) {
title.setFont(this.extraLargeFont);
title.setPaint(this.titlePaint);
}
int subtitleCount = chart.getSubtitleCount();
for (int i = 0; i < subtitleCount; i++) {
applyToTitle(chart.getSubtitle(i));
}
chart.setBackgroundPaint(this.chartBackgroundPaint);
// now process the plot if there is one
Plot plot = chart.getPlot();
if (plot != null) {
applyToPlot(plot);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Sets the properties of the specified title to match the properties
* defined on this panel.
*
* @param chart the chart whose title is to be modified.
*/
public void setTitleProperties(JFreeChart chart) {
if (this.showTitle) {
TextTitle title = chart.getTitle();
if (title == null) {
title = new TextTitle();
chart.setTitle(title);
}
title.setText(getTitleText());
title.setFont(getTitleFont());
title.setPaint(getTitlePaint());
}
else {
chart.setTitle((TextTitle) null);
}
}
代码示例来源:origin: net.imagej/imagej-ui-swing
private final void setBackgroundDefault(final JFreeChart chart) {
final BasicStroke gridStroke =
new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND,
1.0f, new float[] { 2.0f, 1.0f }, 0.0f);
final XYPlot plot = (XYPlot) chart.getPlot();
plot.setRangeGridlineStroke(gridStroke);
plot.setDomainGridlineStroke(gridStroke);
plot.setBackgroundPaint(new Color(235, 235, 235));
plot.setRangeGridlinePaint(Color.white);
plot.setDomainGridlinePaint(Color.white);
plot.setOutlineVisible(false);
plot.getDomainAxis().setAxisLineVisible(false);
plot.getRangeAxis().setAxisLineVisible(false);
plot.getDomainAxis().setLabelPaint(Color.gray);
plot.getRangeAxis().setLabelPaint(Color.gray);
plot.getDomainAxis().setTickLabelPaint(Color.gray);
plot.getRangeAxis().setTickLabelPaint(Color.gray);
final TextTitle title = chart.getTitle();
if (title != null) title.setPaint(Color.black);
}
代码示例来源:origin: net.imglib2/imglib2-script
static private final void setBackgroundDefault(final JFreeChart chart) {
BasicStroke gridStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[]{2.0f, 1.0f}, 0.0f);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setRangeGridlineStroke(gridStroke);
plot.setDomainGridlineStroke(gridStroke);
plot.setBackgroundPaint(new Color(235, 235, 235));
plot.setRangeGridlinePaint(Color.white);
plot.setDomainGridlinePaint(Color.white);
plot.setOutlineVisible(false);
plot.getDomainAxis().setAxisLineVisible(false);
plot.getRangeAxis().setAxisLineVisible(false);
plot.getDomainAxis().setLabelPaint(Color.gray);
plot.getRangeAxis().setLabelPaint(Color.gray);
plot.getDomainAxis().setTickLabelPaint(Color.gray);
plot.getRangeAxis().setTickLabelPaint(Color.gray);
chart.getTitle().setPaint(Color.gray);
}
}
代码示例来源:origin: net.imglib2/imglib2-script
static private void setBackgroundDefault(final JFreeChart chart) {
BasicStroke gridStroke = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[]{2.0f, 1.0f}, 0.0f);
CategoryPlot plot = (CategoryPlot) chart.getPlot();
plot.setRangeGridlineStroke(gridStroke);
plot.setDomainGridlineStroke(gridStroke);
plot.setBackgroundPaint(new Color(235, 235, 235));
plot.setRangeGridlinePaint(Color.white);
plot.setDomainGridlinePaint(Color.white);
plot.setOutlineVisible(false);
plot.getDomainAxis().setAxisLineVisible(false);
plot.getRangeAxis().setAxisLineVisible(false);
plot.getDomainAxis().setLabelPaint(Color.gray);
plot.getRangeAxis().setLabelPaint(Color.gray);
plot.getDomainAxis().setTickLabelPaint(Color.gray);
plot.getRangeAxis().setTickLabelPaint(Color.gray);
chart.getTitle().setPaint(Color.gray);
}
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core
title.setPaint(params.getColor(prefix + ChartParams.TITLE_COLOR_SUFFIX));
代码示例来源:origin: jasperreports/jasperreports
title.setPaint(getChart().getTitleColor());
subtitle.setPaint(getChart().getSubtitleColor());
内容来源于网络,如有侵权,请联系作者删除!