org.objectweb.jac.aspects.gui
Interface FieldAppearenceGuiConf

All Known Subinterfaces:
GuiConf
All Known Implementing Classes:
GuiAC

public interface FieldAppearenceGuiConf

This configuration interface of the Gui aspect defines all the methods that handle the appearence of the fields in objects views.

Author:
Renaud Pawlak, Laurent Martelli
See Also:
GuiAC, View

Method Summary
 void groupBy(CollectionItem collection, String viewName, FieldItem groupBy)
          Groups cells of table.
 void hideTreeRelation(FieldItem field)
          This configuration method allows not to use a node to represent a given relation (collection) in a treeview, even if the show relations mode is on .
 void setAddable(CollectionItem collection, boolean addable)
          Tells wether to show an add button for a collection
 void setAdditionalRow(CollectionItem collection, String viewName, String row)
          Use a field as a row to be added at the end of a table
 void setAvailableNumRowsPerPage(CollectionItem collection, int[] numRows)
          Causes the view of a collection to let the user selects the number of rows to display simultaneously at runtime.
 void setBorder(FieldItem field)
          Sets a border to the field in an object view.
 void setBorder(FieldItem field, String alignment, String style)
          Sets a border to the field in an object view.
 void setCategories(MemberItem member, String[] categories)
          Sets the categories of an item of a class.
 void setCategory(MemberItem member, String category)
          Sets the category of an item of a class.
 void setCellViewType(CollectionItem collection, String viewName, FieldItem column, String viewType)
          Sets the view type to use for cells of a column of table, instead of the default one.
 void setChoiceView(CollectionItem collection, boolean external)
          Sets the render of a collection to be rendered by a choice and an embedded view on the selected object.
 void setCollectionType(CollectionItem collection, String type)
          Set the type of the objects of a collection.
 void setDefaultEditorHeight(ClassItem type, Length height)
          Sets the default editor height for value of a given type.
 void setDefaultEditorHeight(VirtualClassItem type, Length height)
          Sets the default editor height for value of a given type.
 void setDefaultEditorWidth(ClassItem type, Length width)
          Sets the default editor width for value of a given type.
 void setDefaultEditorWidth(VirtualClassItem type, Length width)
          Sets the default editor width for value of a given type.
 void setDefaultShowRowNumbers(boolean value)
          Tells the GUI wether to show row numbers for tables and lists by default.
 void setDefaultSortedColumn(CollectionItem collection, String column)
          Sets a default sorted column for a collection.
 void setDefaultValue(FieldItem field, MethodItem method, String value)
          Set the default value for a choice.
 void setDefaultValue(FieldItem field, String value)
          Set the default value for a choice.
 void setDescription(MemberItem member, String description)
          Sets the description of a class member (field of method).
 void setDisplayLabel(MemberItem member, boolean value)
          Wether to display a label containing the name of the field in views.
 void setDynamicFieldChoice(FieldItem field, Boolean editable, ClassItem targetClass, String targetMethod)
          Same as setFieldChoice but with dynamically defined values.
 void setDynamicFieldChoice(FieldItem field, Boolean editable, MethodItem targetMethod)
          Same as setFieldChoice but with dynamically defined values.
 void setDynamicFieldChoice(FieldItem field, CollectionItem targetCollection)
          Use objects from a collection as the available choices to edit a reference field.
 void setEditable(FieldItem field, boolean editable)
          Set a field to be editable.
 void setEditorHeight(FieldItem field, Length height)
          Sets the height of a field's editor.
 void setEditorWidth(FieldItem field, Length width)
          Sets the width of the field's embedded editor when exist.
 void setEmbeddedAdder(CollectionItem collection, boolean embedded)
          Tells the GUI wether to use an embedded view for the adder of a collection.
 void setEmbeddedEditor(MemberItem member)
          This configuration method allows the programmer to set a class member to be internally edited for the default view.
 void setEmbeddedEditor(MemberItem member, String viewName, boolean embedded)
          This configuration method allows the programmer to set a class member to be internally edited.
 void setEmbeddedEditorColumns(CollectionItem collection, String viewName, MemberItem[] members)
          Tells to use embedded editors for the cells of some columns in a given view
 void setEmbeddedEditors(ClassItem cl)
          Tells the GUI to use embedded editors in the default view for all fields of a class, whenever possible.
 void setEmbeddedEditors(ClassItem cl, String viewName, boolean embedded)
          Tells the GUI wether to use embedded editors in a view for all fields of a class.
 void setEmbeddedEditors(CollectionItem collection, String viewName, boolean embedded)
          Tells wether to use embedded editors for the cells of a table in a given view.
 void setEmbeddedView(MemberItem member)
          Tells the GUI to insert a referenced object to be displayed as an embedded view in its container object view.
 void setEmbeddedView(MemberItem member, String viewName, boolean embedded)
          Tells the GUI to insert a referenced object to be displayed as an embedded view in its container object view.
 void setEnableLinks(CollectionItem collection, String viewName, boolean enable)
          Enables or disables links for references in cells of a table
 void setFieldChoice(FieldItem field, Boolean editable, String[] choice)
          This configuration method allows the programmer to make a set of object to be proposed to the final user when an edition of this field value is performed.
 void setFieldEnum(FieldItem field, String enum)
          Declare a field as an enumeration.
 void setFileChooserView(MethodItem method, String[] fileExtensions, String fileDescription)
          Sets the view of a given setter's calling box to be a file chooser.
 void setFloatFormat(FieldItem field, String format)
          Sets the display format of a float or double field.
 void setIcon(MemberItem member, String name)
          This configuration method attaches an icon to a given field so that the iconized instances of this field will be represented by this icon (for instance in a treeview).
 void setLabel(MemberItem member, MemberItem selector, String label)
          Sets the label of a class member (field of method) for a given context
 void setLabel(MemberItem member, String label)
          Sets the label of a class member (field of method).
 void setMembersOrder(CollectionItem collection, ClassItem targetClass, String[] memberNames)
          Sets the default order in which the attributes of the elements of a collection are to be rendered.
 void setMembersOrder(CollectionItem collection, String viewName, ClassItem targetClass, String[] memberNames)
          Sets the order in which the attributes of the elements of a collection are to be rendered for a given view.
 void setMnemonics(MemberItem method, String mnemonics)
          Defines preferred mnemonics for field of method.
 void setMultiLineCollection(CollectionItem collection, String viewName, CollectionItem multiLine)
          Creates subrows in some cells of a table.
 void setNumRowsPerPage(CollectionItem collection, int numRows)
          Sets the number of rows to display simultaneously for a collection.
 void setPreferredHeight(CollectionItem collection, Length height)
          Tells the preferred height a table or list view of a collection should take, if possible.
 void setPreferredWidth(CollectionItem collection, Length width)
          Tells the preferred width a table or list view of a collection should take, if possible.
 void setRemovable(CollectionItem collection, boolean removable)
          Tells wether to show remove buttons for items of a collection
 void setStyle(FieldItem field, String style)
          Set the style of a field
 void setTableView(FieldItem field)
          Sets the render of a given field (more precisely a collection) to be rendered by a table.
 void setViewableItems(CollectionItem collection, boolean viewable)
          Tells wether items in the default view of a collection have a "view" button to open a view of the item.
 void setViewableItems(CollectionItem collection, String viewName, boolean viewable)
          Tells wether items in a given default view of a collection have a "view" button to open a view of the item.
 void setViewType(FieldItem field, String viewName, String viewType)
          Sets the view type of a field instead of using the default one ("List" or "Table").
 void setVisible(MemberItem member, boolean visible)
          Sets an item to be visible or not.
 void showColumnFilters(CollectionItem collection, String[] columnNames)
          Enables the user to filter a table by retaining only rows whose columns have a given value.
 void showRowNumbers(CollectionItem collection, boolean value)
          Tells the GUI wether to show row numbers for tables and lists.
 

