|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.core.Wrapper | +--org.objectweb.jac.aspects.gui.ViewControlWrapper
This wrapper updates the views of a given object when its state changes, that is to say when a write method is called on the wrappee.
A view controller can control several views of the same wrappee at the same time.
This mecanism is similar to the famous MVC design pattern. The model is the wrappee and the controller is the wrapper.
View
,
registerObject(Wrappee,ObjectUpdate,Object)
,
registerField(Wrappee,FieldItem,FieldUpdate,Object)
,
registerCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
,
unregisterObject(Wrappee,ObjectUpdate)
,
unregisterField(Wrappee,FieldItem,FieldUpdate)
,
unregisterCollection(Wrappee,CollectionItem,CollectionUpdate)
,
Serialized FormField Summary |
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac |
Constructor Summary | |
ViewControlWrapper(AspectComponent ac)
Creates an empty view control wrapper. |
Method Summary | |
void |
registerCollection(Wrappee wrappee,
CollectionItem collection,
CollectionUpdate client,
Object param)
Register for a collectionUpdated event. |
void |
registerField(Wrappee wrappee,
FieldItem field,
FieldUpdate client,
Object param)
Register for a fieldUpdated event. |
void |
registerMethod(Wrappee wrappee,
MethodItem method,
MethodUpdate client,
Object param)
Register for a fieldUpdated event. |
void |
registerObject(Wrappee wrappee,
ObjectUpdate client,
Object param)
Register for an objectUpdated event. |
void |
unregister(Wrappee wrappee,
Object client)
Unregister a client from all update events |
void |
unregisterCollection(Wrappee wrappee,
CollectionItem collection,
CollectionUpdate client)
Unregister from a collectionUpdated event. |
void |
unregisterField(Wrappee wrappee,
FieldItem field,
FieldUpdate client)
Unregister from a fieldUpdated event. |
void |
unregisterMethod(Wrappee wrappee,
MethodItem method,
MethodUpdate client)
|
void |
unregisterObject(Wrappee wrappee,
ObjectUpdate client)
Unregister from an objectUpdated event. |
Object |
updateView(Interaction interaction)
A wrapping method that updates the views of the objects. |
Methods inherited from class org.objectweb.jac.core.Wrapper |
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ViewControlWrapper(AspectComponent ac)
Method Detail |
public void registerField(Wrappee wrappee, FieldItem field, FieldUpdate client, Object param)
wrappee
- field
- the field whose updates must be notifiedclient
- the object to notify when the field is updatedparam
- unregisterField(Wrappee,FieldItem,FieldUpdate)
public void unregisterField(Wrappee wrappee, FieldItem field, FieldUpdate client)
field
- the field whose updates must not be notified anymoreclient
- the object not to notify anymoreregisterField(Wrappee,FieldItem,FieldUpdate,Object)
public void registerCollection(Wrappee wrappee, CollectionItem collection, CollectionUpdate client, Object param)
client
- the object to notify when the field is updatedunregisterCollection(Wrappee,CollectionItem,CollectionUpdate)
public void unregisterCollection(Wrappee wrappee, CollectionItem collection, CollectionUpdate client)
collection
- the collection whose updates must not be notified anymoreclient
- the object not to notify anymoreregisterCollection(Wrappee,CollectionItem,CollectionUpdate,Object)
public void registerMethod(Wrappee wrappee, MethodItem method, MethodUpdate client, Object param)
wrappee
- method
- the method whose updates must be notifiedclient
- the object to notify when the field is updatedparam
- unregisterField(Wrappee,FieldItem,FieldUpdate)
public void unregisterMethod(Wrappee wrappee, MethodItem method, MethodUpdate client)
public void registerObject(Wrappee wrappee, ObjectUpdate client, Object param)
client
- whom to notify when the wrappee is updatedparam
- an object that will be passed back to client on
each notification event.public void unregisterObject(Wrappee wrappee, ObjectUpdate client)
client
- whom not to notify anymorepublic void unregister(Wrappee wrappee, Object client)
wrappee
- the object to unregister fromclient
- the client to unregisterpublic Object updateView(Interaction interaction)
It uses the RTTI aspect to know the fields and the collections
that are written, added, or removed by the currently wrapped
method. Then it upcall the refreshStateComponent
of
all the controlled views to refresh the implied GUI
components.
ObjectUpdate
,
FieldUpdate
,
CollectionUpdate
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |