001    /*
002      Copyright (C) 2001-2003 Renaud Pawlak <renaud@aopsys.com>, 
003                              Laurent Martelli <laurent@aopsys.com>
004    
005      This program is free software; you can redistribute it and/or modify
006      it under the terms of the GNU Lesser General Public License as
007      published by the Free Software Foundation; either version 2 of the
008      License, or (at your option) any later version.
009    
010      This program is distributed in the hope that it will be useful,
011      but WITHOUT ANY WARRANTY; without even the implied warranty of
012      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013      GNU Lesser General Public License for more details.
014    
015      You should have received a copy of the GNU Lesser General Public License
016      along with this program; if not, write to the Free Software
017      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
018    
019    package org.objectweb.jac.aspects.gui;
020    
021    import org.objectweb.jac.core.rtti.*;
022    
023    /**
024     * This configuration interface of the Gui aspect defines all the
025     * methods that handle the appearence of the fields in objects views.
026     *
027     * @see GuiAC
028     * @see View
029     *
030     * @author <a href="mailto:renaud@cnam.fr">Renaud Pawlak</a>
031     * @author <a href="mailto:laurent@aopsys.com">Laurent Martelli</a> */
032    
033    public interface FieldAppearenceGuiConf {
034    
035        /**
036         * Sets an item to be visible or not.
037         *
038         * <p>If a field of method item is not visible, it will not be
039         * displayed by the object views. If a class item is not visible,
040         * then it will not be possible to open a view on objects of this
041         * class.
042         *
043         * <p>By default, the RTTI does not define this property and every
044         * item is visble. Thus, the GUI aspect component programmer should
045         * overload the default contructor of this class to set some
046         * visible attributes to false.<p>
047         * 
048         * @param member the member item (may be a method or a field name);
049         * it can be null to set the whole class visible or not
050         * @param visible whether the member must be visible
051         *
052         * @see GuiAC#isVisible(MetaItem) 
053         */
054        void setVisible(MemberItem member, boolean visible);
055    
056        /**
057         * Tells the GUI to use embedded editors in the default view for
058         * all fields of a class, whenever possible.
059         * @param cl the class item
060         * @see FieldEditor 
061         */
062        void setEmbeddedEditors(ClassItem cl);
063    
064        /**
065         * Tells the GUI wether to use embedded editors in a view for all
066         * fields of a class.
067         * @param cl the class item
068         * @param viewName the view name
069         * @param embedded wether to use embedded editors by default
070         * @see FieldEditor 
071         */
072        void setEmbeddedEditors(ClassItem cl, String viewName, boolean embedded);
073    
074        /**
075         * Tells wether to use embedded editors for the cells of a table
076         * in a given view.
077         *
078         * @param collection the collection whose table view to configure
079         * @param viewName the view name for which to configure
080         * @param embedded wether to use embedded editors or not in the cells of the table
081         *
082         * @see #setEmbeddedEditorColumns(CollectionItem,String,MemberItem[]) */
083        void setEmbeddedEditors(
084            CollectionItem collection,
085            String viewName,
086            boolean embedded);
087    
088        /**
089         * Tells to use embedded editors for the cells of some columns in
090         * a given view
091         *
092         * @param collection the collection whose table view to configure
093         * @param viewName the view name for which to configure
094         * @param members wether to use embedded editors or not in the cells of the table
095         * 
096         * @see #setEmbeddedEditors(CollectionItem,String,boolean) 
097         */
098        void setEmbeddedEditorColumns(
099            CollectionItem collection,
100            String viewName,
101            MemberItem[] members);
102    
103        /**
104         * This configuration method allows the programmer to set a class
105         * member to be internally edited for the default view.
106         *
107         * @param member the member item to be embedded (may be a
108         * field or a method)
109         * @see FieldEditor 
110         * @see #setEmbeddedEditor(MemberItem,String,boolean)
111         */
112        void setEmbeddedEditor(MemberItem member);
113    
114        /**
115         * This configuration method allows the programmer to set a class
116         * member to be internally edited.
117         *
118         * <p>By default, each member of a class is editable with an "edit"
119         * button or link that opens a popup that allows the user to edit
120         * its value (see the <code>FieldEditor</code> interface). If this
121         * configuration method is called, then the editor will be embedded
122         * into the object's view the member belongs to.
123         *
124         * @param member the member item to be embedded (may be a
125         * field or a method)
126         * @param viewName the view for which to use an embedded
127         * editor. "default", "autocreate" or one of your own.
128         * @param embedded wether to use an editor or not
129         *
130         * @see FieldEditor 
131         * @see #setEmbeddedEditor(MemberItem,String,boolean) 
132         */
133        void setEmbeddedEditor(MemberItem member, String viewName, boolean embedded);
134    
135        /**
136         * Sets a border to the field in an object view.
137         *
138         * @param field the field
139         * @param alignment LEFT: title is on the left, RIGHT:
140         * title is on the right, CENTER: title is centered 
141         * @param style LINE: the border is a line, ETCHED: the border is a
142         * 3D line, LOWERED: the border is a 3D effect that makes the
143         * bordered element lowered, RAISED: the border is a 3D effect that
144         * makes the bordered element raised.  
145         * @see #setBorder(FieldItem)
146         */
147        void setBorder(FieldItem field, String alignment, String style);
148    
149        /**
150         * Sets a border to the field in an object view. Uses a default
151         * style (LINE) and alignement(LEFT)
152         *
153         * @param field the field
154         * @see #setBorder(FieldItem,String,String)
155         */
156        void setBorder(FieldItem field);
157    
158        /**
159         * Sets the width of the field's embedded editor when exist.
160         *
161         * @param field the field
162         * @param width the editor width in pixel (typically used by
163         * SWING)
164         * @param columns the editor width in character columns (typically
165         * used by the WEB)
166         * @see #setEmbeddedEditor(MemberItem) 
167         * @see #setEditorHeight(FieldItem,int,int)
168         * @see #setDefaultEditorWidth(ClassItem,int,int)
169         */
170        void setEditorWidth(FieldItem field, int width, int columns);
171    
172        /**
173         * Sets the default editor width for value of a given type.
174         *
175         * @param type the type 
176         * @param width the editor width in pixel (typically used by
177         * SWING)
178         * @param columns the editor width in character columns (typically
179         * used by the WEB)
180         *
181         * @see #setDefaultEditorWidth(ClassItem,int,int)
182         * @see #setDefaultEditorHeight(VirtualClassItem,int,int)
183         * @see #setEditorWidth(FieldItem,int,int)
184         */
185        void setDefaultEditorWidth(VirtualClassItem type, int width, int columns);
186    
187        /**
188         * Sets the default editor width for value of a given type.
189         *
190         * @param type the type 
191         * @param width the editor width in pixel (typically used by
192         * SWING)
193         * @param columns the editor width in character columns (typically
194         * used by the WEB)
195         *
196         * @see #setDefaultEditorWidth(VirtualClassItem,int,int)
197         * @see #setDefaultEditorHeight(VirtualClassItem,int,int)
198         * @see #setEditorWidth(FieldItem,int,int)
199         */
200        void setDefaultEditorWidth(ClassItem type, int width, int columns);
201    
202        /**
203         * Set a field to be editable.
204         *
205         * @param field the field
206         * @param editable the flag (true is default) */
207    
208        void setEditable(FieldItem field, boolean editable);
209    
210        /**
211         * Sets the height of a field's editor. It does not affect single
212         * line editors (used by primitive types)
213         *
214         * @param field the field 
215         * @param height the editor height in pixel
216         * @param rows the editor height in character rows
217         *
218         * @see #setEmbeddedEditor(MemberItem) 
219         * @see #setEditorWidth(FieldItem,int,int)
220         * @see #setDefaultEditorHeight(ClassItem,int,int) 
221         */
222        void setEditorHeight(FieldItem field, int height, int rows);
223    
224        /**
225         * Sets the default editor height for value of a given type.
226         *
227         * @param type the type 
228         * @param height the editor height in pixel
229         * @param rows the editor height in character rows
230         *
231         * @see #setDefaultEditorHeight(ClassItem,int,int)
232         * @see #setDefaultEditorWidth(VirtualClassItem,int,int)
233         * @see #setEditorHeight(FieldItem,int,int)
234         */
235        void setDefaultEditorHeight(VirtualClassItem type, int height, int rows);
236    
237        /**
238         * Sets the default editor height for value of a given type.
239         *
240         * @param type the type 
241         * @param height the editor height in pixel
242         * @param rows the editor height in character rows
243         *
244         * @see #setDefaultEditorHeight(VirtualClassItem,int,int)
245         * @see #setDefaultEditorWidth(VirtualClassItem,int,int)
246         * @see #setEditorHeight(FieldItem,int,int)
247         */
248        void setDefaultEditorHeight(ClassItem type, int height, int rows);
249    
250        /**
251         * Sets the category of an item of a class.
252         *
253         * <p>The category must correspond to one of these defined on the
254         * class with the <code>setCategories</code> configuration method.
255         * 
256         * @param member the member to categorize (a method or a field)
257         * @param category the existing category name
258         * @see #setCategories(MemberItem,String[]) 
259         * @see ClassAppearenceGuiConf#setCategories(ClassItem,String[]) 
260         */
261        void setCategory(MemberItem member, String category);
262    
263        /**
264         * Sets the categories of an item of a class.
265         *
266         * <p>The category must correspond to one of these defined on the
267         * class with the <code>setCategories</code> configuration method.
268         * 
269         * @param member the member to categorize (a method or a field)
270         * @param categories the existing category names
271         * @see #setCategory(MemberItem,String)
272         * @see ClassAppearenceGuiConf#setCategories(ClassItem,String[]) 
273         */
274        void setCategories(MemberItem member, String[] categories);
275    
276        /**
277         * Tells the GUI to insert a referenced object to be displayed as an
278         * embedded view in its container object view.
279         *
280         * @param member the member (reference field or method) that must
281         * be embedded 
282         *
283         * @see #setEmbeddedView(MemberItem,String,boolean)
284         */
285        void setEmbeddedView(MemberItem member);
286    
287        /**
288         * Tells the GUI to insert a referenced object to be displayed as an
289         * embedded view in its container object view.
290         *
291         * @param member the member (reference field or method) that must
292         * be embedded 
293         * @param viewName the view for which the member must be embedded
294         * @param embedded wether to embedded the member or not
295         *
296         * @see #setEmbeddedView(MemberItem)
297         */
298        void setEmbeddedView(MemberItem member,
299                             String viewName,
300                             boolean embedded);
301    
302        /**
303         * Tells the GUI wether to use an embedded view for the adder of a
304         * collection.  
305         * @param collection the collection
306         * @param embedded wether to use an embedded view for the adder
307         */
308        void setEmbeddedAdder(CollectionItem collection, boolean embedded);
309    
310        /**
311         * Sets the render of a given field (more precisely a collection)
312         * to be rendered by a table.
313         *
314         * <p>In a table view, each item of the displayed collection fills
315         * a table line. Each column represents one field of the objects
316         * whithin the collection (the item within the collection whould be
317         * of the same class --- or at least share a common superclass).
318         *
319         * @param field the field that contains the collection 
320         */
321        void setTableView(FieldItem field);
322    
323        /** 
324         * Sets the render of a collection to be rendered by a choice and an 
325         * embedded view on the selected object.
326         * 
327         * @param collection the collection 
328         * @param external tell if the object is embedded in the current view or if is is opened in an external panel (given by {@link GuiConf#addReferenceToPane(String,MemberItem,String)} 
329         */
330        void setChoiceView(CollectionItem collection, boolean external);
331    
332        /**
333         * Tells the GUI wether to show row numbers for tables and lists.
334         * @param collection the affected collection
335         * @param value wether to show row numbers
336         *
337         * @see #setDefaultShowRowNumbers(boolean)
338         */
339        void showRowNumbers(CollectionItem collection, boolean value);
340    
341        /**
342         * Tells the GUI wether to show row numbers for tables and lists by
343         * default.
344         *
345         * @param value wether to show row numbers
346         *
347         * @see #showRowNumbers(CollectionItem,boolean) 
348         */
349        void setDefaultShowRowNumbers(boolean value);
350    
351        /**
352         * Sets a default sorted column for a collection.
353         *
354         * <p>By default, collections are not sorted. You can precise a
355         * column to use to sort the collection by default. It will be used
356         * at the construction of the collection.</p>
357         *
358         * @param collection the collection
359         * @param column the column used to sort (it is a fieldItem, watch
360         * out for case). You may preprend a '-' to use the reverse order
361         * of that column.
362         */
363        void setDefaultSortedColumn(CollectionItem collection, String column);
364    
365        /**
366         * Sets the default order in which the attributes of the elements
367         * of a collection are to be rendered.
368         *
369         * @param collection the collection
370         * @param targetClass the class of attributes to render
371         * @param memberNames the name of the members in the
372         * rendering order
373         *
374         * @see #setMembersOrder(CollectionItem,String,ClassItem,String[])
375         * @see ClassAppearenceGuiConf#setTableMembersOrder(ClassItem,String[])
376         * @see ClassAppearenceGuiConf#setAttributesOrder(ClassItem,String[]) */
377        void setMembersOrder(
378            CollectionItem collection,
379            ClassItem targetClass,
380            String[] memberNames);
381    
382        /**
383         * Sets the order in which the attributes of the elements of a
384         * collection are to be rendered for a given view.
385         *
386         * @param collection the collection
387         * @param viewName the type for which to set the members order
388         * @param targetClass the class of attributes to render
389         * @param memberNames the name of the members in the
390         * rendering order
391         * 
392         * @see #setMembersOrder(CollectionItem,ClassItem,String[]) */
393        void setMembersOrder(
394            CollectionItem collection,
395            String viewName,
396            ClassItem targetClass,
397            String[] memberNames);
398    
399        /**
400         * This configuration method allows the programmer to make a set of
401         * object to be proposed to the final user when an edition of this
402         * field value is performed.
403         *
404         * <p>Most of the GUI will propose the choice within a ComboBox.
405         *
406         * <p>When the choices values can not be defined at programming
407         * time but must be dynamically created, then the programmer can
408         * use the <code>setDynamicFieldChoice</code> method.
409         *
410         * @param field the field
411         * @param choice the values the user will have to choose from when
412         * a edition of the field is performed
413         *
414         * @see #setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String) 
415         * @see #setFieldChoice(FieldItem,Boolean,String[])
416         * @see #setFieldEnum(FieldItem,String)
417         * @see GuiConf#defineEnum(String,String[],int,int)
418         */
419        void setFieldChoice(FieldItem field, Boolean editable, String[] choice);
420    
421        /**
422         * <p>Declare a field as an enumeration.</p>
423         *
424         * @param field the field
425         * @param enum the name of the enumeration
426         *
427         * @see GuiConf#defineEnum(String,String[],int,int)
428         * @see #setFieldChoice(FieldItem,Boolean,String[])
429         * @see #setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String) 
430         */
431        void setFieldEnum(FieldItem field, String enum);
432    
433        /**
434         * Same as <code>setFieldChoice</code> but with dynamically
435         * defined values.
436         *
437         * <p>The values are dynamically defined at runtime by the
438         * invocation of a target method. This target method must return a
439         * collection of objects or an array of objects that contains the
440         * possible new values for the fields.</p>
441         *
442         * <p>If the target method is static, it will be called with the
443         * object as the only parameter. If it's not static, it will called
444         * <em>on</em> the object with no parameters.</p>
445         *
446         * @param field the field
447         * @param targetClass the class that contains the target method
448         * @param targetMethod name of a static method within the target
449         * class that returns the values to choose from. It must take an
450         * Object as parameter which will be the instance to which the
451         * field belongs to.  
452         *
453         * @see #setDynamicFieldChoice(FieldItem,Boolean,MethodItem) 
454         * @see ClassAppearenceGuiConf#setDynamicClassChoice(String,MethodItem)
455         */
456        void setDynamicFieldChoice(
457            FieldItem field,
458            Boolean editable,
459            ClassItem targetClass,
460            String targetMethod);
461    
462        /**
463         * Same as <code>setFieldChoice</code> but with dynamically
464         * defined values.
465         *
466         * @param field the field
467         * @param targetMethod a static method that returns the values to
468         * choose from. It must take an Object as parameter which will be
469         * the instance to which the field belongs to.
470         *
471         * @see #setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String) 
472         * @see ClassAppearenceGuiConf#setDynamicClassChoice(String,MethodItem)
473         */
474        void setDynamicFieldChoice(
475            FieldItem field,
476            Boolean editable,
477            MethodItem targetMethod);
478    
479        /**
480         * Use objects from a collection as the available choices to edit
481         * a reference field.
482         *
483         * @param field the edited reference field
484         * @param targetCollection the collection. It belong to same class
485         * as the field.  
486         */
487        void setDynamicFieldChoice(
488            FieldItem field,
489            CollectionItem targetCollection);
490    
491        /**
492         * Set the type of the objects of a collection.
493         *
494         * <p>If this method is not used, the collection type can be
495         * dynamically found out by the GUI from the adder's argument
496         * types.
497         *
498         * @param collection the collection within this class 
499         * @param type the type of this collection (an exiting class name) 
500         */
501        void setCollectionType(CollectionItem collection, String type);
502    
503        /**
504         * Tells the preferred height a table or list view of a collection
505         * should take, if possible.
506         *
507         * @param collection the collection
508         * @param height the preferred height 
509         *
510         * @see #setPreferredWidth(CollectionItem,int)
511         */
512        void setPreferredHeight(CollectionItem collection, int height);
513    
514        /**
515         * Tells the preferred width a table or list view of a collection
516         * should take, if possible.
517         *
518         * @param collection the collection
519         * @param width the preferred width 
520         *
521         * @see #setPreferredHeight(CollectionItem,int)
522         */
523        void setPreferredWidth(CollectionItem collection, int width);
524    
525        /**
526         * Sets the number of rows to display simultaneously for a
527         * collection. 
528         *
529         * <p>This is only used by the web GUI so that generated
530         * web pages are not too big. If the number of elements in the
531         * collection is bigger than numRows, a "previous" and a "next"
532         * button are displayed so that the user can see the rest of the
533         * collection. The default is 10. Use 0 to display all rows.</p>
534         *
535         * @param collection the collection
536         * @param numRows the number of rows per page 
537         *
538         * @see #setAvailableNumRowsPerPage(CollectionItem,int[])
539         */
540        void setNumRowsPerPage(CollectionItem collection, int numRows);
541    
542        /**
543         * Causes the view of a collection to let the user selects the
544         * number of rows to display simultaneously at runtime.
545         *
546         * @param collection the collection
547         * @param numRows the numbers of rows per page the user can choose from.
548         *
549         * @see #setNumRowsPerPage(CollectionItem,int) 
550         */
551        void setAvailableNumRowsPerPage(CollectionItem collection, int[] numRows);
552    
553        /**
554         * Enables the user to filter a table by retaining only rows whose
555         * columns have a given value. This feature is only available on
556         * the web GUI for the moment.
557         * @param collection the collection to configure
558         * @param columnNames the field names (from the collection's
559         * component type) that can be filtered 
560         */
561        void showColumnFilters(CollectionItem collection,                                  
562                               String[] columnNames);
563        /**
564         * Sets the view of a given setter's calling box to be a file
565         * chooser.<p>
566         *
567         * As logically expected, the type of the set field must be a
568         * String or an URL.<p>
569         *
570         * @param method the method item. It can be of the form
571         * "methodName" or "methodName(<types>)". The first syntax will use
572         * the method with that name. The second syntax allow you to
573         * specify parameter types (separated by commas, with no spaces).
574         * @param fileExtensions allowed file extensions to choose from
575         * @param fileDescription
576         *
577         * @see java.net.URL
578         * @see GuiAC#isFileChooserView(MethodItem) 
579         */
580        void setFileChooserView(
581            MethodItem method,
582            String[] fileExtensions,
583            String fileDescription);
584    
585        /**
586         * Add some allowed file extensions for File field.
587         *
588         * @param field the field
589         * @param fileExtensions a list of allowed file extensions to
590         * choose from (for instance {"html","xhtml"})
591         * @param fileDescription a description for those file extensions
592         * (for instance "HTML documents")
593         */
594        /*
595        void addAllowedFileExtensions(
596            FieldItem field,
597            String[] fileExtensions,
598            String fileDescription);
599        */
600    
601        /**
602         * This configuration method attaches an icon to a given field so
603         * that the iconized instances of this field will be represented by
604         * this icon (for instance in a treeview).
605         *
606         * @param member the member (field or method)
607         * @param name the icon's resource name 
608         */
609        void setIcon(MemberItem member, String name);
610    
611        /**
612         * This configuration method allows not to use a node to represent
613         * a given relation (collection) in a treeview, even if the show
614         * relations mode is on .
615         *
616         * @param field the field 
617         */
618        void hideTreeRelation(FieldItem field);
619    
620        /**
621         * Set the default value for a choice.
622         *
623         * <p>The default value is dynamically calculated by the
624         * <code>method</code> parameter from the string value (result can
625         * be an object). A default implementation for method is provided
626         * by <code>GuiAC</code>.
627         *
628         * @param field the field
629         * @param method a static method that returns the default value
630         * (prototype: Object m(FieldItem,String))
631         * @param value the string representation of the default value
632         * @see GuiAC#getDefaultValue(FieldItem,String) */
633        void setDefaultValue(FieldItem field, MethodItem method, String value);
634    
635        /**
636         * Set the default value for a choice.
637         *
638         * <p>Same as setDefaultValue(ClassItem, String, MethodItem, String)
639         * using default MethodItem <code>GuiAC.getDefaultValue</code>.
640         *
641         * @param field the field
642         * @param value the string representation of the default value
643         * @see GuiAC#getDefaultValue(FieldItem,String)
644         * @see #setDefaultValue(FieldItem,MethodItem,String) 
645         */
646        void setDefaultValue(FieldItem field, String value);
647    
648        /**
649         * Sets the display format of a float or double field.
650         *
651         * @param field the field
652         * @param format the display format of the field
653         *
654         * @see java.text.DecimalFormat
655         */
656        void setFloatFormat(FieldItem field, String format);
657    
658        /**
659         * Sets the description of a class member (field of method).
660         *
661         * @param member the member
662         * @param description the description of the class member
663         */
664        void setDescription(MemberItem member, String description);
665    
666        /**
667         * Sets the label of a class member (field of method).
668         *
669         * @param member the member
670         * @param label the label of the class member
671         * @see #setLabel(MemberItem,MemberItem,String)
672         */
673        void setLabel(MemberItem member, String label);
674    
675        /**
676         * Sets the label of a class member (field of method) for a given
677         * context
678         *
679         * @param member the member
680         * @param selector use the label when inside the view of his member item
681         * @param label the label of the class member
682         * @see #setLabel(MemberItem,String) 
683         */
684        void setLabel(MemberItem member, MemberItem selector, String label);
685    
686        /**
687         * Wether to display a label containing the name of the field in views.
688         *
689         * @param member the member
690         * @param value boolean indicating wether to display the label
691         */
692        void setDisplayLabel(MemberItem member, boolean value);
693    
694        /**
695         * Set the style of a field
696         *
697         * @param field the field
698         * @param style the CSS style
699         *
700         * @see ClassAppearenceGuiConf#setStyle(ClassItem,String)
701         * @see GuiConf#addStyleSheetURL(String)
702         * @see GuiConf#addStyleSheetURL(String,String)
703         */
704        void setStyle(FieldItem field, String style);
705    
706        /**
707         * Tells wether to show an add button for a collection
708         *
709         * @param collection the collection to configure
710         * @param addable wether to show a button or not
711         *
712         * @see #setRemovable(CollectionItem,boolean)
713         */
714        void setAddable(CollectionItem collection, boolean addable);
715    
716        /**
717         * Tells wether to show remove buttons for items of a collection
718         *
719         * @param collection the collection to configure
720         * @param removable wether to show buttons or not
721         *
722         * @see #setAddable(CollectionItem,boolean)
723         */
724        void setRemovable(CollectionItem collection, boolean removable);
725    
726        /**
727         * Sets the view type of a field instead of using the default
728         * one ("List" or "Table"). It allows you to define a custom view
729         * constructor for that type in order to handle complex tables.
730         * The view constructor must take 3 arguments: a CollectionItem, an
731         * Object (the susbtance), and a CollectionItemView)
732         */
733        void setViewType(FieldItem field, String viewName, String viewType);
734    
735        /**
736         * Tells wether items in the default view of a collection have a
737         * "view" button to open a view of the item.
738         *
739         * @param collection the collection
740         * @param viewable wether items are viewable
741         * 
742         * @see #setViewableItems(CollectionItem,String,boolean) 
743         */
744        void setViewableItems(CollectionItem collection, boolean viewable);
745    
746        /**
747         * Tells wether items in a given default view of a collection have
748         * a "view" button to open a view of the item.
749         *
750         * @param collection the collection
751         * @param viewName the view to configure
752         * @param viewable wether items have a view button
753         *
754         * @see #setViewableItems(CollectionItem,boolean) 
755         */
756        void setViewableItems(CollectionItem collection, String viewName, boolean viewable);
757        
758        /**
759         * Enables or disables links for references in cells of a table
760         */
761        void setEnableLinks(CollectionItem collection, String viewName, boolean enable);
762    
763        /**
764         * Groups cells of table.
765         *
766         * @param collection the collection whose table cells to group
767         * @param viewName the view to configure
768         * @param groupBy group adjacent cells with same values of columns
769         * whose field start with this field
770         *
771         * @see #setMultiLineCollection(CollectionItem,String,CollectionItem)
772         */
773        void groupBy(CollectionItem collection,
774                     String viewName,
775                     FieldItem groupBy);
776    
777        /**
778         * Creates subrows in some cells of a table.
779         *
780         * @param collection the collection whose table cells to subdivide
781         * @param viewName the view to configure
782         * @param multiLine subdivide cells of columns whose field start
783         * with this field
784         *
785         * @see #groupBy(CollectionItem,String,FieldItem)
786         */
787        void setMultiLineCollection(CollectionItem collection,
788                                    String viewName,
789                                    CollectionItem multiLine);
790    
791        /**
792         * Use a field as a row to be added at the end of a table
793         */
794        void setAdditionalRow(CollectionItem collection,String viewName,
795                              String row);
796    
797        /**
798         * Sets the view type to use for cells of a column of table,
799         * instead of the default one.
800         * 
801         * @param collection the collection to configure
802         * @param viewName the view to configure
803         * @param column the column to configure
804         * @param viewType the view type to use for that column
805         *
806         * @see GuiConf#setViewConstructor(String,String,AbstractMethodItem)
807         */
808        void setCellViewType(CollectionItem collection, String viewName, 
809                             FieldItem column, String viewType);
810    
811        /**
812         * Defines preferred mnemonics for field of method.
813         * @param method 
814         * @param mnemonics the mnemonics
815         */
816        void setMnemonics(MemberItem method, String mnemonics);
817    }