Package com._1c.g5.aef2.standard.models
Class ViewModelList<T>
java.lang.Object
com._1c.g5.aef2.validators.Validable
com._1c.g5.aef2.models.Model
com._1c.g5.aef2.models.EditableModel
com._1c.g5.aef2.models.list.ListModel<T>
com._1c.g5.aef2.standard.models.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 Summary
ConstructorsConstructorDescriptionViewModelList(IViewModel object, org.eclipse.emf.ecore.EStructuralFeature feature, IEventChannel channel) Instantiates a new ViewModel list. -
Method Summary
Modifier and TypeMethodDescriptionvoidSets the model initialization flag which means that all model operations performed beforeIViewModelModel.endInitialization()will not invoke notification events.voidcommit()Commits the changes to the data model.voiddispose()Disposes this model.voidResets the model initialization flag that is set byIViewModelModel.beginInitialization().org.eclipse.emf.ecore.EObjectReturns the object that keeps the attribute.org.eclipse.emf.ecore.EStructuralFeatureReturns the property.protected voidQueues the runnable that notifies the listeners about a change of this list.voidsetComponent(IComponent<?> component) Associate this model with the component.Methods inherited from class com._1c.g5.aef2.models.list.ListModel
add, add, addAll, addAll, addListListener, clear, contains, containsAll, createWorkingCopy, discard, fill, get, getCommittedList, getUncommittedList, indexOf, isElementEqual, isEmpty, isEqual, iterator, lastIndexOf, listIterator, listIterator, notifyListChanged, remove, remove, removeAll, removeListListener, retainAll, set, setCommittedList, setList, setUncommitedList, size, subList, toArray, toArray, toStringMethods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditableMethods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setOnlineMethods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, removeValidator, validate, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface com._1c.g5.aef2.models.list.IList
addListListener, createWorkingCopy, fill, isEqual, removeListListenerMethods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, discard, getComponent, isOnline, removeModelListenerMethods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validateMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
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 benull.feature- the feature, cannot benull.channel- theIEventChannel, cannot benull.
-
-
Method Details
-
beginInitialization
public void beginInitialization()Description copied from interface:IViewModelModelSets the model initialization flag which means that all model operations performed beforeIViewModelModel.endInitialization()will not invoke notification events.- Specified by:
beginInitializationin interfaceIViewModelModel
-
endInitialization
public void endInitialization()Description copied from interface:IViewModelModelResets the model initialization flag that is set byIViewModelModel.beginInitialization().- Specified by:
endInitializationin interfaceIViewModelModel
-
getChange
-
dispose
public void dispose()Description copied from interface:IModelDisposes this model. -
commit
public void commit()Description copied from interface:IModelCommits the changes to the data model. -
getObject
public org.eclipse.emf.ecore.EObject getObject()Description copied from interface:IAttributeReturns the object that keeps the attribute.- Specified by:
getObjectin interfaceIAttribute<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:IAttributeReturns the property.- Specified by:
getPropertyin interfaceIAttribute<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature> - Returns:
- the property.
-
setComponent
Description copied from interface:IModelAssociate this model with the component.- Specified by:
setComponentin interfaceIModel- Overrides:
setComponentin classModel- Parameters:
component- the component to associate with.
-
queueNotifyListChanged
protected void queueNotifyListChanged()Description copied from class:ListModelQueues the runnable that notifies the listeners about a change of this list. In fact it queues a runnable that performsListModel.notifyListChanged(ChangeOrigin).- Overrides:
queueNotifyListChangedin classListModel<T>
-