Interface IModelChangedEvent

All Known Implementing Classes:
ModelChangedEvent

public interface IModelChangedEvent
Model change events are fired by the model when it is changed from the last clean state. Model change listeners can use these events to update accordingly.
Since:
2.0
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    indicates that a model object's property has been changed.
    static final int
    Indicates a change where one or more objects are added to the model.
    static final int
    Indicates a change where one or more objects are removed from the model.
    static final int
    Indicates that the model has been reloaded and that listeners should perform full refresh.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an array of model objects that are affected by the change.
    Returns a name of the object's property that has been changed if change type is CHANGE.
    Returns the provider that fired this event.
    int
    Returns the type of change that occured in the model (one of INSERT, REMOVE, CHANGE or WORLD_CHANGED ).
    When model change is of type CHANGE, this method is used to obtain the new value of the property (after the change).
    When model change is of type CHANGE, this method is used to obtain the old value of the property (before the change).
  • Field Details

    • INSERT

      static final int INSERT
      Indicates a change where one or more objects are added to the model.
      See Also:
    • REMOVE

      static final int REMOVE
      Indicates a change where one or more objects are removed from the model.
      See Also:
    • WORLD_CHANGED

      static final int WORLD_CHANGED
      Indicates that the model has been reloaded and that listeners should perform full refresh.
      See Also:
    • CHANGE

      static final int CHANGE
      indicates that a model object's property has been changed.
      See Also:
  • Method Details

    • getChangeProvider

      IModelChangeProvider getChangeProvider()
      Returns the provider that fired this event.
      Returns:
      the event provider
    • getChangedObjects

      Object[] getChangedObjects()
      Returns an array of model objects that are affected by the change.
      Returns:
      array of affected objects
    • getChangedProperty

      String getChangedProperty()
      Returns a name of the object's property that has been changed if change type is CHANGE.
      Returns:
      property that has been changed in the model object, or null if type is not CHANGE or if more than one property has been changed.
    • getOldValue

      Object getOldValue()
      When model change is of type CHANGE, this method is used to obtain the old value of the property (before the change).
      Returns:
      the old value of the changed property
    • getNewValue

      Object getNewValue()
      When model change is of type CHANGE, this method is used to obtain the new value of the property (after the change).
      Returns:
      the new value of the changed property.
    • getChangeType

      int getChangeType()
      Returns the type of change that occured in the model (one of INSERT, REMOVE, CHANGE or WORLD_CHANGED ).
      Returns:
      type of change