public class ViewModelListener extends Object implements ModelChangeListener
ModelChangeListener
that listens to the view model of a EMFFormsViewContext
and updates a
EMFFormsSettingToControlMapper
whenever the view model was changed in a way that is important to its
VDomainModelReferences
.Constructor and Description |
---|
ViewModelListener(EMFFormsViewContext context,
EMFFormsSettingToControlMapper mapper)
Creates a new instance of
ViewModelListener . |
Modifier and Type | Method and Description |
---|---|
boolean |
addVControl(VControl control)
Adds a
VControl to this ViewModelListener in order to check the control's
VDomainModelReference for changes to the domain
model. |
void |
dispose()
Dispose this
ViewModelListener . |
boolean |
isDisposed()
Returns whether this
ViewModelListener is disposed. |
void |
notifyChange(ModelChangeNotification notification)
Notify about a change.
|
boolean |
removeVControl(VControl control)
Remove a
VControl from this ViewModelListener . |
public ViewModelListener(EMFFormsViewContext context, EMFFormsSettingToControlMapper mapper)
ViewModelListener
.context
- The EMFFormsViewContext
this ViewModelListener
listens tomapper
- The EMFFormsSettingToControlMapper
to keep updatedpublic void notifyChange(ModelChangeNotification notification)
notifyChange
in interface ModelChangeListener
notification
- the ModelChangeNotification
ModelChangeListener.notifyChange(org.eclipse.emf.ecp.view.spi.model.ModelChangeNotification)
public boolean addVControl(VControl control)
VControl
to this ViewModelListener
in order to check the control's
VDomainModelReference
for changes to the domain
model.control
- The VControl to addViewModelListener
didn't already know the control and it was added, false otherwise.public boolean removeVControl(VControl control)
VControl
from this ViewModelListener
. It's
VDomainModelReference
will the no longer be
checked for changes to the domain model.control
- The VControl to remove.ViewModelListener
knew this VControl
and it was removed, false otherwise.public void dispose()
ViewModelListener
.public boolean isDisposed()
ViewModelListener
is disposed.ViewModelListener
is disposed, false otherwiseCopyright © 2019. All rights reserved.