public interface IModelChangeListener
Each time the a model transaction is commited, a IModelChangeEvent class is computed and given to each
IModelChangeHandler, and then each IModelChangeListener that is connected to the modeling session.
A model change listener is used to refresh data or views. The model must not be modified in a model change listener, please use a IModelChangeHandler instead.
Example of adding a new listener in Modelio.
Modelio.getInstance().getModelingSession().addModelListener (listener);
MyModelChangeListener listener = new MyModelChangeListener(...);
Example of removing an existing listener from Modelio.
Modelio.getInstance().getModelingSession().removeModelListener (listener);
MyModelChangeListener listener = ...;
The given IModelChangeEvent is used to get the delta between the model before the transaction execution and
the model after.
IModelChangeEvent| Modifier and Type | Method and Description |
|---|---|
void |
modelChanged(IModelingSession session,
IModelChangeEvent event)
Invoked when the model has changed.
|
void modelChanged(IModelingSession session, IModelChangeEvent event)
The session parameter is the modeling session where the event has occured. modifications. The event
parameter provide the changes made in the model.
session - The modeling session.event - Delta between the beginning and the end of the transaction.