Package com.nomagic.uml2.ext.jmi
Class EventSupport
java.lang.Object
com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
com.nomagic.uml2.ext.jmi.EventSupport
- All Implemented Interfaces:
com.dassault_systemes.modeler.foundation.events.RepositoryListenerRegistry<javax.jmi.reflect.RefObject>
,RepositoryListenerRegistry
public class EventSupport
extends com.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
implements RepositoryListenerRegistry
Class for firing events and handling event listeners.
-
Field Summary
Fields inherited from class com.dassault_systemes.modeler.foundation.events.EventSupport
EVENT_FIRE_START, EVENT_FIRE_STOP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.nomagic.uml2.ext.jmi.IndexedPropertyChangeEvent
createIndexedPropertyChangeEvent
(Object source, String propertyName, Object oldValue, Object newValue, int index) void
fireInstanceDeletedEvent
(javax.jmi.reflect.RefBaseObject source, Object deleted, Object oldDirectContainer) Fires event about an instance delete.void
fireModelElementDisposeEvent
(javax.jmi.reflect.RefObject disposed, Object oldDirectContainer) Fires event about an instance disposal.void
firePropertyChange
(javax.jmi.reflect.RefBaseObject source, String propertyName, Object oldValue, Object newValue) void
firePropertyChange
(javax.jmi.reflect.RefBaseObject source, String propertyName, Object oldValue, Object newValue, int index) void
firePropertyChange
(javax.jmi.reflect.RefBaseObject source, String propertyName, Object oldValue, Object newValue, int index, int newIndex) com.nomagic.uml2.ext.jmi.NonMaskedEventSupport
protected boolean
protected boolean
isNotDeliveredEventElement
(Object object) void
restoreEventDelivery
(com.nomagic.uml2.ext.jmi.ModifiedElements modifiedElements) Restores event delivery.Methods inherited from class com.dassault_systemes.modeler.foundation.events.EventSupport
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addRepositoryListener, callModelListener, fireCountedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getEventsCount, invokeAfterTransaction, isEnableEventFiring, isModelCleanAfterEventsStopped, removeAllPropertyChangeListeners, removeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeRepositoryListener, restoreEventDelivery, setEnableEventFiring, setModelListener, startLogEvents, stopEventDelivery, stopLogEvents
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.dassault_systemes.modeler.foundation.events.RepositoryListenerRegistry
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, removeAllPropertyChangeListeners, removeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
LOG
public static final org.apache.logging.log4j.Logger LOG
-
-
Constructor Details
-
EventSupport
-
-
Method Details
-
isNotDeliveredEventElement
- Specified by:
isNotDeliveredEventElement
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
createIndexedPropertyChangeEvent
protected com.nomagic.uml2.ext.jmi.IndexedPropertyChangeEvent createIndexedPropertyChangeEvent(Object source, String propertyName, @CheckForNull Object oldValue, @CheckForNull Object newValue, int index) - Overrides:
createIndexedPropertyChangeEvent
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
firePropertyChange
-
fireModelElementDisposeEvent
public void fireModelElementDisposeEvent(javax.jmi.reflect.RefObject disposed, @CheckForNull Object oldDirectContainer) Description copied from class:com.dassault_systemes.modeler.foundation.events.EventSupport
Fires event about an instance disposal.- Overrides:
fireModelElementDisposeEvent
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
- Parameters:
disposed
- element that was disposed.oldDirectContainer
- old direct container (feature data set or resource).
-
fireInstanceDeletedEvent
public void fireInstanceDeletedEvent(javax.jmi.reflect.RefBaseObject source, Object deleted, @CheckForNull Object oldDirectContainer) Fires event about an instance delete.- Parameters:
source
- source of the event.deleted
- element that was deleted.oldDirectContainer
- old direct container (feature data set or resource).
-
firePropertyChange
-
firePropertyChange
-
isDeveloper
protected boolean isDeveloper()- Specified by:
isDeveloper
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
-
restoreEventDelivery
public void restoreEventDelivery(com.nomagic.uml2.ext.jmi.ModifiedElements modifiedElements) Restores event delivery. Non-masked event listeners will start getting events again. If event firing was not disabled viaEventSupport.setEnableEventFiring(boolean)
then other event listeners will start getting events andUML2MetamodelConstants.EVENT_FIRE_START
will be fired for repository property change listeners- Parameters:
modifiedElements
- provider for changed elements
-
getNonMaskedModelListeners
public com.nomagic.uml2.ext.jmi.NonMaskedEventSupport getNonMaskedModelListeners()- Overrides:
getNonMaskedModelListeners
in classcom.dassault_systemes.modeler.foundation.events.EventSupport<javax.jmi.reflect.RefObject>
- Returns:
- ModelListener which sends notification even event fire is disabled.
-