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

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

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

JFreeChart.addChangeListener介绍

[英]Registers an object for notification of changes to the chart.
[中]注册对象以通知图表的更改。

代码示例

代码示例来源:origin: jfree/jfreechart

/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
  throws IOException, ClassNotFoundException {
  stream.defaultReadObject();
  this.zoomFillPaint = SerialUtils.readPaint(stream);
  this.zoomOutlinePaint = SerialUtils.readPaint(stream);
  // we create a new but empty chartMouseListeners list
  this.chartMouseListeners = new EventListenerList();
  // register as a listener with sub-components...
  if (this.chart != null) {
    this.chart.addChangeListener(this);
  }
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
  throws IOException, ClassNotFoundException {
  stream.defaultReadObject();
  this.zoomFillPaint = SerialUtilities.readPaint(stream);
  this.zoomOutlinePaint = SerialUtilities.readPaint(stream);
  // we create a new but empty chartMouseListeners list
  this.chartMouseListeners = new EventListenerList();
  // register as a listener with sub-components...
  if (this.chart != null) {
    this.chart.addChangeListener(this);
  }
}

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

chart.getLegend().setPosition(RectangleEdge.RIGHT);
chart.addChangeListener(new ChartChangeListener() {

代码示例来源:origin: jfree/jfreechart

this.chart.addChangeListener(this);
this.chart.addProgressListener(this);
Plot plot = chart.getPlot();

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

this.chart.addChangeListener(this);
this.chart.addProgressListener(this);
Plot plot = chart.getPlot();

代码示例来源:origin: io.github.benas.cb4j/cb4j-tools

private JFreeChart createChart(final CategoryDataset dataset) {
  final JFreeChart chart = ChartFactory.createBarChart(
      null, null, null, dataset,
      PlotOrientation.VERTICAL, false, true, false);
  chart.setBackgroundPaint(Color.white);
  CategoryPlot localCategoryPlot = (CategoryPlot)chart.getPlot();
  localCategoryPlot.setDomainGridlinesVisible(true);
  CustomBarRenderer localCustomBarRenderer = new CustomBarRenderer(arrayOfPaint);
  localCustomBarRenderer.setBarPainter(new StandardBarPainter());
  localCustomBarRenderer.setDrawBarOutline(true);
  localCustomBarRenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
  localCustomBarRenderer.setBaseItemLabelsVisible(true);
  localCategoryPlot.setRenderer(localCustomBarRenderer);
  chart.addChangeListener(new UpdateChartChangeListener());
  return chart;
}

相关文章