|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
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 the appearence of the methods in views.
GuiAC
,
View
Method Summary | |
void |
setCondition(AbstractMethodItem method,
String condition)
Sets a condition on a method. |
void |
setCreationAllowed(FieldItem field,
boolean allow)
Tells wether should be allowed to create a new instance when editing the value of a field. |
void |
setCreationAllowedParameters(AbstractMethodItem method,
boolean[] create)
Tells if JAC object-typed (references) arguments of a method can be created while the method's invocation or if they should be choosen in existing instances list. |
void |
setDefaultValues(AbstractMethodItem method,
Object[] values)
Sets the default value for argument names of a given method item so that they can be used by GUI aspect components. |
void |
setDirectCollectionMethods(CollectionItem collection,
String[] methods)
This configuration method allows the programmer to tell the GUI to add some buttons to the collection that will invoke the corresponding methods on the currently selected collection element. |
void |
setLinkedParameters(AbstractMethodItem method,
String[] collections)
Declares some reference parameters (non-primitive object-typed parameters) of the method to be linked with a collection that gives the choices of the object in the GUI combobox. |
void |
setMethodDynamicParameterChoice(MethodItem method,
ClassItem[] targetClasses,
String[] targetMethods,
boolean[] editable)
Same as setDynamicFieldChoice but for method parameters
|
void |
setMethodParametersHeight(AbstractMethodItem method,
int[] height,
int[] rows)
Sets the height for all parameters of one method. |
void |
setMethodParametersWidth(AbstractMethodItem method,
int[] width,
int[] columns)
Sets the width for all parameters of one method. |
void |
setParameterEnums(AbstractMethodItem method,
String[] enumNames)
Declares some parameters of method as enums. |
void |
setParameterFields(AbstractMethodItem method,
String[] parameterFields)
Specify that a parameter of a method corresponds to a field within the invoked object. |
void |
setParameterNames(AbstractMethodItem method,
String[] parameterNames)
Sets the argument names of a given method item so that they can be used by GUI aspect components. |
void |
setPasswordParameters(AbstractMethodItem method,
String[] params)
Specify that a parameter of a method is a pasword method. |
Method Detail |
public void setMethodDynamicParameterChoice(MethodItem method, ClassItem[] targetClasses, String[] targetMethods, boolean[] editable)
setDynamicFieldChoice
but for method parameters
The values are dynamically defined at runtime by the invocation of a static target method. This target method must return an array of objects that contains the possible new values for the fields.
method
- the methodtargetClasses
- the array of classes that contains the
target method for each parameter (elements of this array may be null)targetMethods
- the static methods within the target
classes that returns the values to choose from (elements of this
array may be null). The prototype is
callback(Object)
where the given object is the
substance.editable
- tells if the values can be edited (new values
can be manually entered)public void setParameterNames(AbstractMethodItem method, String[] parameterNames)
The GUI aspect can automatically fill some default parameter names for all the setters to lighten the GUI aspect programmer work (however, these automatically generated names can be overloaded if needed).
method
- the method item. It can be of the form
"methodName" or "methodName(public void setParameterEnums(AbstractMethodItem method, String[] enumNames) throws Exception
method
- the methodenumNames
- the name of enums, for each parameter of the
method. Use null to leave a parameter unaffected.
Exception
public void setLinkedParameters(AbstractMethodItem method, String[] collections) throws Exception
method
- the methodcollections
- the entire names of the collections that
should be linked to the corresponding parameters (empty string
if unlinked)
Exception
public void setCreationAllowedParameters(AbstractMethodItem method, boolean[] create)
method
- the method item. It can be of the form
"methodName" or "methodName(create
- a flags arrays that tells for each parameters
whether it can be created (true) or not (false). It has no
effect if the parameter is not a JAC object (a reference)setCreationAllowed(FieldItem,boolean)
public void setCreationAllowed(FieldItem field, boolean allow)
field
- the fieldallow
- wether to allow or notsetCreationAllowedParameters(AbstractMethodItem,boolean)
public void setParameterFields(AbstractMethodItem method, String[] parameterFields)
method
- the methodparameterFields
- an array that contains the corresponding
field for each parameter of the methodpublic void setMethodParametersWidth(AbstractMethodItem method, int[] width, int[] columns) throws Exception
method
- the methodwidth
- width in pixels of all parameterscolumns
- width in columns of all parameters
Exception
public void setMethodParametersHeight(AbstractMethodItem method, int[] height, int[] rows) throws Exception
method
- the methodheight
- height in pixels of all parametersrows
- height in columns of all parameters
Exception
public void setPasswordParameters(AbstractMethodItem method, String[] params)
A password parameter will be rendered with stars instead of the actual characters.
method
- the methodpublic void setDirectCollectionMethods(CollectionItem collection, String[] methods)
collection
- the collectionmethods
- the names of the methods that can be invoked on
the selected elementpublic void setDefaultValues(AbstractMethodItem method, Object[] values)
method
- the method item. It can be of the form
"methodName" or "methodName(values
- the default parameter valuespublic void setCondition(AbstractMethodItem method, String condition)
method
- the method to put a condition oncondition
- the condition. It must be the name of method of
the same class as method which returns a boolean.
|
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 |