|
|||||||||
| 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,
ViewModelContext parent,
VElement parentVElement)
Instantiates a new view model context impl. |
|
ViewModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
ViewModelContext parent,
VElement parentVElement,
ViewModelService... modelServices)
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)
Inner method for registering context users (not ViewModelService). |
|
void |
dispose()
Dispose. |
|
ViewModelContext |
getChildContext(org.eclipse.emf.ecore.EObject eObject,
VElement parent,
VView vView,
ViewModelService... viewModelServices)
This returns the childContext for the provided EObject and the provided VElement. |
|
Object |
getContextValue(String key)
Returns the value of the context for the passed key. |
|
Set<VControl> |
getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
Returns all controls which are associated with the provided EStructuralFeature.Setting. |
|
Set<VElement> |
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 |
putContextValue(String key,
Object value)
Puts the value for the provided key into the context. |
|
void |
registerDisposeListener(ViewModelContextDisposeListener listener)
Allows to register a dispose listener. |
|
void |
registerDomainChangeListener(ModelChangeListener modelChangeListener)
Register domain change listener. |
|
void |
registerViewChangeListener(ModelChangeListener modelChangeListener)
Register view change listener. |
|
void |
removeContextUser(Object user)
Inner method for unregistering the context 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 object
public ViewModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
ViewModelContext parent,
VElement parentVElement)
view - the viewdomainObject - the domain object
public 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
public ViewModelContextImpl(VElement view,
org.eclipse.emf.ecore.EObject domainObject,
ViewModelContext parent,
VElement parentVElement,
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 ViewModelContextsetting - the EStructuralFeature.Setting to search controls for
ViewModelContext.getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting)public Set<VElement> getControlsFor(UniqueSetting setting)
UniqueSetting.
getControlsFor in interface ViewModelContextsetting - the UniqueSetting to search controls for
ViewModelContext.getControlsFor(org.eclipse.emf.ecp.common.spi.UniqueSetting)public VElement getViewModel()
getViewModel in interface ViewModelContextViewModelContext.getViewModel()public org.eclipse.emf.ecore.EObject getDomainModel()
getDomainModel in interface ViewModelContextViewModelContext.getDomainModel()public void dispose()
dispose in interface ViewModelContextpublic void registerViewChangeListener(ModelChangeListener modelChangeListener)
ViewModelContext
registerViewChangeListener in interface ViewModelContextmodelChangeListener - the model change listenerpublic void unregisterViewChangeListener(ModelChangeListener modelChangeListener)
ViewModelContext
unregisterViewChangeListener in interface ViewModelContextmodelChangeListener - the model change listenerpublic void registerDomainChangeListener(ModelChangeListener modelChangeListener)
ViewModelContext
registerDomainChangeListener in interface ViewModelContextmodelChangeListener - the model change listenerpublic void unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
ViewModelContext
unregisterDomainChangeListener in interface ViewModelContextmodelChangeListener - the model change listenerpublic <T> boolean hasService(Class<T> serviceType)
serviceType.
hasService in interface ViewModelContextT - 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 ViewModelContextT - the type of the desired serviceserviceType - the type of the service to be retrieved
ViewModelContext.getService(java.lang.Class)public void addContextUser(Object user)
ViewModelService).
addContextUser in interface ViewModelContextuser - the user of the contextpublic void removeContextUser(Object user)
removeContextUser in interface ViewModelContextuser - the user of the contextpublic Object getContextValue(String key)
getContextValue in interface ViewModelContextkey - the key of the value to get
ViewModelContext.getContextValue(java.lang.String)
public void putContextValue(String key,
Object value)
putContextValue in interface ViewModelContextkey - the key to setvalue - the Object to set into the contextViewModelContext.putContextValue(java.lang.String, java.lang.Object)
public ViewModelContext getChildContext(org.eclipse.emf.ecore.EObject eObject,
VElement parent,
VView vView,
ViewModelService... viewModelServices)
ViewModelContextVElement. If a child context
already exists it will be returned otherwise a new ViewModelContext will be created.
getChildContext in interface ViewModelContexteObject - The EObject to get the child context forparent - The VElement which requests the child contextvView - The VView of the EObjectviewModelServices - The list of ViewModelService which should be part of a child context
ViewModelContext witch is a child of the current contextpublic void registerDisposeListener(ViewModelContextDisposeListener listener)
registerDisposeListener in interface ViewModelContextlistener - The ViewModelContextDisposeListener to registerViewModelContext.registerDisposeListener(org.eclipse.emf.ecp.view.spi.context.ViewModelContextDisposeListener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||