public void setDataset(PieDataset dataset) {
// if there is an existing dataset, remove the distributor from the
// list of change listeners...
PieDataset existing = this.dataset;
if (existing != null) {
existing.removeChangeListener(this);
}
// set the new dataset, and register the distributor as a change
// listener...
this.dataset = dataset;