/** * Creates a new empty dataset. * * @param autoPrune a flag that controls whether or not x-values are * removed whenever the corresponding y-values are all * {@code null}. */ public DefaultTableXYDataset(boolean autoPrune) { this.autoPrune = autoPrune; this.data = new ArrayList(); this.xPoints = new HashSet(); this.intervalDelegate = new IntervalXYDelegate(this, false); addChangeListener(this.intervalDelegate); }
/** * Creates a new empty dataset. * * @param autoPrune a flag that controls whether or not x-values are * removed whenever the corresponding y-values are all * <code>null</code>. */ public DefaultTableXYDataset(boolean autoPrune) { this.autoPrune = autoPrune; this.data = new ArrayList(); this.xPoints = new HashSet(); this.intervalDelegate = new IntervalXYDelegate(this, false); addChangeListener(this.intervalDelegate); }
/** * Constructs a dataset and populates it with a single series. * * @param series the series (<code>null</code> ignored). */ public XYSeriesCollection(XYSeries series) { this.data = new java.util.ArrayList(); this.intervalDelegate = new IntervalXYDelegate(this, false); addChangeListener(this.intervalDelegate); if (series != null) { this.data.add(series); series.addChangeListener(this); } }
/** * Creates a new empty CategoryTableXYDataset. */ public CategoryTableXYDataset() { this.values = new DefaultKeyedValues2D(true); this.intervalDelegate = new IntervalXYDelegate(this); addChangeListener(this.intervalDelegate); }
/** * Creates a new empty CategoryTableXYDataset. */ public CategoryTableXYDataset() { this.values = new DefaultKeyedValues2D(true); this.intervalDelegate = new IntervalXYDelegate(this); addChangeListener(this.intervalDelegate); }
/** * Constructs a dataset and populates it with a single series. * * @param series the series ({@code null} ignored). */ public XYSeriesCollection(XYSeries series) { this.data = new java.util.ArrayList(); this.intervalDelegate = new IntervalXYDelegate(this, false); addChangeListener(this.intervalDelegate); if (series != null) { this.data.add(series); series.addChangeListener(this); series.addVetoableChangeListener(this); } }
/** * Returns an independent copy of this dataset. * * @return A clone. * * @throws CloneNotSupportedException if there is some reason that cloning * cannot be performed. */ @Override public Object clone() throws CloneNotSupportedException { DefaultTableXYDataset clone = (DefaultTableXYDataset) super.clone(); int seriesCount = this.data.size(); clone.data = new java.util.ArrayList(seriesCount); for (int i = 0; i < seriesCount; i++) { XYSeries series = (XYSeries) this.data.get(i); clone.data.add(series.clone()); } clone.intervalDelegate = new IntervalXYDelegate(clone); // need to configure the intervalDelegate to match the original clone.intervalDelegate.setFixedIntervalWidth(getIntervalWidth()); clone.intervalDelegate.setAutoWidth(isAutoWidth()); clone.intervalDelegate.setIntervalPositionFactor( getIntervalPositionFactor()); clone.updateXPoints(); return clone; }
/** * Returns an independent copy of this dataset. * * @return A clone. * * @throws CloneNotSupportedException if there is some reason that cloning * cannot be performed. */ public Object clone() throws CloneNotSupportedException { DefaultTableXYDataset clone = (DefaultTableXYDataset) super.clone(); int seriesCount = this.data.size(); clone.data = new java.util.ArrayList(seriesCount); for (int i = 0; i < seriesCount; i++) { XYSeries series = (XYSeries) this.data.get(i); clone.data.add(series.clone()); } clone.intervalDelegate = new IntervalXYDelegate(clone); // need to configure the intervalDelegate to match the original clone.intervalDelegate.setFixedIntervalWidth(getIntervalWidth()); clone.intervalDelegate.setAutoWidth(isAutoWidth()); clone.intervalDelegate.setIntervalPositionFactor( getIntervalPositionFactor()); clone.updateXPoints(); return clone; }
/** * Returns an independent copy of this dataset. * * @return A clone. * * @throws CloneNotSupportedException if there is some reason that cloning * cannot be performed. */ @Override public Object clone() throws CloneNotSupportedException { CategoryTableXYDataset clone = (CategoryTableXYDataset) super.clone(); clone.values = (DefaultKeyedValues2D) this.values.clone(); clone.intervalDelegate = new IntervalXYDelegate(clone); // need to configure the intervalDelegate to match the original clone.intervalDelegate.setFixedIntervalWidth(getIntervalWidth()); clone.intervalDelegate.setAutoWidth(isAutoWidth()); clone.intervalDelegate.setIntervalPositionFactor( getIntervalPositionFactor()); return clone; }
/** * Returns an independent copy of this dataset. * * @return A clone. * * @throws CloneNotSupportedException if there is some reason that cloning * cannot be performed. */ public Object clone() throws CloneNotSupportedException { CategoryTableXYDataset clone = (CategoryTableXYDataset) super.clone(); clone.values = (DefaultKeyedValues2D) this.values.clone(); clone.intervalDelegate = new IntervalXYDelegate(clone); // need to configure the intervalDelegate to match the original clone.intervalDelegate.setFixedIntervalWidth(getIntervalWidth()); clone.intervalDelegate.setAutoWidth(isAutoWidth()); clone.intervalDelegate.setIntervalPositionFactor( getIntervalPositionFactor()); return clone; }