Java Code Examples for org.jfree.data.xy.XYDataset#removeChangeListener()
The following examples show how to use
org.jfree.data.xy.XYDataset#removeChangeListener() .
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: PolarPlot.java From opensim-gui with Apache License 2.0 | 6 votes |
/** * Sets the dataset for the plot, replacing the existing dataset if there * is one. * * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset() */ public void setDataset(XYDataset dataset) { // if there is an existing dataset, remove the plot from the list of // change listeners... XYDataset existing = this.dataset; if (existing != null) { existing.removeChangeListener(this); } // set the new m_Dataset, and register the chart as a change listener... this.dataset = dataset; if (this.dataset != null) { setDatasetGroup(this.dataset.getGroup()); this.dataset.addChangeListener(this); } // send a m_Dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, this.dataset); datasetChanged(event); }
Example 2
Source File: PolarPlot.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Sets the dataset for the plot, replacing the existing dataset if there * is one. * * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset() */ public void setDataset(XYDataset dataset) { // if there is an existing dataset, remove the plot from the list of // change listeners... XYDataset existing = this.dataset; if (existing != null) { existing.removeChangeListener(this); } // set the new m_Dataset, and register the chart as a change listener... this.dataset = dataset; if (this.dataset != null) { setDatasetGroup(this.dataset.getGroup()); this.dataset.addChangeListener(this); } // send a m_Dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, this.dataset); datasetChanged(event); }
Example 3
Source File: PolarPlot.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Sets the dataset for the plot, replacing the existing dataset if there * is one. * * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset() */ public void setDataset(XYDataset dataset) { // if there is an existing dataset, remove the plot from the list of // change listeners... XYDataset existing = this.dataset; if (existing != null) { existing.removeChangeListener(this); } // set the new dataset, and register the chart as a change listener... this.dataset = dataset; if (this.dataset != null) { setDatasetGroup(this.dataset.getGroup()); this.dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, this.dataset, new DatasetChangeInfo()); // TODO: fill in real dataset change type datasetChanged(event); }
Example 4
Source File: PolarPlot.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot, replacing the existing dataset at the same * index if there is one, and sends a {@code link PlotChangeEvent} to all * registered listeners. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) * * @since 1.0.14 */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 5
Source File: XYPlot.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 6
Source File: XYPlot.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Sets a dataset for the plot and sends a change event to all registered * listeners. * * @param index the dataset index (must be >= 0). * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 7
Source File: PolarPlot.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Sets a dataset for the plot, replacing the existing dataset at the same * index if there is one, and sends a {@code link PlotChangeEvent} to all * registered listeners. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) * * @since 1.0.14 */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 8
Source File: Chart_14_XYPlot_t.java From coming with MIT License | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 9
Source File: Chart_14_XYPlot_s.java From coming with MIT License | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 10
Source File: XYPlot.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 11
Source File: PolarPlot.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot, replacing the existing dataset at the same * index if there is one, and sends a {@code link PlotChangeEvent} to all * registered listeners. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) * * @since 1.0.14 */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 12
Source File: Cardumen_009_t.java From coming with MIT License | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 13
Source File: XYPlot.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot and sends a change event to all registered * listeners. * * @param index the dataset index (must be >= 0). * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 14
Source File: PolarPlot.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot, replacing the existing dataset at the same * index if there is one, and sends a {@code link PlotChangeEvent} to all * registered listeners. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) * * @since 1.0.14 */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 15
Source File: PolarPlot.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Sets a dataset for the plot, replacing the existing dataset at the same * index if there is one, and sends a {@code link PlotChangeEvent} to all * registered listeners. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) * * @since 1.0.14 */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 16
Source File: XYPlot.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot and sends a change event to all registered * listeners. * * @param index the dataset index (must be >= 0). * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 17
Source File: XYPlot.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot and sends a change event to all registered * listeners. * * @param index the dataset index (must be >= 0). * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 18
Source File: 1_XYPlot.java From SimFix with GNU General Public License v2.0 | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 19
Source File: 1_XYPlot.java From SimFix with GNU General Public License v2.0 | 5 votes |
/** * Sets a dataset for the plot. * * @param index the dataset index. * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.set(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }
Example 20
Source File: XYPlot.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Sets a dataset for the plot and sends a change event to all registered * listeners. * * @param index the dataset index (must be >= 0). * @param dataset the dataset (<code>null</code> permitted). * * @see #getDataset(int) */ public void setDataset(int index, XYDataset dataset) { XYDataset existing = getDataset(index); if (existing != null) { existing.removeChangeListener(this); } this.datasets.put(index, dataset); if (dataset != null) { dataset.addChangeListener(this); } // send a dataset change event to self... DatasetChangeEvent event = new DatasetChangeEvent(this, dataset); datasetChanged(event); }