|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ViewModelContext
The Interface ViewModelContext.
Method Summary | ||
---|---|---|
void |
addContextUser(Object user)
Adds a user of the context. |
|
void |
dispose()
Disposes the context. |
|
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)
Removes a context user. |
|
void |
unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
Unregister domain change listener. |
|
void |
unregisterViewChangeListener(ModelChangeListener modelChangeListener)
Unregister view change listener. |
Method Detail |
---|
void registerDomainChangeListener(ModelChangeListener modelChangeListener)
modelChangeListener
- the model change listenervoid unregisterDomainChangeListener(ModelChangeListener modelChangeListener)
modelChangeListener
- the model change listenerVElement getViewModel()
org.eclipse.emf.ecore.EObject getDomainModel()
void registerViewChangeListener(ModelChangeListener modelChangeListener)
modelChangeListener
- the model change listenervoid unregisterViewChangeListener(ModelChangeListener modelChangeListener)
modelChangeListener
- the model change listenervoid dispose()
<T> boolean hasService(Class<T> serviceType)
serviceType
.
T
- the type of the desired serviceserviceType
- the type of the service
true
, if the context has a service of the given type, false
otherwise<T> T getService(Class<T> serviceType)
ViewModelService
of type serviceType
.
T
- the type of the desired serviceserviceType
- the type of the service to be retrieved
Set<VControl> getControlsFor(org.eclipse.emf.ecore.EStructuralFeature.Setting setting)
EStructuralFeature.Setting
. The EStructuralFeature.Setting
is converted to
a UniqueSetting
.
setting
- the EStructuralFeature.Setting
to search controls for
Set<VElement> getControlsFor(UniqueSetting setting)
UniqueSetting
.
setting
- the UniqueSetting
to search controls for
Object getContextValue(String key)
key
- the key of the value to get
void putContextValue(String key, Object value)
key
- the key to setvalue
- the Object to set into the contextViewModelContext getChildContext(org.eclipse.emf.ecore.EObject eObject, VElement parent, VView vView, ViewModelService... viewModelServices)
VElement
. If a child context
already exists it will be returned otherwise a new ViewModelContext
will be created.
eObject
- The EObject
to get the child context forparent
- The VElement
which requests the child contextvView
- The VView
of the EObject
viewModelServices
- The list of ViewModelService
which should be part of a child context
ViewModelContext
witch is a child of the current contextvoid registerDisposeListener(ViewModelContextDisposeListener listener)
listener
- The ViewModelContextDisposeListener
to registervoid addContextUser(Object user)
user
- The context user to addvoid removeContextUser(Object user)
user
- The context user to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |