org.jfree.chart.title.TextTitle.setTextAlignment()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.jfree.chart.title.TextTitle.setTextAlignment()方法的一些代码示例,展示了TextTitle.setTextAlignment()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextTitle.setTextAlignment()方法的具体详情如下:
包路径:org.jfree.chart.title.TextTitle
类名称:TextTitle
方法名:setTextAlignment

TextTitle.setTextAlignment介绍

[英]Sets the text alignment and sends a TitleChangeEvent to all registered listeners.
[中]设置文本对齐方式,并向所有注册的侦听器发送TitleChange事件。

代码示例

代码示例来源: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: senbox-org/snap-desktop

private void setPlotMessage(String messageText) {
  chart.getXYPlot().clearAnnotations();
  TextTitle tt = new TextTitle(messageText);
  tt.setTextAlignment(HorizontalAlignment.RIGHT);
  tt.setFont(chart.getLegend().getItemFont());
  tt.setBackgroundPaint(new Color(200, 200, 255, 50));
  tt.setFrame(new BlockBorder(Color.white));
  tt.setPosition(RectangleEdge.BOTTOM);
  XYTitleAnnotation message = new XYTitleAnnotation(0.5, 0.5, tt, RectangleAnchor.CENTER);
  chart.getXYPlot().addAnnotation(message);
}

代码示例来源:origin: bcdev/beam

private void setPlotMessage(String messageText) {
  chart.getXYPlot().clearAnnotations();
  TextTitle tt = new TextTitle(messageText);
  tt.setTextAlignment(HorizontalAlignment.RIGHT);
  tt.setFont(chart.getLegend().getItemFont());
  tt.setBackgroundPaint(new Color(200, 200, 255, 50));
  tt.setFrame(new BlockBorder(Color.white));
  tt.setPosition(RectangleEdge.BOTTOM);
  XYTitleAnnotation message = new XYTitleAnnotation(0.5, 0.5, tt, RectangleAnchor.CENTER);
  chart.getXYPlot().addAnnotation(message);
}

代码示例来源:origin: bcdev/beam

tt.setTextAlignment(HorizontalAlignment.RIGHT);
tt.setFont(chart.getLegend().getItemFont());
tt.setBackgroundPaint(new Color(200, 200, 255, 100));

代码示例来源:origin: senbox-org/snap-desktop

tt.setTextAlignment(HorizontalAlignment.RIGHT);
tt.setFont(chart.getLegend().getItemFont());
tt.setBackgroundPaint(new Color(200, 200, 255, 100));

相关文章