Class ViewModelList<T>

All Implemented Interfaces:
IAttribute<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature>, IEditableModel, IEmfAttribute<org.eclipse.emf.ecore.EObject>, IModel, IEmfListAttribute<T,org.eclipse.emf.ecore.EObject>, IList<T>, IViewModelList<T>, IViewModelModel, IValidable, Iterable<T>, Collection<T>, List<T>

public class ViewModelList<T> extends ListModel<T> implements IEmfListAttribute<T,org.eclipse.emf.ecore.EObject>, IViewModelList<T>
The special list model implementation for IViewModel. It performs all operations within root component processing queue instead of immediate processing.
See Also:
  • Constructor Details

    • ViewModelList

      public ViewModelList(IViewModel object, org.eclipse.emf.ecore.EStructuralFeature feature, IEventChannel channel)
      Instantiates a new ViewModel list.
      Parameters:
      object - the object, cannot be null.
      feature - the feature, cannot be null.
      channel - the IEventChannel, cannot be null.
  • Method Details

    • beginInitialization

      public void beginInitialization()
      Description copied from interface: IViewModelModel
      Sets the model initialization flag which means that all model operations performed before IViewModelModel.endInitialization() will not invoke notification events.
      Specified by:
      beginInitialization in interface IViewModelModel
    • endInitialization

      public void endInitialization()
      Description copied from interface: IViewModelModel
      Resets the model initialization flag that is set by IViewModelModel.beginInitialization().
      Specified by:
      endInitialization in interface IViewModelModel
    • getChange

      public IChange getChange()
      Specified by:
      getChange in interface IModel
      Returns:
      change describing the modifications done to the model.
    • dispose

      public void dispose()
      Description copied from interface: IModel
      Disposes this model.
      Specified by:
      dispose in interface IModel
      Overrides:
      dispose in class ListModel<T>
    • commit

      public void commit()
      Description copied from interface: IModel
      Commits the changes to the data model.
      Specified by:
      commit in interface IModel
      Overrides:
      commit in class Model
    • getObject

      public org.eclipse.emf.ecore.EObject getObject()
      Description copied from interface: IAttribute
      Returns the object that keeps the attribute.
      Specified by:
      getObject in interface IAttribute<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature>
      Returns:
      the object that keeps the attribute.
    • getProperty

      public org.eclipse.emf.ecore.EStructuralFeature getProperty()
      Description copied from interface: IAttribute
      Returns the property.
      Specified by:
      getProperty in interface IAttribute<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature>
      Returns:
      the property.
    • setComponent

      public void setComponent(IComponent<?> component)
      Description copied from interface: IModel
      Associate this model with the component.
      Specified by:
      setComponent in interface IModel
      Overrides:
      setComponent in class Model
      Parameters:
      component - the component to associate with.
    • queueNotifyListChanged

      protected void queueNotifyListChanged()
      Description copied from class: ListModel
      Queues the runnable that notifies the listeners about a change of this list. In fact it queues a runnable that performs ListModel.notifyListChanged(ChangeOrigin).
      Overrides:
      queueNotifyListChanged in class ListModel<T>