Method Detail

setVisible

public void setVisible(MemberItem member,
                       boolean visible)
Sets an item to be visible or not.

If a field of method item is not visible, it will not be displayed by the object views. If a class item is not visible, then it will not be possible to open a view on objects of this class.

By default, the RTTI does not define this property and every item is visble. Thus, the GUI aspect component programmer should overload the default contructor of this class to set some visible attributes to false.

Parameters:
member - the member item (may be a method or a field name); it can be null to set the whole class visible or not
visible - whether the member must be visible
See Also:
GuiAC.isVisible(MetaItem)

setEmbeddedEditors

public void setEmbeddedEditors(ClassItem cl)
Tells the GUI to use embedded editors in the default view for all fields of a class, whenever possible.

Parameters:
cl - the class item
See Also:
FieldEditor

setEmbeddedEditors

public void setEmbeddedEditors(ClassItem cl,
                               String viewName,
                               boolean embedded)
Tells the GUI wether to use embedded editors in a view for all fields of a class.

Parameters:
cl - the class item
viewName - the view name
embedded - wether to use embedded editors by default
See Also:
FieldEditor

setEmbeddedEditors

public void setEmbeddedEditors(CollectionItem collection,
                               String viewName,
                               boolean embedded)
Tells wether to use embedded editors for the cells of a table in a given view.

Parameters:
collection - the collection whose table view to configure
viewName - the view name for which to configure
embedded - wether to use embedded editors or not in the cells of the table
See Also:
setEmbeddedEditorColumns(CollectionItem,String,MemberItem[])

setEmbeddedEditorColumns

public void setEmbeddedEditorColumns(CollectionItem collection,
                                     String viewName,
                                     MemberItem[] members)
Tells to use embedded editors for the cells of some columns in a given view

Parameters:
collection - the collection whose table view to configure
viewName - the view name for which to configure
members - wether to use embedded editors or not in the cells of the table
See Also:
setEmbeddedEditors(CollectionItem,String,boolean)

setEmbeddedEditor

public void setEmbeddedEditor(MemberItem member)
This configuration method allows the programmer to set a class member to be internally edited for the default view.

Parameters:
member - the member item to be embedded (may be a field or a method)
See Also:
FieldEditor, setEmbeddedEditor(MemberItem,String,boolean)

setEmbeddedEditor

public void setEmbeddedEditor(MemberItem member,
                              String viewName,
                              boolean embedded)
This configuration method allows the programmer to set a class member to be internally edited.

By default, each member of a class is editable with an "edit" button or link that opens a popup that allows the user to edit its value (see the FieldEditor interface). If this configuration method is called, then the editor will be embedded into the object's view the member belongs to.

Parameters:
member - the member item to be embedded (may be a field or a method)
viewName - the view for which to use an embedded editor. "default", "autocreate" or one of your own.
embedded - wether to use an editor or not
See Also:
FieldEditor, setEmbeddedEditor(MemberItem,String,boolean)

setBorder

public void setBorder(FieldItem field,
                      String alignment,
                      String style)
Sets a border to the field in an object view.

Parameters:
field - the field
alignment - LEFT: title is on the left, RIGHT: title is on the right, CENTER: title is centered
style - LINE: the border is a line, ETCHED: the border is a 3D line, LOWERED: the border is a 3D effect that makes the bordered element lowered, RAISED: the border is a 3D effect that makes the bordered element raised.
See Also:
setBorder(FieldItem)

setBorder

public void setBorder(FieldItem field)
Sets a border to the field in an object view. Uses a default style (LINE) and alignement(LEFT)

Parameters:
field - the field
See Also:
setBorder(FieldItem,String,String)

setEditorWidth

public void setEditorWidth(FieldItem field,
                           Length width)
Sets the width of the field's embedded editor when exist.

Parameters:
field - the field
width - the editor width
See Also:
setEmbeddedEditor(MemberItem), setEditorHeight(FieldItem,Length), setDefaultEditorWidth(ClassItem,Length)

setDefaultEditorWidth

public void setDefaultEditorWidth(VirtualClassItem type,
                                  Length width)
Sets the default editor width for value of a given type.

Parameters:
type - the type
width - the editor width
See Also:
setDefaultEditorWidth(ClassItem,Length), setDefaultEditorHeight(VirtualClassItem,Length), setEditorWidth(FieldItem,Length)

setDefaultEditorWidth

public void setDefaultEditorWidth(ClassItem type,
                                  Length width)
Sets the default editor width for value of a given type.

Parameters:
type - the type
width - the editor width
See Also:
setDefaultEditorWidth(VirtualClassItem,Length), setDefaultEditorHeight(VirtualClassItem,Length), setEditorWidth(FieldItem,Length)

setEditable

public void setEditable(FieldItem field,
                        boolean editable)
Set a field to be editable.

Parameters:
field - the field
editable - the flag (true is default)

setEditorHeight

public void setEditorHeight(FieldItem field,
                            Length height)
Sets the height of a field's editor. It does not affect single line editors (used by primitive types)

Parameters:
field - the field
height - the editor height
See Also:
setEmbeddedEditor(MemberItem), setEditorWidth(FieldItem,Length), setDefaultEditorHeight(ClassItem,Length)

setDefaultEditorHeight

public void setDefaultEditorHeight(VirtualClassItem type,
                                   Length height)
Sets the default editor height for value of a given type.

Parameters:
type - the type
height - the editor height
See Also:
setDefaultEditorHeight(ClassItem,Length), setDefaultEditorWidth(VirtualClassItem,Length), setEditorHeight(FieldItem,Length)

setDefaultEditorHeight

public void setDefaultEditorHeight(ClassItem type,
                                   Length height)
Sets the default editor height for value of a given type.

Parameters:
type - the type
height - the editor height
See Also:
setDefaultEditorHeight(VirtualClassItem,Length), setDefaultEditorWidth(VirtualClassItem,Length), setEditorHeight(FieldItem,Length)

setCategory

public void setCategory(MemberItem member,
                        String category)
Sets the category of an item of a class.

The category must correspond to one of these defined on the class with the setCategories configuration method.

Parameters:
member - the member to categorize (a method or a field)
category - the existing category name
See Also:
setCategories(MemberItem,String[]), ClassAppearenceGuiConf.setCategories(ClassItem,String[])

setCategories

public void setCategories(MemberItem member,
                          String[] categories)
Sets the categories of an item of a class.

The category must correspond to one of these defined on the class with the setCategories configuration method.

Parameters:
member - the member to categorize (a method or a field)
categories - the existing category names
See Also:
setCategory(MemberItem,String), ClassAppearenceGuiConf.setCategories(ClassItem,String[])

setEmbeddedView

public void setEmbeddedView(MemberItem member)
Tells the GUI to insert a referenced object to be displayed as an embedded view in its container object view.

Parameters:
member - the member (reference field or method) that must be embedded
See Also:
setEmbeddedView(MemberItem,String,boolean)

setEmbeddedView

public void setEmbeddedView(MemberItem member,
                            String viewName,
                            boolean embedded)
Tells the GUI to insert a referenced object to be displayed as an embedded view in its container object view.

Parameters:
member - the member (reference field or method) that must be embedded
viewName - the view for which the member must be embedded
embedded - wether to embedded the member or not
See Also:
setEmbeddedView(MemberItem)

setEmbeddedAdder

public void setEmbeddedAdder(CollectionItem collection,
                             boolean embedded)
Tells the GUI wether to use an embedded view for the adder of a collection.

Parameters:
collection - the collection
embedded - wether to use an embedded view for the adder

setTableView

public void setTableView(FieldItem field)
Sets the render of a given field (more precisely a collection) to be rendered by a table.

In a table view, each item of the displayed collection fills a table line. Each column represents one field of the objects whithin the collection (the item within the collection whould be of the same class --- or at least share a common superclass).

Parameters:
field - the field that contains the collection

setChoiceView

public void setChoiceView(CollectionItem collection,
                          boolean external)
Sets the render of a collection to be rendered by a choice and an embedded view on the selected object.

Parameters:
collection - the collection
external - tell if the object is embedded in the current view or if is is opened in an external panel (given by GuiConf.addReferenceToPane(String,MemberItem,String)

showRowNumbers

public void showRowNumbers(CollectionItem collection,
                           boolean value)
Tells the GUI wether to show row numbers for tables and lists.

Parameters:
collection - the affected collection
value - wether to show row numbers
See Also:
setDefaultShowRowNumbers(boolean)

setDefaultShowRowNumbers

public void setDefaultShowRowNumbers(boolean value)
Tells the GUI wether to show row numbers for tables and lists by default.

Parameters:
value - wether to show row numbers
See Also:
showRowNumbers(CollectionItem,boolean)

setDefaultSortedColumn

public void setDefaultSortedColumn(CollectionItem collection,
                                   String column)
Sets a default sorted column for a collection.

By default, collections are not sorted. You can precise a column to use to sort the collection by default. It will be used at the construction of the collection.

Parameters:
collection - the collection
column - the column used to sort (it is a fieldItem, watch out for case). You may preprend a '-' to use the reverse order of that column.

setMembersOrder

public void setMembersOrder(CollectionItem collection,
                            ClassItem targetClass,
                            String[] memberNames)
Sets the default order in which the attributes of the elements of a collection are to be rendered.

Parameters:
collection - the collection
targetClass - the class of attributes to render
memberNames - the name of the members in the rendering order
See Also:
setMembersOrder(CollectionItem,String,ClassItem,String[]), ClassAppearenceGuiConf.setTableMembersOrder(ClassItem,String[]), ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String[])

setMembersOrder

public void setMembersOrder(CollectionItem collection,
                            String viewName,
                            ClassItem targetClass,
                            String[] memberNames)
Sets the order in which the attributes of the elements of a collection are to be rendered for a given view.

Parameters:
collection - the collection
viewName - the type for which to set the members order
targetClass - the class of attributes to render
memberNames - the name of the members in the rendering order
See Also:
setMembersOrder(CollectionItem,ClassItem,String[])

setFieldChoice

public void setFieldChoice(FieldItem field,
                           Boolean editable,
                           String[] choice)
This configuration method allows the programmer to make a set of object to be proposed to the final user when an edition of this field value is performed.

Most of the GUI will propose the choice within a ComboBox.

When the choices values can not be defined at programming time but must be dynamically created, then the programmer can use the setDynamicFieldChoice method.

Parameters:
field - the field
choice - the values the user will have to choose from when a edition of the field is performed
See Also:
setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String), setFieldChoice(FieldItem,Boolean,String[]), setFieldEnum(FieldItem,String), GuiConf.defineEnum(String,String[],int,int)

setFieldEnum

public void setFieldEnum(FieldItem field,
                         String enum)

Declare a field as an enumeration.

Parameters:
field - the field
enum - the name of the enumeration
See Also:
GuiConf.defineEnum(String,String[],int,int), setFieldChoice(FieldItem,Boolean,String[]), setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String)

setDynamicFieldChoice

public void setDynamicFieldChoice(FieldItem field,
                                  Boolean editable,
                                  ClassItem targetClass,
                                  String targetMethod)
Same as setFieldChoice but with dynamically defined values.

The values are dynamically defined at runtime by the invocation of a target method. This target method must return a collection of objects or an array of objects that contains the possible new values for the fields.

If the target method is static, it will be called with the object as the only parameter. If it's not static, it will called on the object with no parameters.

Parameters:
field - the field
targetClass - the class that contains the target method
targetMethod - name of a static method within the target class that returns the values to choose from. It must take an Object as parameter which will be the instance to which the field belongs to.
See Also:
setDynamicFieldChoice(FieldItem,Boolean,MethodItem), ClassAppearenceGuiConf.setDynamicClassChoice(String,MethodItem)

setDynamicFieldChoice

public void setDynamicFieldChoice(FieldItem field,
                                  Boolean editable,
                                  MethodItem targetMethod)
Same as setFieldChoice but with dynamically defined values.

Parameters:
field - the field
targetMethod - a static method that returns the values to choose from. It must take an Object as parameter which will be the instance to which the field belongs to.
See Also:
setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String), ClassAppearenceGuiConf.setDynamicClassChoice(String,MethodItem)

setDynamicFieldChoice

public void setDynamicFieldChoice(FieldItem field,
                                  CollectionItem targetCollection)
Use objects from a collection as the available choices to edit a reference field.

Parameters:
field - the edited reference field
targetCollection - the collection. It belong to same class as the field.

setCollectionType

public void setCollectionType(CollectionItem collection,
                              String type)
Set the type of the objects of a collection.

If this method is not used, the collection type can be dynamically found out by the GUI from the adder's argument types.

Parameters:
collection - the collection within this class
type - the type of this collection (an exiting class name)

setPreferredHeight

public void setPreferredHeight(CollectionItem collection,
                               Length height)
Tells the preferred height a table or list view of a collection should take, if possible.

Parameters:
collection - the collection
height - the preferred height
See Also:
setPreferredWidth(CollectionItem,Length)

setPreferredWidth

public void setPreferredWidth(CollectionItem collection,
                              Length width)
Tells the preferred width a table or list view of a collection should take, if possible.

Parameters:
collection - the collection
width - the preferred width
See Also:
setPreferredHeight(CollectionItem,Length)

setNumRowsPerPage

public void setNumRowsPerPage(CollectionItem collection,
                              int numRows)
Sets the number of rows to display simultaneously for a collection.

This is only used by the web GUI so that generated web pages are not too big. If the number of elements in the collection is bigger than numRows, a "previous" and a "next" button are displayed so that the user can see the rest of the collection. The default is 10. Use 0 to display all rows.

Parameters:
collection - the collection
numRows - the number of rows per page
See Also:
setAvailableNumRowsPerPage(CollectionItem,int[])

setAvailableNumRowsPerPage

public void setAvailableNumRowsPerPage(CollectionItem collection,
                                       int[] numRows)
Causes the view of a collection to let the user selects the number of rows to display simultaneously at runtime.

Parameters:
collection - the collection
numRows - the numbers of rows per page the user can choose from.
See Also:
setNumRowsPerPage(CollectionItem,int)

showColumnFilters

public void showColumnFilters(CollectionItem collection,
                              String[] columnNames)
Enables the user to filter a table by retaining only rows whose columns have a given value. This feature is only available on the web GUI for the moment.

Parameters:
collection - the collection to configure
columnNames - the field names (from the collection's component type) that can be filtered

setFileChooserView

public void setFileChooserView(MethodItem method,
                               String[] fileExtensions,
                               String fileDescription)
Sets the view of a given setter's calling box to be a file chooser.

As logically expected, the type of the set field must be a String or an URL.

Parameters:
method - the method item. It can be of the form "methodName" or "methodName()". The first syntax will use the method with that name. The second syntax allow you to specify parameter types (separated by commas, with no spaces).
fileExtensions - allowed file extensions to choose from
fileDescription -
See Also:
URL, GuiAC.isFileChooserView(MethodItem)

setIcon

public void setIcon(MemberItem member,
                    String name)
This configuration method attaches an icon to a given field so that the iconized instances of this field will be represented by this icon (for instance in a treeview).

Parameters:
member - the member (field or method)
name - the icon's resource name

hideTreeRelation

public void hideTreeRelation(FieldItem field)
This configuration method allows not to use a node to represent a given relation (collection) in a treeview, even if the show relations mode is on .

Parameters:
field - the field

setDefaultValue

public void setDefaultValue(FieldItem field,
                            MethodItem method,
                            String value)
Set the default value for a choice.

The default value is dynamically calculated by the method parameter from the string value (result can be an object). A default implementation for method is provided by GuiAC.

Parameters:
field - the field
method - a static method that returns the default value (prototype: Object m(FieldItem,String))
value - the string representation of the default value
See Also:
GuiAC.getDefaultValue(FieldItem,String)

setDefaultValue

public void setDefaultValue(FieldItem field,
                            String value)
Set the default value for a choice.

Same as setDefaultValue(ClassItem, String, MethodItem, String) using default MethodItem GuiAC.getDefaultValue.

Parameters:
field - the field
value - the string representation of the default value
See Also:
GuiAC.getDefaultValue(FieldItem,String), setDefaultValue(FieldItem,MethodItem,String)

setFloatFormat

public void setFloatFormat(FieldItem field,
                           String format)
Sets the display format of a float or double field.

Parameters:
field - the field
format - the display format of the field
See Also:
DecimalFormat

setDescription

public void setDescription(MemberItem member,
                           String description)
Sets the description of a class member (field of method).

Parameters:
member - the member
description - the description of the class member

setLabel

public void setLabel(MemberItem member,
                     String label)
Sets the label of a class member (field of method).

Parameters:
member - the member
label - the label of the class member
See Also:
setLabel(MemberItem,MemberItem,String)

setLabel

public void setLabel(MemberItem member,
                     MemberItem selector,
                     String label)
Sets the label of a class member (field of method) for a given context

Parameters:
member - the member
selector - use the label when inside the view of his member item
label - the label of the class member
See Also:
setLabel(MemberItem,String)

setDisplayLabel

public void setDisplayLabel(MemberItem member,
                            boolean value)
Wether to display a label containing the name of the field in views.

Parameters:
member - the member
value - boolean indicating wether to display the label

setStyle

public void setStyle(FieldItem field,
                     String style)
Set the style of a field

Parameters:
field - the field
style - the CSS style
See Also:
ClassAppearenceGuiConf.setStyle(ClassItem,String), GuiConf.addStyleSheetURL(String), GuiConf.addStyleSheetURL(String,String)

setAddable

public void setAddable(CollectionItem collection,
                       boolean addable)
Tells wether to show an add button for a collection

Parameters:
collection - the collection to configure
addable - wether to show a button or not
See Also:
setRemovable(CollectionItem,boolean)

setRemovable

public void setRemovable(CollectionItem collection,
                         boolean removable)
Tells wether to show remove buttons for items of a collection

Parameters:
collection - the collection to configure
removable - wether to show buttons or not
See Also:
setAddable(CollectionItem,boolean)

setViewType

public void setViewType(FieldItem field,
                        String viewName,
                        String viewType)
Sets the view type of a field instead of using the default one ("List" or "Table"). It allows you to define a custom view constructor for that type in order to handle complex tables. The view constructor must take 3 arguments: a CollectionItem, an Object (the susbtance), and a CollectionItemView)


