/** * Removes an existing data item from the dataset and, if requested, * sends a {@link DatasetChangeEvent} to all registered listeners. * * @param period the (existing!) time period of the value to remove * ({@code null} not permitted). * @param seriesName the (existing!) series name to remove the value * ({@code null} not permitted). * @param notify whether dataset listener are notified or not. * * @see #add(TimePeriod, double, Comparable) */ public void remove(TimePeriod period, Comparable seriesName, boolean notify) { this.values.removeValue(period, seriesName); if (notify) { fireDatasetChanged(); } }
/** * Removes an existing data item from the dataset and, if requested, * sends a {@link DatasetChangeEvent} to all registered listeners. * * @param period the (existing!) time period of the value to remove * (<code>null</code> not permitted). * @param seriesName the (existing!) series name to remove the value * (<code>null</code> not permitted). * @param notify whether dataset listener are notified or not. * * @see #add(TimePeriod, double, String) */ public void remove(TimePeriod period, String seriesName, boolean notify) { this.values.removeValue(period, seriesName); if (notify) { fireDatasetChanged(); } }
/** * Removes all data items from the dataset and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @since 1.0.7 */ public void clear() { if (this.values.getRowCount() > 0) { this.values.clear(); fireDatasetChanged(); } }
/** * Removes all data items from the dataset and sends a * {@link DatasetChangeEvent} to all registered listeners. * * @since 1.0.7 */ public void clear() { if (this.values.getRowCount() > 0) { this.values.clear(); fireDatasetChanged(); } }
/** * Adds a new data item to the dataset and, if requested, sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param period the time period ({@code null} not permitted). * @param y the value for this period ({@code null} permitted). * @param seriesName the name of the series to add the value * ({@code null} not permitted). * @param notify whether dataset listener are notified or not. * * @see #remove(TimePeriod, Comparable, boolean) */ public void add(TimePeriod period, Number y, Comparable seriesName, boolean notify) { // here's a quirk - the API has been defined in terms of a plain // TimePeriod, which cannot make use of the timezone and locale // specified in the constructor...so we only do the time zone // pegging if the period is an instanceof RegularTimePeriod if (period instanceof RegularTimePeriod) { RegularTimePeriod p = (RegularTimePeriod) period; p.peg(this.workingCalendar); } this.values.addValue(y, period, seriesName); if (notify) { fireDatasetChanged(); } }
/** * Adds a new data item to the dataset and, if requested, sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param period the time period (<code>null</code> not permitted). * @param y the value for this period (<code>null</code> permitted). * @param seriesName the name of the series to add the value * (<code>null</code> not permitted). * @param notify whether dataset listener are notified or not. * * @see #remove(TimePeriod, String, boolean) */ public void add(TimePeriod period, Number y, String seriesName, boolean notify) { // here's a quirk - the API has been defined in terms of a plain // TimePeriod, which cannot make use of the timezone and locale // specified in the constructor...so we only do the time zone // pegging if the period is an instanceof RegularTimePeriod if (period instanceof RegularTimePeriod) { RegularTimePeriod p = (RegularTimePeriod) period; p.peg(this.workingCalendar); } this.values.addValue(y, period, seriesName); if (notify) { fireDatasetChanged(); } }