/** * Handles events from the dataset by recalculating the interval if * necessary. * * @param e the event. */ public void datasetChanged(DatasetChangeEvent e) { // TODO: by coding the event with some information about what changed // in the dataset, we could make the recalculation of the interval // more efficient in some cases (for instance, if the change is // just an update to a y-value, then the x-interval doesn't need // updating)... if (this.autoWidth) { this.autoIntervalWidth = recalculateInterval(); } }
/** * Sets the flag that indicates whether the interval width is automatically * calculated. If the flag is set to {@code true}, the interval is * recalculated. * <p> * Note: recalculating the interval amounts to changing the data values * represented by the dataset. The calling dataset must fire an * appropriate {@link DatasetChangeEvent}. * * @param b a boolean. */ public void setAutoWidth(boolean b) { this.autoWidth = b; if (b) { this.autoIntervalWidth = recalculateInterval(); } }
/** * Handles events from the dataset by recalculating the interval if * necessary. * * @param e the event. */ @Override public void datasetChanged(DatasetChangeEvent e) { // TODO: by coding the event with some information about what changed // in the dataset, we could make the recalculation of the interval // more efficient in some cases (for instance, if the change is // just an update to a y-value, then the x-interval doesn't need // updating)... if (this.autoWidth) { this.autoIntervalWidth = recalculateInterval(); } }
/** * Sets the flag that indicates whether the interval width is automatically * calculated. If the flag is set to <code>true</code>, the interval is * recalculated. * <p> * Note: recalculating the interval amounts to changing the data values * represented by the dataset. The calling dataset must fire an * appropriate {@link DatasetChangeEvent}. * * @param b a boolean. */ public void setAutoWidth(boolean b) { this.autoWidth = b; if (b) { this.autoIntervalWidth = recalculateInterval(); } }