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

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

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

JFreeChart.setNotify介绍

[英]Sets a flag that controls whether or not listeners receive ChartChangeEvent notifications.
[中]设置一个标志,用于控制侦听器是否接收ChartChangeEvent通知。

代码示例

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

/**
 * Sets the title list for the chart (completely replaces any existing
 * titles) and sends a {@link ChartChangeEvent} to all registered
 * listeners.
 *
 * @param subtitles  the new list of subtitles (<code>null</code> not
 *                   permitted).
 *
 * @see #getSubtitles()
 */
public void setSubtitles(List subtitles) {
  if (subtitles == null) {
    throw new NullPointerException("Null 'subtitles' argument.");
  }
  setNotify(false);
  clearSubtitles();
  Iterator iterator = subtitles.iterator();
  while (iterator.hasNext()) {
    Title t = (Title) iterator.next();
    if (t != null) {
      addSubtitle(t);
    }
  }
  setNotify(true);  // this fires a ChartChangeEvent
}

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

/**
 * Sets the title list for the chart (completely replaces any existing
 * titles) and sends a {@link ChartChangeEvent} to all registered
 * listeners.
 *
 * @param subtitles  the new list of subtitles ({@code null} not
 *                   permitted).
 *
 * @see #getSubtitles()
 */
public void setSubtitles(List<Title> subtitles) {
  Args.nullNotPermitted(subtitles, "subtitles");
  setNotify(false);
  clearSubtitles();
  for (Title t: subtitles) {
    if (t != null) {
      addSubtitle(t);
    }
  }
  setNotify(true);  // this fires a ChartChangeEvent
}

代码示例来源:origin: org.activecomponents.jadex/jadex-applications-micro

/**
 *  Create a chart with the underlying dataset.
 *  @return The chart.
 */
protected JFreeChart createChart()
{
  XYDataset dataset = new TimeSeriesCollection();
  JFreeChart chart = ChartFactory.createTimeSeriesChart("Service Quality", "ms", "score", dataset, true, true, true);
  chart.setNotify(true);
  
  ChartPanel panel = new ChartPanel(chart);
  panel.setFillZoomRectangle(true);
  frame = new JFrame();
  JPanel content = new JPanel(new BorderLayout());
  content.add(panel, BorderLayout.CENTER);
  frame.setContentPane(panel);
  frame.pack();
  frame.setVisible(true);
  
  return chart;
}

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

private void toggleColor() {
  BufferedImage image = plot.getImage();
  if (image != null) {
    if (!plotColorsInverted) {
      image = new BufferedImage(untoggledColorModel, image.getRaster(), image.isAlphaPremultiplied(), null);
    } else {
      image = new BufferedImage(toggledColorModel, image.getRaster(), image.isAlphaPremultiplied(), null);
    }
    plot.setImage(image);
    densityPlotDisplay.getChart().setNotify(true);
    plotColorsInverted = !plotColorsInverted;
  }
}

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

private void toggleColor() {
  BufferedImage image = plot.getImage();
  if (image != null) {
    if (!plotColorsInverted) {
      image = new BufferedImage(untoggledColorModel, image.getRaster(), image.isAlphaPremultiplied(), null);
    } else {
      image = new BufferedImage(toggledColorModel, image.getRaster(), image.isAlphaPremultiplied(), null);
    }
    plot.setImage(image);
    densityPlotDisplay.getChart().setNotify(true);
    plotColorsInverted = !plotColorsInverted;
  }
}

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

return;
this.chart.setNotify(true);  // force a redraw

代码示例来源:origin: us.ihmc/ImageProcessing

public void update(Planar<GrayF32> color , InterleavedU8 binary ) {
 // this is supposed to speed it up.  not sure if it does
 chartHS.chart.setNotify(false);
 chartVS.chart.setNotify(false);
 chartHS.dataset.removeAllSeries();
 chartVS.dataset.removeAllSeries();
 XYSeries seriesHS = new XYSeries("1");
 XYSeries seriesVS = new XYSeries("2");
 GrayF32 H = color.getBand(0);
 GrayF32 S = color.getBand(1);
 GrayF32 V = color.getBand(2);
 for( int y = 0; y < binary.height; y++ ) {
   int index = binary.startIndex + y*binary.stride;
   for( int x = 0; x < binary.width; x++ ) {
    if( binary.data[index++] == 1 ) {
     float h = H.unsafe_get(x,y);
     float s = S.unsafe_get(x,y);
     float v = V.unsafe_get(x,y);
     seriesHS.add(h, s);
     seriesVS.add(v, s);
    }
   }
 }
 chartHS.dataset.addSeries(seriesHS);
 chartVS.dataset.addSeries(seriesVS);
 chartHS.chart.setNotify(true);
 chartVS.chart.setNotify(true);
 repaint();
}

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

return;
this.chart.setNotify(true);  // force a redraw

代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer

protected synchronized void updateResults() {
  JFreeChart chart;
  if (numberOfAllPaths <= 0) {
    makePromptInteractive(false);
    if (graphFrame != null) {
      chart = graphFrame.chartPanel.getChart();
      if (chart != null) {
        chart.setNotify(false);
        final TextTitle currentitle = chart.getTitle();
        if (currentitle != null)
          currentitle.setText("");
        final XYPlot plot = chart.getXYPlot();
        if (plot != null)
          plot.setDataset(null);
        chart.setNotify(true);
      }
    }
  } else { // valid paths to be analyzed
    makePromptInteractive(true);
    final ShollResults results = getCurrentResults();
    resultsPanel.updateFromResults(results);
    chart = results.createGraph();
    if (chart == null)
      return;
    if (graphFrame == null)
      graphFrame = new GraphFrame(chart, results.getSuggestedSuffix());
    else
      graphFrame.updateWithNewChart(chart, results.getSuggestedSuffix());
  }
}

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport

chart.setNotify(autorepaint);

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport

chart.setNotify(autorepaint);

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport

chart.setNotify(autorepaint);

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport

chart.setNotify(autorepaint);

代码示例来源:origin: GrammarViz2/grammarviz2_src

this.chart.setNotify(true);

相关文章