|
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.aspects.gui.EventHandler
This handler manages events received from GUIs (web and swing for now). It is especially used for lists and arrays (onSelection, onView, etc ...)
Constructor Summary | |
EventHandler()
|
Method Summary | |
void |
fieldUpdated(Object substance,
FieldItem field,
Object value,
Object param)
Upcalled when a field was modified. |
static EventHandler |
get()
|
static void |
initAutocreatedObject(Object created,
Object substance,
FieldItem role)
Initialize an autocreated object by setting |
void |
maybeInvalidatePane(ViewFactory factory,
DisplayContext context,
CustomizedView customizedView,
String selectedPaneID)
Removes the content of pane when another pane's content is changed |
void |
onAddToCollection(DisplayContext context,
Object substance,
CollectionItem collection)
This method is upcalled when an object is added to a collection. |
void |
onAddToCollection(DisplayContext context,
Object substance,
CollectionItem collection,
boolean noAutoCreate)
This method is upcalled when an object is added to a collection. |
Object |
onCreateObject(DisplayContext context,
ClassItem cli,
Object substance,
FieldItem field)
This method is upcalled when an object has to be created in an object chooser. |
void |
onDropObject(DisplayContext context,
Object target,
Object droppedObject,
Object source,
boolean copy)
|
void |
onInvoke(DisplayContext context,
Object substance,
AbstractMethodItem method)
Upcalled when an invocation is performed on an object. |
void |
onInvoke(DisplayContext context,
Object substance,
AbstractMethodItem method,
boolean askFormParameters,
Object[] parameters,
String[] attrNames,
Object[] attrValues)
Invoke a method in the general case. |
void |
onInvoke(DisplayContext context,
Object substance,
AbstractMethodItem method,
String[] attrNames,
Object[] attrValues)
Upcalled when an invocation is performed on an object. |
void |
onInvokeDirect(DisplayContext context,
Object substance,
AbstractMethodItem method,
Object[] parameters)
Upcalled when a direct invocation is performed on an object (no parameters will be asked by the GUI). |
Object |
onInvokeSynchronous(DisplayContext context,
Object substance,
AbstractMethodItem method,
Object[] parameters)
Invoke a method and waits for the result (and returns it). |
void |
onNodeSelection(DisplayContext context,
AbstractNode node,
boolean forceView)
Upcalled when a tree node is selected. |
void |
onRemoveFromCollection(DisplayContext context,
Object substance,
CollectionItem collection,
boolean askFormParameters)
This method is upcalled when an object is removed from a collection. |
void |
onRemoveFromCollection(DisplayContext context,
Object substance,
CollectionItem collection,
Object selected,
boolean askFormParameters)
This method is upcalled when an object is removed from a collection. |
void |
onSelection(DisplayContext context,
MemberItem container,
Object selectedObject,
FieldItem field,
Object extraOption)
Upcalled when a selection occurs on a field. |
void |
onSelection(DisplayContext context,
MemberItem container,
Object selectedObject,
FieldItem field,
Object extraOption,
boolean forceView)
Upcalled when a selection occurs on a field. |
void |
onView(DisplayContext context,
MemberItem container,
Object selectedObject,
FieldItem field,
Object extraOption)
Upcalled when a view is asked on an object. |
void |
setFocus(View top,
FieldItem field,
Object option)
Gives focus to the view which is a field editor for a given field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EventHandler()
Method Detail |
public static EventHandler get()
public void onSelection(DisplayContext context, MemberItem container, Object selectedObject, FieldItem field, Object extraOption)
context
- the contextcontainer
- ???selectedObject
- the selected objectfield
- ???extraOption
- public void onView(DisplayContext context, MemberItem container, Object selectedObject, FieldItem field, Object extraOption)
context
- the contextcontainer
- ???selectedObject
- the selected objectfield
- ???extraOption
- public void onSelection(DisplayContext context, MemberItem container, Object selectedObject, FieldItem field, Object extraOption, boolean forceView)
context
- the contextcontainer
- member (reference, collection, or method) that
references the selected object (the result in case of a method)selectedObject
- the selected objectfield
- give focus to this field in the view of the selected objectextraOption
- forceView
- when true, a window containing the selected
object is openedpublic void maybeInvalidatePane(ViewFactory factory, DisplayContext context, CustomizedView customizedView, String selectedPaneID)
selectedPaneID
- ID of the selected panepublic void setFocus(View top, FieldItem field, Object option)
top
- view to start searching from. All subviews of this
view will be recursively inspected.field
- the field whose editor to search foroption
- an option that will be passed when calling
onSetFocus()
on the FieldEditor.FieldEditor.onSetFocus(Object)
public static void initAutocreatedObject(Object created, Object substance, FieldItem role)
public void onNodeSelection(DisplayContext context, AbstractNode node, boolean forceView)
context
- the display contextnode
- the selected tree nodeforceView
- if true, the subtance of the node is opened in
a new windowpublic void onInvokeDirect(DisplayContext context, Object substance, AbstractMethodItem method, Object[] parameters)
context
- the display contextsubstance
- the object that holds the methodmethod
- the method to invokeparameters
- the parameters of the methodpublic void onInvoke(DisplayContext context, Object substance, AbstractMethodItem method)
context
- the display contextsubstance
- the object that holds the methodmethod
- the method to invokepublic void onInvoke(DisplayContext context, Object substance, AbstractMethodItem method, String[] attrNames, Object[] attrValues)
context
- the display contextsubstance
- the object that holds the methodmethod
- the method to invokeattrValues
- the contextual attributes valuespublic void onInvoke(DisplayContext context, Object substance, AbstractMethodItem method, boolean askFormParameters, Object[] parameters, String[] attrNames, Object[] attrValues)
context
- the display contextsubstance
- the object that holds the methodmethod
- the method to invokeparameters
- the method's parametersattrValues
- the contextual attributes valuespublic Object onInvokeSynchronous(DisplayContext context, Object substance, AbstractMethodItem method, Object[] parameters)
context
- the display contextsubstance
- the object that holds the methodmethod
- the method to invokeparameters
- the method's parameterspublic void onAddToCollection(DisplayContext context, Object substance, CollectionItem collection)
context
- the display contextsubstance
- the object that holds the collectioncollection
- the collectionpublic void onAddToCollection(DisplayContext context, Object substance, CollectionItem collection, boolean noAutoCreate)
context
- the display contextsubstance
- the object that holds the collectioncollection
- the collectionnoAutoCreate
- if true, does not auto create the object to
add, whatever the configuration for the collection.public void onRemoveFromCollection(DisplayContext context, Object substance, CollectionItem collection, boolean askFormParameters)
context
- the display contextsubstance
- the object that holds the collectioncollection
- the collectionpublic void onRemoveFromCollection(DisplayContext context, Object substance, CollectionItem collection, Object selected, boolean askFormParameters)
context
- the display contextsubstance
- the object that holds the collectioncollection
- the collectionselected
- the object to remove in the collectionpublic Object onCreateObject(DisplayContext context, ClassItem cli, Object substance, FieldItem field)
context
- the display contextcli
- the class of the object to createsubstance
- field
- a field to which the created object will be "added". May be null.public void onDropObject(DisplayContext context, Object target, Object droppedObject, Object source, boolean copy)
public void fieldUpdated(Object substance, FieldItem field, Object value, Object param)
FieldUpdate
fieldUpdated
in interface FieldUpdate
substance
- the object of which a field was updatedfield
- the updated fieldvalue
- new value of the vieldparam
- extra infos (unused)ViewControlWrapper.registerField(Wrappee,FieldItem,FieldUpdate,Object)
|
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 |