|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This configuration interface of the Gui aspect defines all the methods that handle some behavioral configurations of the widgets.
GuiAC
,
View
Method Summary | |
void |
addViewFieldDependency(ClassItem cl,
String fieldName)
Specify that the object views of instances of a class depend on the value of a field. |
void |
captureSystemErr()
Tells the swing administration gui to capture System.err so that it appears in a tab. |
void |
captureSystemOut()
Tells the swing administration gui to capture System.out so that it appears in a tab. |
void |
setAutoCreate(FieldItem field)
This configuration method tells the GUI to automatically create a new instance of the field type when a setter or an adder is invoke on the object that owns this field. |
void |
setAutoCreateAll(ClassItem cl)
This configuration method tells that all the class methods must be in auto-creation mode. |
void |
setAutoCreateInitializer(FieldItem field,
MethodItem initializer)
Defines a method to initialize new objects created by the auto-create behaviour. |
void |
setAutoCreateParameters(AbstractMethodItem method)
This configuration method tells which parameters of the given method should be autocreated. |
void |
setAutoCreateParametersEx(ClassItem cl,
String[] excludedMethods)
This configuration method tells that all the class methods must be in auto-creation mode except the excluded ones. |
void |
setAutoCreateState(ClassItem cl,
String[] fields)
This configuration method tells which fields of the given class should be auto-created. |
void |
setClosingMethod(ClassItem cl,
String methodName)
Sets the given method to be closing (ie, when the user press the corresponding button, it performs the call and closes the current object view). |
void |
setCommitOnFocusLost(boolean value)
Set the commit method to use when attibutes are edited. |
void |
setEditableDefaultValues(CollectionItem collection,
boolean editable)
Tells if the default values of an item can be editable from the GUI. |
void |
setIndexNotFoundHandler(ClassItem cl,
MethodItem handler)
Defines a method to be called when an object referred to by it's indexed field is not found. |
void |
setInteractionHandler(MethodItem method,
MethodItem handler)
Sets a method to be used to handler user interaction when a method is called, instead of the standard "ask for parameters stuffs". |
void |
setOnSelection(CollectionItem collection,
MethodItem eventHandler)
Sets the event handler to be called when an item of the collection is selected. |
void |
setOpenViewMethod(ClassItem cl,
String methodName)
This configuration method allows the programmer to specify that the result of a given method (should be a wrappe) opens a new view on this result instead of treating it as a simple result. |
void |
setSelectionTarget(CollectionItem collection,
ClassItem targetClass,
String targetField)
Sets the field to be displayed when an item of the collection is selected, instead of the item itself. |
void |
setViewOnSelection(CollectionItem collection)
This configuration method allows the programmer to specify that the view on an object contained in a collection will be automatically opened by the GUI when the user selects it. |
Method Detail |
public void setAutoCreate(FieldItem field)
This features makes the GUI more usable in many cases (otherwhise, a intermediate step is asked to the user for creating or picking an existing instance).
field
- the field to be auto-createdpublic void setAutoCreateInitializer(FieldItem field, MethodItem initializer)
field
- the field whose autocreate behaviour is consideredinitializer
- method used to initialize new objects. It
must be a method of the field's owning class that takes an
instance of the auto created object as parameter.setAutoCreate(FieldItem)
public void setAutoCreateAll(ClassItem cl)
cl
- the classpublic void setAutoCreateParameters(AbstractMethodItem method)
It does not use the constructor view but the actual modal view on an empty created object that needs to be filled by the user.
method
- the methodpublic void setAutoCreateParametersEx(ClassItem cl, String[] excludedMethods)
cl
- the classexcludedMethods
- the excluded methods namespublic void setAutoCreateState(ClassItem cl, String[] fields)
When a wrappee of the given class is auto-created using the
setAutoCreateParameters
method, all the fields
mentioned here are also autocreated afterwards and a modal view
is shown to the user so that he can fill the values. The given
fields should be references (on other wrappees).
cl
- the classfields
- the fields to autocreatesetAutoCreateParameters(AbstractMethodItem)
public void setOpenViewMethod(ClassItem cl, String methodName)
cl
- the classmethodName
- the method nameDisplay.openView(Object)
public void setViewOnSelection(CollectionItem collection)
collection
- the collectionsetOnSelection(CollectionItem,MethodItem)
,
setSelectionTarget(CollectionItem,ClassItem,String)
public void setOnSelection(CollectionItem collection, MethodItem eventHandler)
collection
- the collectioneventHandler
- the event handler method. It must be static
method. It will be called with the following parameters : the
CustomizedGUI, the CollectionItem and the selected Object. If
the handler returns an object, it will be used as the selected
object.public void setSelectionTarget(CollectionItem collection, ClassItem targetClass, String targetField)
If the user selects an object o, o.<targetField> will be displayed instead of o.
collection
- the collectiontargetClass
- the class owning the target fieldtargetField
- the field to displaysetViewOnSelection(CollectionItem)
public void addViewFieldDependency(ClassItem cl, String fieldName)
cl
- the classfieldName
- the field namepublic void setEditableDefaultValues(CollectionItem collection, boolean editable)
public void setClosingMethod(ClassItem cl, String methodName)
cl
- the class the contains the methodmethodName
- the method item name. It can be of the form
"methodName" or "methodName(public void setCommitOnFocusLost(boolean value)
value
- If true, attribute changes are committed when the
widget loses focus. Otherwise, a commit and a cancel button are
displayed in each object view.public void captureSystemOut()
public void captureSystemErr()
public void setInteractionHandler(MethodItem method, MethodItem handler)
method
- handler
- It should be a static method taking as arguments
(Interaction,DisplayContext)public void setIndexNotFoundHandler(ClassItem cl, MethodItem handler)
cl
- the class of which the instance is not foundhandler
- the method to be called. It must be a static
method taking 2 parameters: a ClassItem, which is the class of
the object which could not be found, and an Object which is the
value of the indexed field. And it should return an Object,
which if not null will used as the found object.ClassAppearenceGuiConf.selectWithIndexedField(ClassItem,CollectionItem,String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |