JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.gui
Interface ClassAppearenceGuiConf

All Known Subinterfaces:
GuiConf
All Known Implementing Classes:
GuiAC

public interface ClassAppearenceGuiConf

This configuration interface of the Gui aspect defines all the methods that handle the appearence of the classes in the GUI.

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

Method Summary
 void selectWithIndexedField(ClassItem cl, CollectionItem collection, String repositoryName)
          Tells the gui to use a primary key field to select instances of a class, instead of a combobox.
 void setAttributesOrder(ClassItem cl, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered.
 void setCategories(ClassItem cl, String[] categories)
          This configuration method sets some categories for a class.
 void setCategoriesIcons(ClassItem cli, String[] icons)
          This configuration method sets categories icons for a class.
 void setCategoriesLabels(ClassItem cli, String[] labels)
          This configuration method sets categories labels for a class.
 void setCreationAttributesOrder(ClassItem cl, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered when an instance is created.
 void setDefaultsAttributesOrder(ClassItem cl, String[] attributeNames)
          Sets the attributes to be displayed for editable default values in tables
 void setDefaultSortedColumn(ClassItem cl, String column)
          Sets a default sorted column for a class.
 void setDescription(ClassItem cl, String description)
          Sets the description of a class.
 void setDesktopCustomizedView(ClassItem classItem, ClassItem type)
          This configuration method allows the programmer to tell that the given class should be viewed with a given customized view when it is opened in a desktop panel.
 void setDisplayLabel(String virtualClass, boolean value)
          Wether to display a label containing the name of the field in views.
 void setFormat(String className, String format)
          Sets the display format of a class.
 void setIcon(ClassItem classItem, String name)
          This configuration method attaches an icon to a given class so that the iconized instances of this class will be represented by this icon (for instance in a treeview).
 void setLabel(ClassItem cl, String label)
          Sets the label of a class.
 void setLineBreaks(ClassItem cli, String[] fields)
          Defines which fields should start on a new line.
 void setMenu(ClassItem classItem, String[] menu)
          This configuration method attaches a contextual menu to a given class so that the instances of this class will show the menu when the user performs a right click on it (by default the menu shows all the methods).
 void setMethodsOrder(ClassItem cl, String[] methodNames)
          Sets the order in which the methods of a class are to be rendered.
 void setNonViewableItems(CollectionItem collection)
          Set a collection's items to be not viewable (no 'view')
 void setStyle(ClassItem cli, String style)
          Set the style for a class
 void setTableMembersOrder(ClassItem cl, String[] memberNames)
          Sets the order in which the attributes of a class are to be rendered when their instance are placed within a table.
 void setToolTipText(ClassItem classItem, ClassItem selector, String formatExpression)
          Defines a contextual string tooltip for the instances of the class that will override the default one in some cases, depending on the selector parameter.
 void setToolTipText(ClassItem classItem, MemberItem selector, String formatExpression)
          Defines a contextual string tooltip for the instances of the class that will override the default one in some cases, depending on the selector parameter.
 void setToolTipText(ClassItem classItem, String formatExpression)
          Defines a contextual string tooltip for the instances of a class.
 void setToString(ClassItem classItem, ClassItem selector, String formatExpression)
          Defines a contextual string representation of the instances of the class that will override the default one in some cases, depending on the selector parameter.
 void setToString(ClassItem classItem, MemberItem selector, String formatExpression)
          Defines a contextual string representation of the instances of the class that will override the default one in some cases, depending on the selector parameter.
 void setToString(ClassItem classItem, String formatExpression)
          Defines the string representation of the instances of the class.
 void setTreeAttributesOrder(ClassItem cl, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered when their instance are placed within a tree.
 

Method Detail

setToString

public void setToString(ClassItem classItem,
                        String formatExpression)
Defines the string representation of the instances of the class.

Parameters:
classItem - the class
formatExpression - a string that contains field references of the form %field_name%. All the field references are replaced by their value when a string representation of the instance is needed. When you need to print out a %, then you must double it (%%).
See Also:
setToString(ClassItem,MemberItem,String), setToolTipText(ClassItem,MemberItem,String), setToolTipText(ClassItem,ClassItem,String)

setToString

public void setToString(ClassItem classItem,
                        MemberItem selector,
                        String formatExpression)
Defines a contextual string representation of the instances of the class that will override the default one in some cases, depending on the selector parameter.

Parameters:
classItem - the class
selector - tells when the formatExpression should be applied.
formatExpression - a string that contains field references of the form %field_name%. All the field references are replaced by their value when a string representation of the instance is needed. When you need to print out a %, then you must double it (%%).
See Also:
setToString(ClassItem,String), setToString(ClassItem,MemberItem,String), setToolTipText(ClassItem,MemberItem,String), setToolTipText(ClassItem,ClassItem,String)

setToString

public void setToString(ClassItem classItem,
                        ClassItem selector,
                        String formatExpression)
Defines a contextual string representation of the instances of the class that will override the default one in some cases, depending on the selector parameter.

Parameters:
classItem - the class
selector - tells when the formatExpression should be applied.
formatExpression - a string that contains field references of the form %field_name%. All the field references are replaced by their value when a string representation of the instance is needed. When you need to print out a %, then you must double it (%%).
See Also:
setToString(ClassItem,String), setToString(ClassItem,MemberItem,String), setToolTipText(ClassItem,MemberItem,String), setToolTipText(ClassItem,ClassItem,String)

setIcon

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

Parameters:
classItem - the class
name - the icon's resource name

setToolTipText

public void setToolTipText(ClassItem classItem,
                           String formatExpression)
Defines a contextual string tooltip for the instances of a class.

Parameters:
classItem - the class
formatExpression - a string that contains field references of the form %field_name%. All the field references are replaced by their value when a string representation of the instance is needed. When you need to print out a %, then you must double it (%%).
See Also:
setToolTipText(ClassItem,ClassItem,String), setToolTipText(ClassItem,MemberItem,String)

setToolTipText

public void setToolTipText(ClassItem classItem,
                           MemberItem selector,
                           String formatExpression)
Defines a contextual string tooltip for the instances of the class that will override the default one in some cases, depending on the selector parameter.

Parameters:
classItem - the class
selector - tells when the formatExpression should be applied.
formatExpression - a string that contains field references of the form %field_name%. All the field references are replaced by their value when a string representation of the instance is needed. When you need to print out a %, then you must double it (%%).
See Also:
setToolTipText(ClassItem,String), setToolTipText(ClassItem,ClassItem,String)

setToolTipText

public void setToolTipText(ClassItem classItem,
                           ClassItem selector,
                           String formatExpression)
Defines a contextual string tooltip for the instances of the class that will override the default one in some cases, depending on the selector parameter.

Parameters:
classItem - the class
selector - tells when the formatExpression should be applied.
formatExpression - a string that contains field references of the form %field_name%. All the field references are replaced by their value when a string representation of the instance is needed. When you need to print out a %, then you must double it (%%).
See Also:
setToolTipText(ClassItem,String), setToolTipText(ClassItem,MemberItem,String)

setMenu

public void setMenu(ClassItem classItem,
                    String[] menu)
This configuration method attaches a contextual menu to a given class so that the instances of this class will show the menu when the user performs a right click on it (by default the menu shows all the methods).

Parameters:
classItem - the class
menu - an array containing the names of the methods that form the menu (must be declared in the class item), if an element is an empty string, then a menu item separator is added

setCategories

public void setCategories(ClassItem cl,
                          String[] categories)
This configuration method sets some categories for a class.

The GUI will interpret this categories to split the views of this class instances to be separated into several subviews. For instance, the Swing GUI will show the object in several parts placed into several tabs.

When this method has been called, each meta-item of the class must be categorized with one of the categories by using the setCategory method.

Parameters:
cl - the class item
categories - the categories for this class
See Also:
FieldAppearenceGuiConf.setCategory(MemberItem,String)

setCategoriesIcons

public void setCategoriesIcons(ClassItem cli,
                               String[] icons)
This configuration method sets categories icons for a class. Each icon is associated with a category, so there must be the right number of icons (one by category)

Parameters:
icons - the icons for the categories
See Also:
setCategories(ClassItem,String[])

setCategoriesLabels

public void setCategoriesLabels(ClassItem cli,
                                String[] labels)
This configuration method sets categories labels for a class. Each label is associated with a category, so there must be the right number of labels (one by category)

See Also:
setCategories(ClassItem,String[])

setDesktopCustomizedView

public void setDesktopCustomizedView(ClassItem classItem,
                                     ClassItem type)
This configuration method allows the programmer to tell that the given class should be viewed with a given customized view when it is opened in a desktop panel.

Parameters:
classItem - the class of the viewed objects
type - the class of the view component

setAttributesOrder

public void setAttributesOrder(ClassItem cl,
                               String[] attributeNames)
Sets the order in which the attributes of a class are to be rendered.

Attributes not listed here will not be rendered. This order is also used for tableView rendered collections if the setTableMembersOrder method is not used.

Parameters:
cl - the class
attributeNames - the name of the attributes in the rendering order
See Also:
setTableMembersOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setDefaultsAttributesOrder

public void setDefaultsAttributesOrder(ClassItem cl,
                                       String[] attributeNames)
Sets the attributes to be displayed for editable default values in tables

Parameters:
cl - the class
attributeNames - the name of the attributes
See Also:
BehaviourGuiConf#setEditableDefaultValues(CollectionItem,boolean)

setLineBreaks

public void setLineBreaks(ClassItem cli,
                          String[] fields)
Defines which fields should start on a new line. By default, every fields start on a new line.

Parameters:
cli - the class
fields - the names fields which should start on a new line.

setMethodsOrder

public void setMethodsOrder(ClassItem cl,
                            String[] methodNames)
Sets the order in which the methods of a class are to be rendered.

Methods not listed here will not be rendered.

Parameters:
cl - the class name
methodNames - the name of the methods in the rendering order

setCreationAttributesOrder

public void setCreationAttributesOrder(ClassItem cl,
                                       String[] attributeNames)
Sets the order in which the attributes of a class are to be rendered when an instance is created.

Parameters:
cl - the class name
attributeNames - the name of the attributes in the rendering order
See Also:
setAttributesOrder(ClassItem,String[])

setTableMembersOrder

public void setTableMembersOrder(ClassItem cl,
                                 String[] memberNames)
Sets the order in which the attributes of a class are to be rendered when their instance are placed within a table.

Attributes not listed here will not be rendered.

Parameters:
cl - the class name
memberNames - the name of the member in the rendering order
See Also:
setAttributesOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setTreeAttributesOrder

public void setTreeAttributesOrder(ClassItem cl,
                                   String[] attributeNames)
Sets the order in which the attributes of a class are to be rendered when their instance are placed within a tree.

Attributes not listed here will not be rendered.

Parameters:
cl - the class name
attributeNames - the name of the attributes in the rendering order
See Also:
setAttributesOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setDefaultSortedColumn

public void setDefaultSortedColumn(ClassItem cl,
                                   String column)
Sets a default sorted column for a class.

Parameters:
cl - the class
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.

setDescription

public void setDescription(ClassItem cl,
                           String description)
Sets the description of a class.

Parameters:
description - the description of the class

setLabel

public void setLabel(ClassItem cl,
                     String label)
Sets the label of a class.


setDisplayLabel

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

Parameters:
value - boolean indicating wether to display the label

setNonViewableItems

public void setNonViewableItems(CollectionItem collection)
Set a collection's items to be not viewable (no 'view')

Parameters:
collection - the collection

setFormat

public void setFormat(String className,
                      String format)
Sets the display format of a class.


selectWithIndexedField

public void selectWithIndexedField(ClassItem cl,
                                   CollectionItem collection,
                                   String repositoryName)
Tells the gui to use a primary key field to select instances of a class, instead of a combobox. This is usefull when there are two many instances of the class.

Parameters:
cl - the class whose instance to select
collection - the collection whose indexed field to use
repositoryName - name of the object holding the collection
See Also:
RttiAC.setIndexedField(CollectionItem,FieldItem)

setStyle

public void setStyle(ClassItem cli,
                     String style)
Set the style for a class

Parameters:
cli - the class
style - the CSS style
See Also:
FieldAppearenceGuiConf.setStyle(FieldItem,String)

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli