/** * Notifies all registered ListDataListeners that the ValidationResult * in this adapter's underlying ValidationResultModel has changed. */ @Override public void propertyChange(PropertyChangeEvent evt) { int newSize = getSize(); int oldLastIndex = oldSize - 1; int newLastIndex = newSize - 1; oldSize = newSize; fireListChanged(oldLastIndex, newLastIndex); }
/** * Notifies all registered ListDataListeners that the ValidationResult * in this adapter's underlying ValidationResultModel has changed. */ public void propertyChange(PropertyChangeEvent evt) { int newSize = getSize(); int oldLastIndex = oldSize - 1; int newLastIndex = newSize - 1; oldSize = newSize; fireListChanged(oldLastIndex, newLastIndex); }
/** * Constructs a ValidationResultListAdapter that converts * the given model into a ListModel. Observes the given model * to update this adapter every time the validation result changes. * * @param model the model that provides the validation result */ public ValidationResultListAdapter(ValidationResultModel model) { this.model = model; this.oldSize = getSize(); model.addPropertyChangeListener( ValidationResultModel.PROPERTYNAME_RESULT, new ValidationResultHandler()); }
/** * Constructs a ValidationResultListAdapter that converts * the given model into a ListModel. Observes the given model * to update this adapter every time the validation result changes. * * @param model the model that provides the validation result */ public ValidationResultListAdapter(ValidationResultModel model) { this.model = model; this.oldSize = getSize(); model.addPropertyChangeListener( ValidationResultModel.PROPERTY_RESULT, new ValidationResultHandler()); }