/** * Sorts the dataset's items by key and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param order the sort order (<code>null</code> not permitted). * * @since 1.0.3 */ public void sortByKeys(SortOrder order) { this.data.sortByKeys(order); fireDatasetChanged(); }
/** * Sorts the dataset's items by value and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param order the sort order (<code>null</code> not permitted). * * @since 1.0.3 */ public void sortByValues(SortOrder order) { this.data.sortByValues(order); fireDatasetChanged(); }
/** * Sorts the dataset's items by key and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param order the sort order ({@code null} not permitted). * * @since 1.0.3 */ public void sortByKeys(SortOrder order) { this.data.sortByKeys(order); fireDatasetChanged(); }
/** * Sorts the dataset's items by value and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param order the sort order ({@code null} not permitted). * * @since 1.0.3 */ public void sortByValues(SortOrder order) { this.data.sortByValues(order); fireDatasetChanged(); }
/** * Removes an item from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param key the key (<code>null</code> not permitted). * * @throws IllegalArgumentException if <code>key</code> is * <code>null</code>. */ public void remove(Comparable key) { this.data.removeValue(key); fireDatasetChanged(); }
/** * Removes an item from the dataset and sends a {@link DatasetChangeEvent} * to all registered listeners. * * @param key the key ({@code null} not permitted). * * @throws IllegalArgumentException if {@code key} is * {@code null}. */ public void remove(Comparable key) { this.data.removeValue(key); fireDatasetChanged(); }
/** * Sets the data value for a key and sends a {@link DatasetChangeEvent} to * all registered listeners. * * @param key the key ({@code null} not permitted). * @param value the value. * * @throws IllegalArgumentException if {@code key} is * {@code null}. */ public void setValue(Comparable key, Number value) { this.data.setValue(key, value); fireDatasetChanged(); }
/** * Sets the data value for a key and sends a {@link DatasetChangeEvent} to * all registered listeners. * * @param key the key (<code>null</code> not permitted). * @param value the value. * * @throws IllegalArgumentException if <code>key</code> is * <code>null</code>. */ public void setValue(Comparable key, Number value) { this.data.setValue(key, value); fireDatasetChanged(); }
/** * Inserts a new value at the specified position in the dataset or, if * there is an existing item with the specified key, updates the value * for that item and moves it to the specified position. After the change * is made, this methods sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param position the position (in the range 0 to getItemCount()). * @param key the key ({@code null} not permitted). * @param value the value ({@code null} permitted). * * @since 1.0.6 */ public void insertValue(int position, Comparable key, Number value) { this.data.insertValue(position, key, value); fireDatasetChanged(); }
/** * Inserts a new value at the specified position in the dataset or, if * there is an existing item with the specified key, updates the value * for that item and moves it to the specified position. After the change * is made, this methods sends a {@link DatasetChangeEvent} to all * registered listeners. * * @param position the position (in the range 0 to getItemCount()). * @param key the key (<code>null</code> not permitted). * @param value the value (<code>null</code> permitted). * * @since 1.0.6 */ public void insertValue(int position, Comparable key, Number value) { this.data.insertValue(position, key, value); fireDatasetChanged(); }
/** * Clears all data from this dataset and sends a {@link DatasetChangeEvent} * to all registered listeners (unless the dataset was already empty). * * @since 1.0.2 */ public void clear() { if (getItemCount() > 0) { this.data.clear(); fireDatasetChanged(); } }
/** * Clears all data from this dataset and sends a {@link DatasetChangeEvent} * to all registered listeners (unless the dataset was already empty). * * @since 1.0.2 */ public void clear() { if (getItemCount() > 0) { this.data.clear(); fireDatasetChanged(); } }