Class ViewModelValue<T>

All Implemented Interfaces:
IAttribute<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature>, IEditableModel, IEmfAttribute<org.eclipse.emf.ecore.EObject>, IModel, IEmfValueAttribute<T,org.eclipse.emf.ecore.EObject>, IValue<T>, IViewModelModel, IViewModelValue<T>, IValidable

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

    • ViewModelValue

      public ViewModelValue(IViewModel object, org.eclipse.emf.ecore.EStructuralFeature feature, IEventChannel channel)
      Instantiates a new ViewModel value.
      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
    • 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
    • set

      public void set(T value)
      Specified by:
      set in interface IValue<T>
      Overrides:
      set in class Value<T>
      Parameters:
      value - the value to set.
    • 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 Value<T>
    • 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.
    • getObject

      public IViewModel 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.