Java Code Examples for org.jfree.data.category.CategoryDataset#removeChangeListener()

The following examples show how to use org.jfree.data.category.CategoryDataset#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: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 2
Source File: jKali_001_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 3
Source File: CategoryPlot.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 4
Source File: Chart_14_CategoryPlot_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: JGenProg2017_0081_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 7
Source File: JGenProg2017_0081_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: Cardumen_00243_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: Cardumen_00143_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: jMutRepair_001_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: jMutRepair_0030_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 14
Source File: CategoryPlot.java    From opensim-gui with Apache License 2.0 6 votes vote down vote up
/**
 * Sets a dataset for the plot.
 *
 * @param index  the dataset index.
 * @param dataset  the dataset (<code>null</code> permitted).
 */
public void setDataset(int index, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: Chart_19_CategoryPlot_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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, CategoryDataset dataset) {
    
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 17
Source File: CategoryPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets a dataset for the plot and sends a change notification to all
 * registered listeners.
 *
 * @param index  the dataset index (must be &gt;= 0).
 * @param dataset  the dataset ({@code null} permitted).
 *
 * @see #getDataset(int)
 */
public void setDataset(int index, CategoryDataset dataset) {
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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: CategoryPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Sets a dataset for the plot and sends a change notification to all
 * registered listeners.
 *
 * @param index  the dataset index (must be &gt;= 0).
 * @param dataset  the dataset ({@code null} permitted).
 *
 * @see #getDataset(int)
 */
public void setDataset(int index, CategoryDataset dataset) {
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 19
Source File: CategoryPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Sets a dataset for the plot and sends a change notification to all
 * registered listeners.
 *
 * @param index  the dataset index (must be &gt;= 0).
 * @param dataset  the dataset ({@code null} permitted).
 *
 * @see #getDataset(int)
 */
public void setDataset(int index, CategoryDataset dataset) {
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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 20
Source File: CategoryPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets a dataset for the plot and sends a change notification to all
 * registered listeners.
 *
 * @param index  the dataset index (must be &gt;= 0).
 * @param dataset  the dataset ({@code null} permitted).
 *
 * @see #getDataset(int)
 */
public void setDataset(int index, CategoryDataset dataset) {
    CategoryDataset existing = (CategoryDataset) this.datasets.get(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);
}