|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.ecp.view.internal.context.ViewModelContextImpl
public class ViewModelContextImpl
The Class ViewModelContextImpl.
Constructor Summary | |
---|---|
ViewModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject)
Instantiates a new view model context impl. |
|
ViewModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
ViewModelService... modelServices)
Instantiates a new view model context impl. |
Method Summary | ||
---|---|---|
void |
addContextUser(Object user)
|
|
void |
dispose()
Dispose. |
|
Set<VControl> |
getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
Returns all controls which are associated with the provided EStructuralFeature.Setting . |
|
Set<VControl> |
getControlsFor(UniqueSetting setting)
Returns all controls which are associated with the provided UniqueSetting . |
|
org.eclipse.emf.ecore.EObject |
getDomainModel()
Gets the domain model. |
|
|
getService(Class<T> serviceType)
Retrieve an ViewModelService of type serviceType . |
|
VElement |
getViewModel()
Gets the view model. |
|
|
hasService(Class<T> serviceType)
Whether the context has a service of the given type serviceType . |
|
void |
registerDomainChangeListener(ModelChangeListener modelChangeListener)
Register domain change listener. |
|
void |
registerViewChangeListener(ModelChangeListener modelChangeListener)
Register view change listener. |
|
void |
removeContextUser(Object user)
|
|
void |
unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
Unregister domain change listener. |
|
void |
unregisterViewChangeListener(ModelChangeListener modelChangeListener)
Unregister view change listener. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewModelContextImpl(VElement view, org.eclipse.emf.ecore.EObject domainObject)
view
- the viewdomainObject
- the domain objectpublic ViewModelContextImpl(VElement view, org.eclipse.emf.ecore.EObject domainObject, ViewModelService... modelServices)
view
- the viewdomainObject
- the domain objectmodelServices
- an array of services to use in the ViewModelContext
Method Detail |
---|
public Set<VControl> getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
EStructuralFeature.Setting
. The EStructuralFeature.Setting
is converted to
a UniqueSetting
.
getControlsFor
in interface ViewModelContext
setting
- the EStructuralFeature.Setting
to search controls for
ViewModelContext.getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting)
public Set<VControl> getControlsFor(UniqueSetting setting)
UniqueSetting
.
getControlsFor
in interface ViewModelContext
setting
- the UniqueSetting
to search controls for
ViewModelContext.getControlsFor(org.eclipse.emf.ecp.common.UniqueSetting)
public VElement getViewModel()
getViewModel
in interface ViewModelContext
ViewModelContext.getViewModel()
public org.eclipse.emf.ecore.EObject getDomainModel()
getDomainModel
in interface ViewModelContext
ViewModelContext.getDomainModel()
public void dispose()
dispose
in interface ViewModelContext
public void registerViewChangeListener(ModelChangeListener modelChangeListener)
registerViewChangeListener
in interface ViewModelContext
modelChangeListener
- the model change listenerorg.eclipse.emf.ecp.view.spi.context.ViewModelContext#registerViewChangeListener(org.eclipse.emf.ecp.view.spi.context.ViewModelContext.ModelChangeAddRemoveListener)
public void unregisterViewChangeListener(ModelChangeListener modelChangeListener)
unregisterViewChangeListener
in interface ViewModelContext
modelChangeListener
- the model change listenerorg.eclipse.emf.ecp.view.spi.context.ViewModelContext#unregisterViewChangeListener(org.eclipse.emf.ecp.view.spi.context.ViewModelContext.ModelChangeAddRemoveListener)
public void registerDomainChangeListener(ModelChangeListener modelChangeListener)
registerDomainChangeListener
in interface ViewModelContext
modelChangeListener
- the model change listenerorg.eclipse.emf.ecp.view.spi.context.ViewModelContext#registerDomainChangeListener(org.eclipse.emf.ecp.view.spi.context.ViewModelContext.ModelChangeAddRemoveListener)
public void unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
unregisterDomainChangeListener
in interface ViewModelContext
modelChangeListener
- the model change listenerorg.eclipse.emf.ecp.view.spi.context.ViewModelContext#unregisterDomainChangeListener(org.eclipse.emf.ecp.view.spi.context.ViewModelContext.ModelChangeAddRemoveListener)
public <T> boolean hasService(Class<T> serviceType)
serviceType
.
hasService
in interface ViewModelContext
T
- the type of the desired serviceserviceType
- the type of the service
true
, if the context has a service of the given type, false
otherwiseViewModelContext.hasService(java.lang.Class)
public <T> T getService(Class<T> serviceType)
ViewModelService
of type serviceType
.
getService
in interface ViewModelContext
T
- the type of the desired serviceserviceType
- the type of the service to be retrieved
ViewModelContext.getService(java.lang.Class)
public void addContextUser(Object user)
public void removeContextUser(Object user)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |