/** Clears all data */ public void clear() { if (series != null) { synchronized (series) { series.clear(); } } }
public void setPath(List<XYPoint> xyList) { mIdeal.clear(); clearActuals(); for (int i = 0; i < xyList.size(); ++i) { mIdeal.add(xyList.get(i).mX, xyList.get(i).mY); } }
/** * Clear a series * * @param seriesName Name of series to clear */ public void clear(String seriesName) { for (XYSeries serie : seriesList) { if (serie.getKey().toString().equals(seriesName)) { serie.clear(); break; } } }
@SuppressWarnings("rawtypes") @Override public void zoom(Rectangle selection) { if (map == null || layer == null) { return; } Set<FeatureId> selected = new HashSet<FeatureId>(); try { XYSeriesCollection ds = (XYSeriesCollection) getChart().getXYPlot().getDataset(2); XYSeries selectionSeries = ds.getSeries(0); selectionSeries.clear(); EntityCollection entities = this.getChartRenderingInfo().getEntityCollection(); Iterator iter = entities.iterator(); while (iter.hasNext()) { ChartEntity entity = (ChartEntity) iter.next(); if (entity instanceof XYItemEntity) { XYItemEntity item = (XYItemEntity) entity; if (item.getSeriesIndex() != 0) { continue; } java.awt.Rectangle bound = item.getArea().getBounds(); if (selection.intersects(bound.x, bound.y, bound.width, bound.height)) { XYSeriesCollection dataSet = (XYSeriesCollection) item.getDataset(); XYSeries xySeries = dataSet.getSeries(item.getSeriesIndex()); XYDataItem xyDataItem = xySeries.getDataItem(item.getItem()); if (xyDataItem instanceof XYDataItem2) { XYDataItem2 dataItem = (XYDataItem2) xyDataItem; selectionSeries.add(dataItem); selected.add(ff.featureId(dataItem.getFeature().getID())); } } } } } catch (Exception e) { // skip } finally { if (selected.size() > 0) { map.select(ff.id(selected), layer); } else { map.select(Filter.EXCLUDE, layer); } this.forceRedraw(); } }
public void clearActuals() { mReal.clear(); }
/** Clear all series */ public void clear() { for (XYSeries serie : seriesList) { serie.clear(); } }
public SearchMethod() { JFreeChart chart = ProblemInstance.view.getChart(); XYSeriesCollection sc = (XYSeriesCollection) chart.getXYPlot().getDataset(); series = sc.getSeries(0); series.clear(); }