org.jfree.chart.JFreeChart.getTitle()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(90)

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

JFreeChart.getTitle介绍

[英]Returns the main chart title. Very often a chart will have just one title, so we make this case simple by providing accessor methods for the main title. However, multiple titles are supported - see the #addSubtitle(Title) method.
[中]返回主图表标题。通常一个图表只有一个标题,所以我们通过为主标题提供访问器方法来简化这个案例。但是,支持多个标题-请参阅#addSubtitle(标题)方法。

代码示例

代码示例来源:origin: fossasia/neurolab-desktop

lineChart.getTitle().setFont(new Font("Ubuntu", Font.PLAIN, 20));
lineChart.getPlot().setOutlineStroke(new BasicStroke(3));
lineChart.getCategoryPlot().getRenderer().setSeriesStroke(0, new BasicStroke(3));

代码示例来源:origin: stackoverflow.com

public void setButton(final JFreeChart chart, JButton button) {
  button.addActionListener(new ActionListener() {

    @Override
    public void actionPerformed(ActionEvent e) {
      TextTitle title = chart.getTitle();
      Font font = title.getFont();
      float size = font.getSize();
      title.setFont(font.deriveFont(size + 2));
    }
  });
}

代码示例来源:origin: ca.umontreal.iro/ssj

/**
* Gets the current chart title.
* 
* @return Chart title.
* 
*/
public String getTitle()  {
 return chart.getTitle().getText();
}

代码示例来源:origin: ca.umontreal.iro/ssj

/**
* Gets the current chart title.
* 
* @return Chart title.
* 
*/
public String getTitle()  {
 return chart.getTitle().getText();
}

代码示例来源:origin: ca.umontreal.iro/ssj

/**
* Gets the current chart title.
* 
* @return Chart title.
* 
*/
public String getTitle()  {
 return chart.getTitle().getText();
}

代码示例来源:origin: Audiveris/audiveris

/**
 * Wrap chart into a frame with chart title and display at provided location.
 *
 * @param location frame location
 */
public void display (Point location)
{
  display(chart.getTitle().getText(), location);
}

代码示例来源:origin: ExpediaDotCom/adaptive-alerting

public AnomalyChartSink(JFreeChart chart, ChartSeries chartSeries) {
  notNull(chart, "chart can't be null");
  notNull(chartSeries, "chartSeries can't be null");
  
  this.chart = chart;
  this.chartSeries = chartSeries;
  this.baseTitle = chart.getTitle().getText();
}

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

public static void showDialog(JFreeChart chart, boolean modal) {
  JDialog dialog = newChartDialog(chart, chart.getTitle().getText(), modal);
  SwingUtils.showWindow(dialog, modal);
}

代码示例来源:origin: matsim-org/matsim

public static void showFrame(JFreeChart chart) {
  ChartFrame frame = new ChartFrame(chart.getTitle().getText(), chart);
  SwingUtils.showWindow(frame, false);
}

代码示例来源:origin: lessthanoptimal/Java-Matrix-Benchmark

public void displayWindow(int width, int height) {
  ChartFrame window = new ChartFrame(chart.getTitle().getText(),chart);
  window.setMinimumSize(new Dimension(width,height));
  window.setPreferredSize(window.getMinimumSize());
  window.setVisible(true);
}

代码示例来源:origin: lessthanoptimal/Java-Matrix-Benchmark

public void displayWindow(int width, int height) {
  ChartFrame window = new ChartFrame(chart.getTitle().getText(),chart);
  window.setMinimumSize(new Dimension(width,height));
  window.setPreferredSize(window.getMinimumSize());
  window.setVisible(true);
}

代码示例来源:origin: lessthanoptimal/Java-Matrix-Benchmark

public void displayWindow(int width, int height) {
  JFreeChart chart = createChart();
  ChartFrame window = new ChartFrame(chart.getTitle().getText(),chart);
  window.setMinimumSize(new Dimension(width,height));
  window.setPreferredSize(window.getMinimumSize());
  window.setVisible(true);
}

