/** * This should be triggered by an method that changes the content of an object * to that the registered listeners can react to it. This is a version of * notifyChanged() which allows to propagate a change event while preserving * the original origin. * *@param evt A ChemObjectChangeEvent pointing to the source of where * the change happend */ @Override public void notifyChanged(IChemObjectChangeEvent evt) { if (getNotification() && getListenerCount() > 0) { List<IChemObjectListener> listeners = lazyChemObjectListeners(); for (Object listener : listeners) { ((IChemObjectListener) listener).stateChanged(evt); } } }
/** * This should be triggered by an method that changes the content of an object * to that the registered listeners can react to it. */ @Override public void notifyChanged() { if (getNotification() && getListenerCount() > 0) { List<IChemObjectListener> listeners = lazyChemObjectListeners(); for (Object listener : listeners) { ((IChemObjectListener) listener).stateChanged(new QueryChemObjectChangeEvent(this)); } } }