Java Code Examples for org.jfree.chart.plot.PiePlot#setDataset()

The following examples show how to use org.jfree.chart.plot.PiePlot#setDataset() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PieChartTest.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 2
Source File: PieChart3DTest.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 3
Source File: PieChartTest.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 4
Source File: PieChart3DTest.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 5
Source File: PieChartTest.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 6
Source File: PieChart3DTest.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 7
Source File: ChartJFreeChartOutputPie.java    From gama with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void clearDataSet(final IScope scope) {
	// TODO Auto-generated method stub
	super.clearDataSet(scope);
	final PiePlot plot = (PiePlot) this.chart.getPlot();
	jfreedataset.clear();
	jfreedataset.add(0, new DefaultPieDataset());
	plot.setDataset((DefaultPieDataset) jfreedataset.get(0));
	IdPosition.clear();
	nbseries = 0;
}
 
Example 8
Source File: PieChartTest.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 9
Source File: PieChart3DTest.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 10
Source File: PieChartTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 11
Source File: PieChart3DTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 12
Source File: PieChartTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to 
 * receive notification of a chart change event, and (of course) the 
 * dataset should be null.
 */
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 13
Source File: PieChart3DTests.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to 
 * receive notification of a chart change event, and (of course) the 
 * dataset should be null.
 */
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 14
Source File: PieChartTest.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}
 
Example 15
Source File: PieChart3DTest.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Using a regular pie chart, we replace the dataset with null.  Expect to
 * receive notification of a chart change event, and (of course) the
 * dataset should be null.
 */
@Test
public void testReplaceDatasetOnPieChart() {
    LocalListener l = new LocalListener();
    this.pieChart.addChangeListener(l);
    PiePlot plot = (PiePlot) this.pieChart.getPlot();
    plot.setDataset(null);
    assertEquals(true, l.flag);
    assertNull(plot.getDataset());
}