代码示例来源:origin: org.gephi/datalab-plugin

private void configureBoxPlotButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configureBoxPlotButtonActionPerformed
  prepareBoxPlot();
  if (boxPlotDialog != null) {
    boxPlotDialog.setVisible(true);
  } else {
    boxPlotDialog = new JFreeChartDialog(WindowManager.getDefault().getMainWindow(), boxPlot.getTitle().getText(), boxPlot, 300, 500);
  }
}//GEN-LAST:event_configureBoxPlotButtonActionPerformed

代码示例来源:origin: org.gephi/datalab-plugin

private void configurePieChartButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configurePieChartButtonActionPerformed
  if (pieChart == null) {
    pieChart = manipulator.buildPieChart(valuesFrequencies);
  }
  if (pieChartDialog != null) {
    pieChartDialog.setVisible(true);
  } else {
    pieChartDialog = new JFreeChartDialog(WindowManager.getDefault().getMainWindow(), pieChart.getTitle().getText(), pieChart, 1000, 1000);
  }
}//GEN-LAST:event_configurePieChartButtonActionPerformed

代码示例来源:origin: org.gephi/datalab-plugin

private void configureHistogramButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configureHistogramButtonActionPerformed
  prepareHistogram();
  if (histogramDialog != null) {
    histogramDialog.setVisible(true);
  } else {
    histogramDialog = new JFreeChartDialog(WindowManager.getDefault().getMainWindow(), histogram.getTitle().getText(), histogram, 600, 400);
  }
}//GEN-LAST:event_configureHistogramButtonActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables

代码示例来源:origin: org.gephi/datalab-plugin

private void configureScatterPlotButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configureScatterPlotButtonActionPerformed
  prepareScatterPlot();
  if (scatterPlotDialog != null) {
    scatterPlotDialog.setVisible(true);
  } else {
    scatterPlotDialog = new JFreeChartDialog(WindowManager.getDefault().getMainWindow(), scatterPlot.getTitle().getText(), scatterPlot, 600, 400);
  }
}//GEN-LAST:event_configureScatterPlotButtonActionPerformed

代码示例来源:origin: com.atlassian.confluence.extra.chart/chart-plugin

public static void setDefaults(JFreeChart chart)
{
  chart.setBackgroundPaint(ChartDefaults.transparent);
  chart.setBorderVisible(false);
  chart.getPlot().setNoDataMessage("No Data Available");
  setupPlot(chart.getPlot());
  ChartUtil.setupTextTitle(chart.getTitle());
  ChartUtil.setupLegendTitle(chart.getLegend());
}

代码示例来源:origin: com.atlassian.jira/jira-api

public static void setDefaults(JFreeChart chart, final I18nHelper i18nHelper)
{
  chart.setBackgroundPaint(Color.WHITE);
  chart.setBorderVisible(false);
  chart.getPlot().setNoDataMessage(i18nHelper.getText("gadget.charts.no.data"));
  setupPlot(chart.getPlot());
  ChartUtil.setupTextTitle(chart.getTitle());
  ChartUtil.setupLegendTitle(chart.getLegend());
}

代码示例来源:origin: superad/pdf-kit

private  void  initDefaultPlot(JFreeChart  chart,DefaultCategoryDataset dataSet){
  //设置公共颜色
  chart.getTitle().setFont(FontUtil.getFont(Font.PLAIN, 15)); // 设置标题字体
  chart.getLegend().setItemFont(FontUtil.getFont(Font.PLAIN, 13));// 设置图例类别字体
  chart.setBackgroundPaint(Color.white);// 设置背景色
  CategoryPlot plot = chart.getCategoryPlot();
  plot.setNoDataMessage("无对应的数据。");
  plot.setNoDataMessageFont(FontUtil.getFont(Font.PLAIN, 13));//字体的大小
  plot.setNoDataMessagePaint(Color.RED);//字体颜色
  //设置自定义颜色
  initPlot(chart,dataSet);
}

相关文章