/** * Adds a data item to this dataset and, if requested, sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param x the x value. * @param y the y value. * @param seriesName the name of the series to add the data item. * @param notify notify listeners? */ public void add(Number x, Number y, String seriesName, boolean notify) { this.values.addValue(y, (Comparable) x, seriesName); if (notify) { fireDatasetChanged(); } }
/** * Adds a value to the table. Performs the same function as setValue(). * * @param value the value. * @param rowKey the row key. * @param columnKey the column key. * * @see #getValue(Comparable, Comparable) * @see #removeValue(Comparable, Comparable) */ public void addValue(Number value, Comparable rowKey, Comparable columnKey) { this.data.addValue(value, rowKey, columnKey); fireDatasetChanged(); }
/** * Adds a data item to this dataset and, if requested, sends a * {@link DatasetChangeEvent} to all registered listeners. * * @param x the x value. * @param y the y value. * @param seriesName the name of the series to add the data item. * @param notify notify listeners? */ public void add(Number x, Number y, String seriesName, boolean notify) { this.values.addValue(y, (Comparable) x, seriesName); if (notify) { fireDatasetChanged(); } }
/** * Adds a value to the table. Performs the same function as setValue(). * * @param value the value. * @param rowKey the row key. * @param columnKey the column key. * * @see #getValue(Comparable, Comparable) * @see #removeValue(Comparable, Comparable) */ public void addValue(Number value, Comparable rowKey, Comparable columnKey) { this.data.addValue(value, rowKey, columnKey); 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(); } }