setViewableItems

public void setViewableItems(CollectionItem collection,
                             boolean viewable)
Tells wether items in the default view of a collection have a "view" button to open a view of the item.

Parameters:
collection - the collection
viewable - wether items are viewable
See Also:
setViewableItems(CollectionItem,String,boolean)

setViewableItems

public void setViewableItems(CollectionItem collection,
                             String viewName,
                             boolean viewable)
Tells wether items in a given default view of a collection have a "view" button to open a view of the item.

Parameters:
collection - the collection
viewName - the view to configure
viewable - wether items have a view button
See Also:
setViewableItems(CollectionItem,boolean)

setEnableLinks

public void setEnableLinks(CollectionItem collection,
                           String viewName,
                           boolean enable)
Enables or disables links for references in cells of a table


groupBy

public void groupBy(CollectionItem collection,
                    String viewName,
                    FieldItem groupBy)
Groups cells of table.

Parameters:
collection - the collection whose table cells to group
viewName - the view to configure
groupBy - group adjacent cells with same values of columns whose field start with this field
See Also:
setMultiLineCollection(CollectionItem,String,CollectionItem)

setMultiLineCollection

public void setMultiLineCollection(CollectionItem collection,
                                   String viewName,
                                   CollectionItem multiLine)
Creates subrows in some cells of a table.

Parameters:
collection - the collection whose table cells to subdivide
viewName - the view to configure
multiLine - subdivide cells of columns whose field start with this field
See Also:
groupBy(CollectionItem,String,FieldItem)

setAdditionalRow

public void setAdditionalRow(CollectionItem collection,
                             String viewName,
                             String row)
Use a field as a row to be added at the end of a table


setCellViewType

public void setCellViewType(CollectionItem collection,
                            String viewName,
                            FieldItem column,
                            String viewType)
Sets the view type to use for cells of a column of table, instead of the default one.

Parameters:
collection - the collection to configure
viewName - the view to configure
column - the column to configure
viewType - the view type to use for that column
See Also:
GuiConf.setViewConstructor(String,String,AbstractMethodItem)

setMnemonics

public void setMnemonics(MemberItem method,
                         String mnemonics)
Defines preferred mnemonics for field of method.

Parameters:
method -
mnemonics - the mnemonics