/** * Clears the selection. * * @since 1.2.0 */ public void clearSelection() { // cycle through the datasets and clear the selection state int datasetCount = this.datasets.size(); for (int d = 0; d < datasetCount; d++) { XYDataset dataset = (XYDataset) this.datasets.get(d); if (dataset instanceof AbstractXYDataset) { // FIXME: actually, we need to get the selection state // taking into account the rendering source AbstractXYDataset axyd = (AbstractXYDataset) dataset; if (axyd.getSelectionState() != null) { XYDatasetSelectionState selState = axyd.getSelectionState(); selState.clearSelection(); } } } }