org.objectweb.jac.aspects.gui
Class GuiAC

java.lang.Object
  |
  +--org.objectweb.jac.core.AspectComponent
        |
        +--org.objectweb.jac.aspects.gui.GuiAC
All Implemented Interfaces:
BaseProgramListener, BehaviorGuiConf, ClassAppearenceGuiConf, FieldAppearenceGuiConf, GuiConf, MethodAppearenceGuiConf, Serializable

public class GuiAC
extends AspectComponent
implements GuiConf

This aspect component implements a very simple GUI that allows the user to browse the named object of the system and call methods on them.

It implements a MVC design pattern where the controllers are implemented by ViewWrapper instances.

Author:
Renaud Pawlak, Laurent Martelli
See Also:
ViewControlWrapper, InputWrapper, View, Serialized Form

Field Summary
static String ADDABLE
           
static String ASK_FOR_PARAMETERS
          A "concrete" method we should ask parameters for
static String ASKING_SEQUENCE
           
static String AUTO_CREATE
           
static String AUTO_CREATE_INITIALIZER
           
static String AUTO_CREATED_STATE
           
static String AUTO_CREATION
           
static String AUTOCREATE_REASON
           
static String AUTOCREATE_VIEW
          Name of the autocreated object view
static String AVAILABLE_NUM_ROWS_PER_PAGE
           
static String BORDER
           
static String CATEGORIES
           
static String CATEGORIES_ICONS
           
static String CATEGORIES_LABELS
           
protected static Hashtable cguis
          Stores the cusomized GUI (class -> display).
static String CHOICE_VIEW
           
static String CLASS_CHOICES
           
static String COLLECTION_TYPE
           
static String CONDITION
           
static String CONTEXTUAL_LABEL
           
static String CONTEXTUAL_TO_STRING
           
static String CONTEXTUAL_TOOLTIP
           
static String CREATABLE
           
static String CREATION_ALLOWED_PARAMETERS
           
static String DATE_FORMAT
           
static String DATEHOUR_FORMAT
           
static String DEF_SORT
           
static String DEFAULT_VALUES
           
static String DEFAULT_VIEW
          Name of the default generic object view
static String DEFAULTS_ATTRIBUTES_ORDER
           
protected static boolean defaultShowRowNumbers
           
static String DESCRIPTION
           
static String DESKTOP_VIEW
           
static long dialogTimeout
           
static String DIRECT_COLLECTION_METHODS
           
static String DISPLAY_CONTEXT
           
static String DISPLAY_LABEL
           
protected static Hashtable displays
          Stores the displays of the GUI (displayID -> display).
static String DYN_DEFAULT_VALUE
           
static String DYNAMIC_ICON
           
static String EDITABLE
           
static String EDITABLE_CHOICE
           
static String EDITABLE_CHOICES
           
static String EDITABLE_DEFAULT_VALUES
           
static String EDITOR_HEIGHT
           
static String EDITOR_SMALL_HEIGHT
           
static String EDITOR_SMALL_WIDTH
           
static String EDITOR_WIDTH
           
static String EMBEDDED_EDITOR
           
static String FIELD_CHOICE
           
static String FIELD_DEPENDENCIES
           
static String FIELD_ENUM
           
static String FILE_CHOOSER_VIEW
           
static String FILE_EDITOR_CONFIG
           
static String FILE_EXTENSIONS
           
static String FILE_EXTENSIONS_DESCRIPTION
           
static String FILE_SELECTION_MODE
           
static String FILTERED_COLUMNS
           
static String FLOAT_FORMAT
           
static String FORMAT
           
static String GRAPHIC_CONTEXT
           
static String HIDDEN_TREE_RELATION
           
static String ICON
           
static String INDEX_NOT_FOUND_HANDLER
           
static String INDEXED_FIELD_SELECTOR
           
static String INT_FORMAT
           
static String INTERACTION_HANDLER
           
static String INVOKED_METHOD
          The "not concrete" method we should ask parameters for
static String LABEL
           
static String LINE_BREAKS
           
static String LINKED_PARAMETERS
           
static String MENU
           
static String METHODS_ORDER
           
static String MIME_TYPE
           
static String MNEMONICS
           
static String NAVBAR
           
static String NEW_WINDOW
           
static String NO_AUTO_CREATE
           
static String NUM_ROWS_PER_PAGE
           
static String OPEN_VIEW
           
static String OPPOSITE_ROLE
           
static String PARAMETER_CHOICES
           
static String PARAMETER_ENUMS
           
static String PARAMETER_FIELDS
           
static String PARAMETER_NAMES
           
static String PASSWORD_PARAMETERS
           
static String POST_INVOKE_HOOKS
           
static String REMOVABLE
           
static String REMOVED_NODE
          TreeNode being removed, to optimize Tree refresh
static String REPOSITORY_NAME
           
static String SELECTION_HANDLER
           
static String SELECTION_TARGET
           
static String SHOW_ROW_NUMBERS
           
static String SLOW_OPERATION
           
static String SMALL_TARGET_CONTAINER
           
static String SMALL_VIEW
          Boolean value to force the use of embedded editors.
static String SORT_COLUMN
           
static String SORT_CRITERIA
           
static String START_INDEXES
          Start index in a collection view Map (CollectionItem -> Integer)
static String STYLE
           
static String SUBSTANCE
          Substance on which the method is invoked.
static String TABLE_FILTER
           
static String TABLE_VIEW
           
static int THUMB_MAX_HEIGHT
           
static int THUMB_MAX_WIDTH
           
static int THUMB_QUALITY
           
static String TO_STRING
           
static String TOOLTIP
           
static String TREE_ATTRIBUTES_ORDER
           
static String VIEW
           
static String VIEW_HEIGHT
           
static String VIEW_ON_SELECTION
           
static String VIEW_WIDTH
           
static String VIEWS
           
static String VISIBLE
           
 
Fields inherited from class org.objectweb.jac.core.AspectComponent
application, blockKeywords, cr, currentConfigMethod, currentImports, firstCall, NOT_SHARED, SHARED, startWeavingCCount, startWeavingCount, startWeavingMethod, startWeavingType, systemListener, wrappers
 
Fields inherited from interface org.objectweb.jac.core.BaseProgramListener
FOUND_OBJECT
 
Constructor Summary
GuiAC()
          The default constructor for the GUI aspect component.
 
Method Summary
static void addDisplay(String displayID, Display newDisplay)
          Adds a new display for this GUI.
 void addMenuItem(String gui, String menu, String[] menuPath, AbstractMethodItem callback)
          Add a menu item to a menu bar.
 void addMenuItem(String gui, String menu, String[] menuPath, AbstractMethodItem callback, String[] parameters)
          Add a menu item to a menu bar.
 void addMenuItem(String gui, String menu, String[] menuPath, String objectName, AbstractMethodItem callback)
          Add a menu item to a menu bar.
 void addMenuItem(String gui, String menu, String[] menuPath, String objectName, AbstractMethodItem callback, String[] parameters)
          Add a menu item to a menu bar.
 void addMenuSeparator(String gui, String menu, String[] menuPath)
          Add a separator in a menu.
 void addPostInvoke(AbstractMethodItem method, AbstractMethodItem hook)
          Specifies a method to be invoked after a method is invoked from the GUI.
 void addReferenceToPane(String gui, MemberItem field, String panePath)
          Specify in which pane to open the view of a reference, collection, or a method's result.
 void addReferenceToPane(String gui, MemberItem member, String viewType, String[] viewParams, Boolean small, String paneId)
          This configuration method delegates to the corresponding customized GUI.
 void addStatusBar(String gui, MethodItem method, String position)
          This configuration method allows the programmer to actually show a status bar in a declared personal UI.
 void addStatusBar(String gui, String position)
          This configuration method allows the programmer to actually show an empty status bar in a declared personal UI.
 void addStyleSheetURL(String url)
          Adds a style-sheet URL for the generated html pages (for WEB GUIs).
 void addStyleSheetURL(String gui, String url)
          Adds a style-sheet URL for the generated html pages (for WEB GUIs).
 void addToolbarAction(String gui, AbstractMethodItem method)
          Add a button in the toolbar
 void addToolbarAction(String gui, AbstractMethodItem method, String[] params)
          Add a button in the toolbar
 void addToolbarAction(String gui, String objectName, AbstractMethodItem method)
          Add a button in the toolbar
 void addToolbarSeparator(String gui)
          Add a separator in the toolbar
 void addViewFieldDependency(ClassItem cl, String fieldName)
          Specify that the object views of instances of a class depend on the value of a field.
 void afterApplicationStarted()
          The default behavior of this BaseProgramListener method is to notify the display with the applicationStarted event.
 void askForParameters(String classExpr)
          Essential method for GUI, which weaves InputWrapper.askForParameters on all methods with parameters.
 void beforeReload()
           
 void captureSystemErr()
          Tells the swing administration gui to capture System.err so that it appears in a tab.
 void captureSystemOut()
          Tells the swing gui to capture System.out so that it appears a in tab.
 void checkCategories(ClassItem cli, int length)
           
static Display createDisplay(String displayID, Class displayType, ViewFactory factory)
          Creates a new display and registers it.
 void createSwingDisplays(String[] customizedIDs)
           
 void createWebDisplays(String[] customizedIDs)
           
 void declareCurrency(String currencyName, int precision, double rate)
          Declare a currency and it's change rate with the default currency
 void declareView(ClassItem cli, String viewName)
           
 void declareView(ClassItem cli, String viewName, String parentViewName)
           
 void defineEnum(String name, String[] values, int start, int step)
          Define an enumeration.
 void defineResource(String type, String name, String path)
          The wrapper that logs methods into a Swing console.
static int[] getAvailableNumRowsPerPage(CollectionItem collection)
           
static Border getBorder(FieldItem field)
           
static String[] getCategories(MemberItem member)
          Get the category of a member as configured with setCategory().
static String[] getCategoriesIcons(ClassItem cl)
          Get the categories icons (icons displayed in tabs).
static String[] getCategoriesLabels(ClassItem cl)
          Get the categories labels (text displayed in tabs).
static boolean getCommitOnFocusLost()
           
static MethodItem getCondition(AbstractMethodItem method)
          Gets the condition method associated with a method, or null if there's none.
static Object getContextAttribute(MetaItem item, String attribute, Stack context, Object defaultValue)
           
static FieldItem[] getCreationAttributesOrder(ClassItem cl)
          Gets the field items to display when creation a new instance a class
static Enumeration getCurrencies()
          Returns an enumeration of all declared currencies, including the default currency.
static Currency getCurrency(String currencyName)
          Returns the Currency object associated with a currency name.
static CustomizedGUI getCustomized(String customizedID)
          Gets a display from its ID.
static String getDateFormat()
          Returns the date format as set by setDateFormat.
static String getDateHourFormat()
          Returns the date format for DateHours as set by setDateHourFormat.
 String[] getDefaultConfigs()
          Returns defaults configuration files that must be loaded before the user's configuration
static String getDefaultCurrency()
          Returns the default currency
protected  String getDefaultProgramName()
          The programmer of a new GUI aspect must overload this method to return the right default program name.
static FieldItem[] getDefaultsAttributesOrder(ClassItem cl)
           
static String getDefaultSortedColumn(CollectionItem collection)
           
static Object getDefaultValue(FieldItem field, String value)
          Converts the a String into an object for the value of a field
static Collection getDependentFields(ClassItem cli)
          Returns the fields the views a class depend on.
static String getDescription(Object object)
          Returns the description of an object if it has been set.
static String getDescription(Object object, String beforeString, String afterString)
           
static Display getDisplay(String displayID)
          Gets a display from its ID.
static Length getEditorHeight(MetaItem type)
           
static Length getEditorWidth(FieldItem field)
          Returns the editor width of a field or 0 if none was set.
static Length getEditorWidth(MetaItem type)
           
static String getEncoding()
           
static Enum getEnum(FieldItem field)
           
 String getFileDescription(MethodItem setter)
          Gets the file description for a given field that is view as a file chooser (more precisely, the field that is set by the given setter).
 String[] getFileExtensions(MethodItem setter)
          Gets the file extensions for a given field that is view as a file chooser (more precisely, the field that is set by the given setter).
static String getFloatFormat()
          Returns the default display format of floats.
static String getFloatFormat(MetaItem item)
          Returns the display format of an item.
static Map getFontAttributes()
           
static String getFormat(MetaItem item)
          Returns the format of a ClassItem or VirtualClassItem.
static Stack getGraphicContext()
           
static String getIcon(Callback callback)
           
static String getIcon(ClassItem cli, Object object)
          Gets an icon for an object
static String getIcon(MetaItem item)
          Returns the icon associated with this item.
static MethodItem getInitiliazer(FieldItem field)
          Returns the initializer method of a field, if any, or null.
static MethodItem getInteractionHandler(AbstractMethodItem method)
           
static String getIntFormat()
          Returns the default display format of integers.
static String getIntFormat(MetaItem item)
          Returns the display format of an item.
static String getLabel(MetaItem item)
           
static String getLabel(MetaItem item, Stack context)
          Returns the label of an item, or an automatically computed string if none was set.
static String getLabelAdd()
           
static String getLabelAll()
           
static String getLabelCancel()
           
static String getLabelClose()
           
static String getLabelNew()
           
static String getLabelNone()
           
static String getLabelOK()
           
static String getLocalSessionID()
          Return a session id for the local display
static MemberItem[] getMembersOrder(CollectionItem collection, String viewName)
           
static MethodItem[] getMenu(ClassItem classItem)
           
static Length[] getMethodParametersHeight(AbstractMethodItem method)
          Returns the parameters heights of a method or null if none was set.
static Length[] getMethodParametersWidth(AbstractMethodItem method)
          Returns the parameters widths of a method or null if none was set.
static String getMnemonics(MetaItem item)
           
static String getMnemonics(MethodItem method)
           
 String[] getModifyingBoxes(AbstractMethodItem method)
          Get the modifying boxes for the given abstract method item (a method or a constructor).
static int getNumRowsPerPage(CollectionItem collection)
           
static String[] getParameterNames(AbstractMethodItem method)
          Returns the parameter names of a method.
static Object getRepository(ClassItem cl)
          Gets the repository object of a class
static MethodItem getSelectionHandler(MemberItem member)
           
static int getStartIndex(CollectionItem collection)
          Gets start index for collection view from the context
static Vector getStyleSheetURLs()
           
static String getToolTip(Object o, Stack context)
          Gets the tooltip text of an object.
static ObjectView getView(ClassItem cli, String viewName)
          Gets an object view by name.
static CollectionItemView getView(CollectionItem collection, String viewName)
          Gets an object view by name.
static MemberItemView getView(MemberItem member, String viewName)
          Gets an object view by name.
static ViewFactory getViewFactory(String guiType)
          Returns a ViewFactory for a given guiType
static boolean getViewOnSelection(FieldItem field)
          Tells wether VIEW_ON_SELECTION is set for a given field.
 void groupBy(CollectionItem collection, String viewName, FieldItem groupBy)
          Groups cells of table.
static boolean hasDefaultValue(FieldItem field)
           
static boolean hasEditableDefaultValues(MetaItem metaItem)
           
static boolean hasEmbeddedEditors(ClassItem cli)
           
static boolean hasSetNavBar(CustomizedGUI gui, CollectionItem coll)
           
 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 .
static boolean isAddable(CollectionItem collection)
          Tells wether to show an add button for a collection
static boolean isAddable(Object substance, CollectionItem collection)
          Tells wether to show an add button for a collection
static boolean isAutoCreate(FieldItem field)
           
static boolean isAutoCreateParameters(AbstractMethodItem method)
           
static boolean isChoiceView(CollectionItem collection)
           
static boolean isCreatable(ClassItem cli)
          Wether to show "new" buttons for a class (defaults to true)
static boolean isCreationAllowedParameter(AbstractMethodItem method, int i)
          Tells wether to display a "new" button for a parameter of a method
static boolean isCreationAttribute(FieldItem field)
           
static boolean isEditable(FieldItem field)
          Tells if a field is editable from the GUI.
static boolean isEditable(Object substance, FieldItem field)
          Tells if a field is editable from the GUI.
static boolean isEditableChoice(FieldItem field)
           
static boolean isEmbeddedEditor(MetaItem item)
           
static boolean isEnabled(AbstractMethodItem method, Object substance)
          Tells wether a method should be enabled
static boolean isExternalChoiceView(CollectionItem collection)
           
 boolean isFileChooserView(MethodItem setter)
          Tells if the given method call by the GUI opens a file chooser dialog.
static boolean isMemberInCategory(MemberItem member, String category)
          Tells wether a member item belong to category
static boolean isRemovable(CollectionItem collection)
          Tells wether to show a remove button for a collection
static boolean isRemovable(Object substance, CollectionItem collection)
          Tells wether to show a remove button for a collection
static boolean isShowRowNumbers(CollectionItem collection)
           
static boolean isSlowOperation(AbstractMethodItem method)
          Tells wethers a method is slow
static boolean isTableView(CollectionItem collection)
          Returns true if the given item must be displayed by the GUI as a table.
static boolean isVisible(MetaItem metaItem)
          Tells if an item is visible (displayed by the GUI).
static boolean isVisible(Object substance, MetaItem metaItem)
          Tells if an item is visible (displayed by the GUI).
 void newWindow(String gui, String className, String fieldName)
           
static MetaItem popGraphicContext()
           
static void pushGraphicContext(MetaItem value)
           
 void registerCustomized(String name)
          This configuration method allows the user to create and register a new customized GUI.
static void registerDisplay(String name, String displayType, String guiType)
          This configuration method allows the user to register a new display.
static void removeDisplay(Display display)
          Removes a display for this GUI.
static void removeStartIndex(CollectionItem collection)
           
 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 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 setAttributesOrder(ClassItem cli, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered.
 void setAttributesOrder(ClassItem cli, String viewName, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered for a given view.
 void setAutoCreate(FieldItem field)
          This configuration method tells the GUI to automatically create a new instance of the field type when a setter or an adder is invoke on the object that owns this field.
 void setAutoCreateAll(ClassItem cl)
          This configuration method tells that all the class methods must be in auto-creation mode.
 void setAutoCreateInitializer(FieldItem field, MethodItem initializer)
          Defines a method to initialize new objects created by the auto-create behaviour.
 void setAutoCreateParameters(AbstractMethodItem method)
          This configuration method tells which parameters of the given method should be autocreated.
 void setAutoCreateParametersEx(ClassItem cli, String[] excludedMethods)
          This configuration method tells that all the class methods must be in auto-creation mode except the excluded ones.
 void setAutoCreateState(ClassItem cli, String[] fields)
          This configuration method tells which fields of the given class should be auto-created.
 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(ClassItem cli, String[] categories)
          This configuration method sets some categories for a class.
 void setCategories(MemberItem member, String[] categories)
          Sets the categories of an item of 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 setCategory(MemberItem member, String category)
          Sets the category of an item of a class.
 void setCellViewType(CollectionItem collection, String viewName, FieldItem field, String viewType)
          Sets the view type to use for cells of a column of table, instead of the default one.
 void setChoiceView(CollectionItem field, boolean external)
          Sets the render of a collection to be rendered by a choice and an embedded view on the selected object.
 void setClosingMethod(ClassItem classItem, String methodName)
          Sets the given method to be closing (ie, when the user press the corresponding button, it performs the call and closes the current object view).
 void setCollectionType(CollectionItem collection, String type)
          Set the type of the objects of a collection.
 void setCommitOnFocusLost(boolean value)
          Set the commit method to use when attibutes are edited.
 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 setCreationAttributesOrder(ClassItem cli, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered when an instance is created.
 void setCustomizedIcon(String gui, String icon)
          Sets the icon of the window
 void setDateFormat(String dateFormat)
          Set the default date format used by date components.
 void setDateHourFormat(String dateFormat)
           
 void setDefaultCurrency(String currencyName, int precision)
          Set the default currency
 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 setDefaults()
          Defines the visible property to false for some JAC system items.
 void setDefaultsAttributesOrder(ClassItem cl, String[] attributeNames)
          Sets the attributes to be displayed for editable default values in tables
 void setDefaultShowRowNumbers(boolean value)
          Tells the GUI wether to show row numbers for tables and lists by default.
 void setDefaultSortedColumn(ClassItem cl, String column)
          Sets a default sorted column for a class.
 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 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 setDescription(ClassItem classItem, String description)
          Sets the description of a class.
 void setDescription(MemberItem member, String description)
          Sets the description of a class member (field of method).
 void setDesktopCustomizedView(ClassItem classItem, ClassItem type)
          Tells if a field item's value must be displayed embbeded.
 void setDialogTimeout(long timeout)
          Sets the delay before a dialog times out.
 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 setDisplayLabel(MemberItem member, boolean displayLabel)
          Wether to display a label containing the name of the field in views.
 void setDisplayLabel(String itemName, boolean displayLabel)
          Wether to display a label containing the name of the field in views.
 void setDynamicClassChoice(String className, MethodItem targetMethod)
          Defines a method that returns instances of a class that should be displayed in comboboxes.
 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 targetField)
          Use objects from a collection as the available choices to edit a reference field.
 void setDynamicIcon(ClassItem cli, MethodItem iconMethod)
          Defines a method to dynamically compute the icon for a class.
 void setDynamicIcon(MethodItem method, MethodItem iconMethod)
          Defines a method to dynamically compute the icon for a menu's method.
 void setEditable(FieldItem field, boolean editable)
          Set a field to be editable.
 void setEditableDefaultValues(CollectionItem collection, boolean editable)
          Tells if the default values of an item can be editable from the GUI.
 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 cli)
          Tells the GUI to use embedded editors in the default view for all fields of a class, whenever possible.
 void setEmbeddedEditors(ClassItem cli, 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, boolean embedded)
           
 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(ClassItem cli, String viewName, boolean enable)
           
 void setEnableLinks(CollectionItem collection, String viewName, boolean enable)
          Enables or disables links for references in cells of a table
 void setEncoding(String encoding)
          Sets the default charset encoding to use when interaction with the user's terminal.
 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 enumName)
          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 setFontAttribute(String attribute, String value)
          This configuration method allows the programmer to define attributes for the default font.
 void setFormat(String className, String format)
          Sets the display format of a class.
 void setIcon(ClassItem cli, 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 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 setIndexNotFoundHandler(ClassItem cl, MethodItem handler)
          Defines a method to be called when an object referred to by it's indexed field is not found.
 void setInteractionHandler(MethodItem method, MethodItem handler)
          Sets a method to be used to handler user interaction when a method is called, instead of the standard "ask for parameters stuffs".
 void setIntFormat(FieldItem field, String format)
           
 void setInvalidPane(String gui, String changedPane, String invalidPane)
          Set a pane to be invalidated (reload) when a given pane content changes.
 void setLabel(ClassItem classItem, String label)
          Sets the label of a class.
 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 setLabelAdd(String label)
           
 void setLabelAll(String label)
           
 void setLabelCancel(String label)
           
 void setLabelClose(String label)
           
 void setLabelNew(String label)
           
 void setLabelNone(String label)
           
 void setLabelOK(String label)
           
 void setLineBreaks(ClassItem cli, String[] fields)
          Defines which fields should start on a new line.
 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 setLoggingMethod(String gui, String objects, String classes, String methods, int paneID)
          Sets the given methods to be logging.
 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 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 setMenuIcon(String gui, String menu, String[] menuPath, String icon)
          Set the icon for a menu.
 void setMenuPosition(String gui, String menu, String position)
          Sets the position of a menu
 void setMethodDynamicParameterChoice(MethodItem method, ClassItem[] targetClasses, String[] targetMethods, boolean[] editable)
          Same as setDynamicFieldChoice but for method parameters The values are dynamically defined at runtime by the invocation of a static target method.
 void setMethodDynamicParameterChoice(MethodItem method, MethodItem[] targetMethods, boolean[] editable)
          Same as setDynamicFieldChoice but for method parameters The values are dynamically defined at runtime by the invocation of a static target method.
 void setMethodParametersHeight(AbstractMethodItem method, Length[] height)
          Sets the height for all parameters of one method.
 void setMethodParametersWidth(AbstractMethodItem method, Length[] width)
          Sets the width for all parameters of one method.
 void setMethodsOrder(ClassItem cli, String[] methodNames)
          Sets the order in which the methods of a class are to be rendered for the default view.
 void setMethodsOrder(ClassItem cli, String viewName, String[] methodNames)
          Sets the order in which the methods of a class are to be rendered for a view.
 void setMimeType(AbstractMethodItem method, String type)
          Sets the mime-type of the file written to an OutputStream or Writer.
 void setMnemonics(ClassItem cli, String mnemonics)
          Defines preferred mnemonics for class.
 void setMnemonics(MemberItem method, String mnemonics)
          Defines preferred mnemonics for field of method.
 void setModifyingBoxes(ClassItem classItem, String methodName, String[] modifyingBoxes)
           
 void setMultiLineCollection(CollectionItem collection, String viewName, CollectionItem multiLine)
          Creates subrows in some cells of a table.
 void setNavBar(String gui, CollectionItem collection)
          Enables navigation bar for a collection.
 void setNumRowsPerPage(CollectionItem collection, int numRows)
          Sets the number of rows to display simultaneously for a collection.
 void setOnCloseHandler(String gui, AbstractMethodItem eventHandler)
          Set an event handler which is called when the window is closed.
 void setOnSelection(CollectionItem collection, MethodItem eventHandler)
          Sets the event handler to be called when an item of the collection is selected.
 void setOpenViewMethod(ClassItem cli, String methodName)
          This configuration method allows the programmer to specify that the result of a given method (should be a wrappe) opens a new view on this result instead of treating it as a simple result.
 void setPaneContainer(String gui, String paneId, String type)
          Set the container type to use for a pane.
 void setPaneContent(String gui, String paneId, String type, String[] args)
          Defines the initial content of a pane.
 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.
 void setPosition(String gui, int left, int up, int width, int height)
          This configuration method delegates to the corresponding customized GUI.
 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 setReadOnly(ClassItem cli, String viewName, boolean readOnly)
           
 void setRemovable(CollectionItem collection, boolean removable)
          Tells wether to show remove buttons for items of a collection
 void setSelectionTarget(CollectionItem collection, ClassItem targetClass, String targetField)
          Sets the field to be displayed when an item of the collection is selected, instead of the item itself.
 void setSlowOperation(AbstractMethodItem method, boolean isSlow)
          If an operation is expected to take a long time to complete, use this method to tell the GUI that it should display a message asking the user to wait for a while.
 void setSmallEditorHeight(FieldItem field, Length height)
           
 void setSmallEditorWidth(FieldItem field, Length width)
           
 void setSplitterLocation(String gui, int splitterId, float location)
          This configuration method delegates to the corresponding customized GUI.
static void setStartIndex(CollectionItem collection, int index)
          Sets the start index for a collection view in the context
 void setStyle(ClassItem cli, String style)
          Set the style for a class
 void setStyle(FieldItem field, String style)
          Set the style of a field
 void setSubPanesGeometry(String gui, int subPanesCount, String geometry)
          This configuration method delegates to setSubPanesGeometry(int,int,String[]) with all the panes scrollable.
 void setSubPanesGeometry(String gui, int subPanesCount, String geometry, boolean[] scrollings)
          This configuration method delegates to the corresponding customized GUI.
 void setTableMembersOrder(ClassItem cli, String[] memberNames)
          Sets the order in which the attributes of a class are to be rendered when their instance are placed within a table of the a default view.
 void setTableMembersOrder(ClassItem cli, String viewName, String[] memberNames)
          Sets the order in which the attributes of a class are to be rendered when their instance are placed within a table of a given view.
 void setTableView(FieldItem field)
          Sets the render of a given field (more precisely a collection) to be rendered by a table.
 void setTitle(String gui, String title)
          This configuration method sets the title of the GUI main window.
 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 cli, String[] attributeNames)
          Sets the order in which the attributes of a class are to be rendered when their instance are placed within a tree.
 void setURLSelectionMode(FieldItem field, String mode, String[] extensions, String extensionsDescription)
          Sets the selection mode for an URL.
 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 setViewConstructor(String guiType, String viewType, AbstractMethodItem constructor)
          Set the view constructor for a given gui type.
 void setViewOnSelection(CollectionItem collection)
          This configuration method allows the programmer to specify that the view on an object contained in a collection will be automatically opened by the GUI when the user selects it.
 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(ClassItem cl, String[] itemNames, boolean visible)
           
 void setVisible(MemberItem member, boolean visible)
          Sets an item to be visible or not.
 void setWelcomeMessage(String gui, String title, String message, String icon)
          Sets a welcome message (in a popup) when a customized GUI is started.
 void showColumnFilters(CollectionItem collection, String[] columnNames)
          Enables the user to filter a table by retaining only rows whose columns have a given value.
 void showCustomizedSwing(String displayName, String gui)
           
 void showCustomizedSwing(String displayName, String gui, String host)
           
 void showRowNumbers(CollectionItem collection, boolean value)
          Tells the GUI wether to show row numbers for tables and lists.
static String toString(double value)
           
static String toString(FieldItem field, int value)
          Gets the string representation of the field of an object.
static String toString(FieldItem field, Object value)
          Gets the string representation of the field of an object.
static String toString(float value)
           
static String toString(Object o)
           
static String toString(Object o, Stack context)
          Gets the string representation of an object.
 void whenCloseDisplay(Display display)
          Catch this event and remove the display from the handled list if exists.
 void whenReload()
          Called when the aspect's configuration is reloaded
 
Methods inherited from class org.objectweb.jac.core.AspectComponent
addWrapper, afterRunningWrapper, afterWrap, afterWrappeeInit, attr, attrdef, beforeConfiguration, beforeRunningWrapper, beforeWrappeeInit, configure, defines, defineTimer, doRegister, doUnregister, error, getAC, getApplication, getBlockKeywords, getConfigurationMethods, getConfigurationMethodsName, getConfigurationMethodsName, getName, getNameCounters, getWrappers, init, isConfigurationMethod, isSystemListener, onExit, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, pointcut, setApplication, setAttribute, setAttribute, setAttribute, setSystemListener, simulateUsingNewInstance, unweave, unwrapAll, updateNameCounters, warning, weave, whenClone, whenConfigured, whenDeleted, whenDeserialized, whenFree, whenGetObjects, whenNameObject, whenObjectMiss, whenRemoteInstantiation, whenSerialized, whenTopologyChanged, whenUsingNewClass, whenUsingNewInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_VIEW

public static final String DEFAULT_VIEW
Name of the default generic object view

See Also:
Constant Field Values

AUTOCREATE_VIEW

public static final String AUTOCREATE_VIEW
Name of the autocreated object view

See Also:
Constant Field Values

displays

protected static Hashtable displays
Stores the displays of the GUI (displayID -> display).


cguis

protected static Hashtable cguis
Stores the cusomized GUI (class -> display).


VIEWS

public static final String VIEWS
See Also:
Constant Field Values

DEFAULTS_ATTRIBUTES_ORDER

public static final String DEFAULTS_ATTRIBUTES_ORDER
See Also:
Constant Field Values

TREE_ATTRIBUTES_ORDER

public static final String TREE_ATTRIBUTES_ORDER
See Also:
Constant Field Values

METHODS_ORDER

public static final String METHODS_ORDER
See Also:
Constant Field Values

INTERACTION_HANDLER

public static final String INTERACTION_HANDLER
See Also:
Constant Field Values

MIME_TYPE

public static final String MIME_TYPE
See Also:
Constant Field Values

AUTO_CREATE

public static final String AUTO_CREATE
See Also:
Constant Field Values

AUTO_CREATE_INITIALIZER

public static final String AUTO_CREATE_INITIALIZER
See Also:
Constant Field Values

NO_AUTO_CREATE

public static final String NO_AUTO_CREATE
See Also:
Constant Field Values

SORT_CRITERIA

public static final String SORT_CRITERIA
See Also:
Constant Field Values

TABLE_VIEW

public static final String TABLE_VIEW
See Also:
Constant Field Values

CHOICE_VIEW

public static final String CHOICE_VIEW
See Also:
Constant Field Values

SHOW_ROW_NUMBERS

public static final String SHOW_ROW_NUMBERS
See Also:
Constant Field Values

EDITABLE_DEFAULT_VALUES

public static final String EDITABLE_DEFAULT_VALUES
See Also:
Constant Field Values

FILTERED_COLUMNS

public static final String FILTERED_COLUMNS
See Also:
Constant Field Values

TO_STRING

public static final String TO_STRING
See Also:
Constant Field Values

CONTEXTUAL_TO_STRING

public static final String CONTEXTUAL_TO_STRING
See Also:
Constant Field Values

TOOLTIP

public static final String TOOLTIP
See Also:
Constant Field Values

CONTEXTUAL_TOOLTIP

public static final String CONTEXTUAL_TOOLTIP
See Also:
Constant Field Values

EMBEDDED_EDITOR

public static final String EMBEDDED_EDITOR
See Also:
Constant Field Values

VISIBLE

public static final String VISIBLE
See Also:
Constant Field Values

EDITABLE

public static final String EDITABLE
See Also:
Constant Field Values

ADDABLE

public static final String ADDABLE
See Also:
Constant Field Values

REMOVABLE

public static final String REMOVABLE
See Also:
Constant Field Values

CREATABLE

public static final String CREATABLE
See Also:
Constant Field Values

CATEGORIES

public static final String CATEGORIES
See Also:
Constant Field Values

CATEGORIES_ICONS

public static final String CATEGORIES_ICONS
See Also:
Constant Field Values

CATEGORIES_LABELS

public static final String CATEGORIES_LABELS
See Also:
Constant Field Values

FIELD_CHOICE

public static final String FIELD_CHOICE
See Also:
Constant Field Values

FIELD_ENUM

public static final String FIELD_ENUM
See Also:
Constant Field Values

PARAMETER_ENUMS

public static final String PARAMETER_ENUMS
See Also:
Constant Field Values

EDITABLE_CHOICE

public static final String EDITABLE_CHOICE
See Also:
Constant Field Values

EDITABLE_CHOICES

public static final String EDITABLE_CHOICES
See Also:
Constant Field Values

PARAMETER_CHOICES

public static final String PARAMETER_CHOICES
See Also:
Constant Field Values

CLASS_CHOICES

public static final String CLASS_CHOICES
See Also:
Constant Field Values

COLLECTION_TYPE

public static final String COLLECTION_TYPE
See Also:
Constant Field Values

VIEW_ON_SELECTION

public static final String VIEW_ON_SELECTION
See Also:
Constant Field Values

SELECTION_HANDLER

public static final String SELECTION_HANDLER
See Also:
Constant Field Values

SELECTION_TARGET

public static final String SELECTION_TARGET
See Also:
Constant Field Values

PARAMETER_NAMES

public static final String PARAMETER_NAMES
See Also:
Constant Field Values

LINKED_PARAMETERS

public static final String LINKED_PARAMETERS
See Also:
Constant Field Values

PASSWORD_PARAMETERS

public static final String PASSWORD_PARAMETERS
See Also:
Constant Field Values

CREATION_ALLOWED_PARAMETERS

public static final String CREATION_ALLOWED_PARAMETERS
See Also:
Constant Field Values

DEFAULT_VALUES

public static final String DEFAULT_VALUES
See Also:
Constant Field Values

DYN_DEFAULT_VALUE

public static final String DYN_DEFAULT_VALUE
See Also:
Constant Field Values

PARAMETER_FIELDS

public static final String PARAMETER_FIELDS
See Also:
Constant Field Values

CONDITION

public static final String CONDITION
See Also:
Constant Field Values

SLOW_OPERATION

public static final String SLOW_OPERATION
See Also:
Constant Field Values

POST_INVOKE_HOOKS

public static final String POST_INVOKE_HOOKS
See Also:
Constant Field Values

VIEW_HEIGHT

public static final String VIEW_HEIGHT
See Also:
Constant Field Values

VIEW_WIDTH

public static final String VIEW_WIDTH
See Also:
Constant Field Values

EDITOR_HEIGHT

public static final String EDITOR_HEIGHT
See Also:
Constant Field Values

EDITOR_WIDTH

public static final String EDITOR_WIDTH
See Also:
Constant Field Values

EDITOR_SMALL_WIDTH

public static final String EDITOR_SMALL_WIDTH
See Also:
Constant Field Values

EDITOR_SMALL_HEIGHT

public static final String EDITOR_SMALL_HEIGHT
See Also:
Constant Field Values

HIDDEN_TREE_RELATION

public static final String HIDDEN_TREE_RELATION
See Also:
Constant Field Values

BORDER

public static final String BORDER
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

ICON

public static final String ICON
See Also:
Constant Field Values

DYNAMIC_ICON

public static final String DYNAMIC_ICON
See Also:
Constant Field Values

MENU

public static final String MENU
See Also:
Constant Field Values

DISPLAY_LABEL

public static final String DISPLAY_LABEL
See Also:
Constant Field Values

LABEL

public static final String LABEL
See Also:
Constant Field Values

MNEMONICS

public static final String MNEMONICS
See Also:
Constant Field Values

CONTEXTUAL_LABEL

public static final String CONTEXTUAL_LABEL
See Also:
Constant Field Values

STYLE

public static final String STYLE
See Also:
Constant Field Values

NEW_WINDOW

public static final String NEW_WINDOW
See Also:
Constant Field Values

NUM_ROWS_PER_PAGE

public static final String NUM_ROWS_PER_PAGE
See Also:
Constant Field Values

AVAILABLE_NUM_ROWS_PER_PAGE

public static final String AVAILABLE_NUM_ROWS_PER_PAGE
See Also:
Constant Field Values

AUTO_CREATED_STATE

public static final String AUTO_CREATED_STATE
See Also:
Constant Field Values

SMALL_TARGET_CONTAINER

public static final String SMALL_TARGET_CONTAINER
See Also:
Constant Field Values

NAVBAR

public static final String NAVBAR
See Also:
Constant Field Values

FIELD_DEPENDENCIES

public static final String FIELD_DEPENDENCIES
See Also:
Constant Field Values

LINE_BREAKS

public static final String LINE_BREAKS
See Also:
Constant Field Values

DIRECT_COLLECTION_METHODS

public static final String DIRECT_COLLECTION_METHODS
See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
See Also:
Constant Field Values

DATEHOUR_FORMAT

public static final String DATEHOUR_FORMAT
See Also:
Constant Field Values

FLOAT_FORMAT

public static final String FLOAT_FORMAT
See Also:
Constant Field Values

INT_FORMAT

public static final String INT_FORMAT
See Also:
Constant Field Values

FORMAT

public static final String FORMAT
See Also:
Constant Field Values

ASKING_SEQUENCE

public static final String ASKING_SEQUENCE
See Also:
Constant Field Values

DESKTOP_VIEW

public static final String DESKTOP_VIEW
See Also:
Constant Field Values

FILE_SELECTION_MODE

public static final String FILE_SELECTION_MODE
See Also:
Constant Field Values

FILE_EXTENSIONS

public static final String FILE_EXTENSIONS
See Also:
Constant Field Values

FILE_EXTENSIONS_DESCRIPTION

public static final String FILE_EXTENSIONS_DESCRIPTION
See Also:
Constant Field Values

FILE_CHOOSER_VIEW

public static final String FILE_CHOOSER_VIEW
See Also:
Constant Field Values

FILE_EDITOR_CONFIG

public static final String FILE_EDITOR_CONFIG
See Also:
Constant Field Values

INDEXED_FIELD_SELECTOR

public static final String INDEXED_FIELD_SELECTOR
See Also:
Constant Field Values

INDEX_NOT_FOUND_HANDLER

public static final String INDEX_NOT_FOUND_HANDLER
See Also:
Constant Field Values

REPOSITORY_NAME

public static final String REPOSITORY_NAME
See Also:
Constant Field Values

DISPLAY_CONTEXT

public static final String DISPLAY_CONTEXT
See Also:
Constant Field Values

ASK_FOR_PARAMETERS

public static final String ASK_FOR_PARAMETERS
A "concrete" method we should ask parameters for

See Also:
Constant Field Values

INVOKED_METHOD

public static final String INVOKED_METHOD
The "not concrete" method we should ask parameters for

See Also:
Constant Field Values

AUTO_CREATION

public static final String AUTO_CREATION
See Also:
Constant Field Values

AUTOCREATE_REASON

public static final String AUTOCREATE_REASON
See Also:
Constant Field Values

SMALL_VIEW

public static final String SMALL_VIEW
Boolean value to force the use of embedded editors. Defaults to false.

See Also:
Constant Field Values

OPPOSITE_ROLE

public static final String OPPOSITE_ROLE
See Also:
Constant Field Values

VIEW

public static final String VIEW
See Also:
Constant Field Values

OPEN_VIEW

public static final String OPEN_VIEW
See Also:
Constant Field Values

GRAPHIC_CONTEXT

public static final String GRAPHIC_CONTEXT
See Also:
Constant Field Values

START_INDEXES

public static final String START_INDEXES
Start index in a collection view Map (CollectionItem -> Integer)

See Also:
Constant Field Values

THUMB_MAX_WIDTH

public static final int THUMB_MAX_WIDTH
See Also:
Constant Field Values

THUMB_MAX_HEIGHT

public static final int THUMB_MAX_HEIGHT
See Also:
Constant Field Values

THUMB_QUALITY

public static final int THUMB_QUALITY
See Also:
Constant Field Values

SORT_COLUMN

public static final String SORT_COLUMN
See Also:
Constant Field Values

DEF_SORT

public static final String DEF_SORT
See Also:
Constant Field Values

TABLE_FILTER

public static final String TABLE_FILTER
See Also:
Constant Field Values

SUBSTANCE

public static final String SUBSTANCE
Substance on which the method is invoked. Set when auto creating parameters

See Also:
Constant Field Values

REMOVED_NODE

public static final String REMOVED_NODE
TreeNode being removed, to optimize Tree refresh

See Also:
Constant Field Values

defaultShowRowNumbers

protected static boolean defaultShowRowNumbers

dialogTimeout

public static long dialogTimeout
Constructor Detail

GuiAC

public GuiAC()
The default constructor for the GUI aspect component.

By default it defines the visible property to false for some JAC system items.

Method Detail

toString

public static String toString(Object o)

toString

public static String toString(float value)

toString

public static String toString(double value)

toString

public static String toString(Object o,
                              Stack context)
Gets the string representation of an object.

Parameters:
o - the object
Returns:
a string representing the object o
See Also:
setToString(ClassItem,String)

getToolTip

public static String getToolTip(Object o,
                                Stack context)
Gets the tooltip text of an object.

Parameters:
context - a stack of meta items representing the context
o - the object
Returns:
the tooltip of the object in the given context
See Also:
setToolTipText(ClassItem,String)

getContextAttribute

public static Object getContextAttribute(MetaItem item,
                                         String attribute,
                                         Stack context,
                                         Object defaultValue)
Parameters:
item - item holding the rules
attribute - name of attribute holding the rules
defaultValue - this value is returned if there is not matching context

pushGraphicContext

public static void pushGraphicContext(MetaItem value)

popGraphicContext

public static MetaItem popGraphicContext()

getGraphicContext

public static Stack getGraphicContext()

toString

public static String toString(FieldItem field,
                              Object value)
Gets the string representation of the field of an object.

Parameters:
field - the field
value - the value of the field
Returns:
a string representing the value of the field

toString

public static String toString(FieldItem field,
                              int value)
Gets the string representation of the field of an object.

Parameters:
field - the field
value - the value of the field
Returns:
a string representing the value of the field

getDisplay

public static final Display getDisplay(String displayID)
Gets a display from its ID.

Parameters:
displayID - the id of the display
See Also:
Display

getCustomized

public static final CustomizedGUI getCustomized(String customizedID)
Gets a display from its ID.

Parameters:
customizedID - the id of the customized gui
See Also:
Display

createDisplay

public static Display createDisplay(String displayID,
                                    Class displayType,
                                    ViewFactory factory)
                             throws Exception
Creates a new display and registers it.

Parameters:
displayID - the display name
displayType - the display class to instantiate. It must have a constructor taking a ViewFactory parameter
factory - the view factory for the display
Exception

createSwingDisplays

public void createSwingDisplays(String[] customizedIDs)

createWebDisplays

public void createWebDisplays(String[] customizedIDs)

addDisplay

public static void addDisplay(String displayID,
                              Display newDisplay)
Adds a new display for this GUI.

Parameters:
newDisplay - the display to add
See Also:
Display

removeDisplay

public static void removeDisplay(Display display)
Removes a display for this GUI.

Parameters:
display - the display to remove
See Also:
Display

registerDisplay

public static void registerDisplay(String name,
                                   String displayType,
                                   String guiType)
                            throws Exception
This configuration method allows the user to register a new display.

It instantiates a new display from its class name and registers its.

Parameters:
name - the display name
displayType - the display type
guiType - the type of the gui (
Exception

registerCustomized

public void registerCustomized(String name)
Description copied from interface: GuiConf
This configuration method allows the user to create and register a new customized GUI.

A configuration file should first use this method, then configure the customized GUI, and then call the showCustomized method when the GUI configuration is finished.

Specified by:
registerCustomized in interface GuiConf
Parameters:
name - the new customized GUI name

showCustomizedSwing

public void showCustomizedSwing(String displayName,
                                String gui,
                                String host)
                         throws Exception
Exception

showCustomizedSwing

public void showCustomizedSwing(String displayName,
                                String gui)
                         throws Exception
Exception

setWelcomeMessage

public void setWelcomeMessage(String gui,
                              String title,
                              String message,
                              String icon)
Description copied from interface: GuiConf
Sets a welcome message (in a popup) when a customized GUI is started.

Specified by:
setWelcomeMessage in interface GuiConf
Parameters:
gui - the gui ID
title - the popup's title
message - the welcome message
icon - an icon (defined as a resource) placed before the message (can be null)

setStyle

public void setStyle(FieldItem field,
                     String style)
Description copied from interface: FieldAppearenceGuiConf
Set the style of a field

Specified by:
setStyle in interface FieldAppearenceGuiConf
Parameters:
field - the field
style - the CSS style
See Also:
ClassAppearenceGuiConf.setStyle(ClassItem,String), GuiConf.addStyleSheetURL(String), GuiConf.addStyleSheetURL(String,String)

setStyle

public void setStyle(ClassItem cli,
                     String style)
Description copied from interface: ClassAppearenceGuiConf
Set the style for a class

Specified by:
setStyle in interface ClassAppearenceGuiConf
Parameters:
cli - the class
style - the CSS style
See Also:
FieldAppearenceGuiConf.setStyle(FieldItem,String), GuiConf.addStyleSheetURL(String), GuiConf.addStyleSheetURL(String,String)

setOnCloseHandler

public void setOnCloseHandler(String gui,
                              AbstractMethodItem eventHandler)
Description copied from interface: GuiConf
Set an event handler which is called when the window is closed.

Specified by:
setOnCloseHandler in interface GuiConf
Parameters:
gui - the customized gui ID
eventHandler - the event handler

addStatusBar

public void addStatusBar(String gui,
                         MethodItem method,
                         String position)
Description copied from interface: GuiConf
This configuration method allows the programmer to actually show a status bar in a declared personal UI.

Specified by:
addStatusBar in interface GuiConf
Parameters:
gui - the name of the customized GUI
method - the method that returns the text
position - UP||BOTTOM

addStatusBar

public void addStatusBar(String gui,
                         String position)
Description copied from interface: GuiConf
This configuration method allows the programmer to actually show an empty status bar in a declared personal UI. The text should be set with the showStatus method.

Specified by:
addStatusBar in interface GuiConf
Parameters:
gui - the name of the customized GUI
position - UP||BOTTOM
See Also:
GuiConf.addStatusBar(String,MethodItem,String)

setSubPanesGeometry

public void setSubPanesGeometry(String gui,
                                int subPanesCount,
                                String geometry)
Description copied from interface: GuiConf
This configuration method delegates to setSubPanesGeometry(int,int,String[]) with all the panes scrollable.

The GUI must have been declared.

Specified by:
setSubPanesGeometry in interface GuiConf
Parameters:
gui - the GUI name
subPanesCount - the number of subpanes in the window
geometry - the geometry = VERTICAL || HORIZONTAL || VERTICAL_LEFT || VERTICAL_RIGHT || HORIZONTAL_UP || HORIZONTAL_DOWN || NONE
See Also:
GuiConf.registerCustomized(String), GuiConf.setSubPanesGeometry(String,int,String,boolean[]), GuiConf.setPaneContent(String,String,String,String[])

setSubPanesGeometry

public void setSubPanesGeometry(String gui,
                                int subPanesCount,
                                String geometry,
                                boolean[] scrollings)
Description copied from interface: GuiConf
This configuration method delegates to the corresponding customized GUI.

The GUI must have been declared.

Specified by:
setSubPanesGeometry in interface GuiConf
Parameters:
gui - the GUI name
subPanesCount - the number of subpanes in the window
geometry - the geometry = VERTICAL || HORIZONTAL || VERTICAL_LEFT || VERTICAL_RIGHT || HORIZONTAL_UP || HORIZONTAL_DOWN
scrollings - a set of string that tells if the sub-panes must be srollable or not (use setSubPanesGeometry(String,int,String) to make all the sub-panes scrollable
See Also:
GuiConf.registerCustomized(String), GuiConf.setSubPanesGeometry(String,int,String), GuiConf.setPaneContent(String,String,String,String[])

setPaneContent

public void setPaneContent(String gui,
                           String paneId,
                           String type,
                           String[] args)
Description copied from interface: GuiConf
Defines the initial content of a pane.

The GUI must have been declared.

Specified by:
setPaneContent in interface GuiConf
Parameters:
gui - the GUI name
paneId - the panel id (see the geometry to know its placement)
type - the type of the view
args - arguments to pass to the constructor of the view
See Also:
GuiConf.registerCustomized(String), GuiConf.setViewConstructor(String,String,AbstractMethodItem), GuiConf.setSubPanesGeometry(String,int,String), GuiConf.setSubPanesGeometry(String,int,String,boolean[])

setPaneContainer

public void setPaneContainer(String gui,
                             String paneId,
                             String type)
Description copied from interface: GuiConf
Set the container type to use for a pane. The default is "SingleSlotContainer".

Specified by:
setPaneContainer in interface GuiConf
Parameters:
gui - the GUI name
paneId - the panel id (see the geometry to know its placement)
type - the type of the container
See Also:
GuiConf.registerCustomized(String), GuiConf.setViewConstructor(String,String,AbstractMethodItem)

setInvalidPane

public void setInvalidPane(String gui,
                           String changedPane,
                           String invalidPane)
Description copied from interface: GuiConf
Set a pane to be invalidated (reload) when a given pane content changes.

Specified by:
setInvalidPane in interface GuiConf
Parameters:
gui - the GUI name
changedPane - the pane to watch
invalidPane - the pane to invalidate when the watched pane's content changes

addReferenceToPane

public void addReferenceToPane(String gui,
                               MemberItem field,
                               String panePath)
Description copied from interface: GuiConf
Specify in which pane to open the view of a reference, collection, or a method's result. The default view for an object will be used.

Note that, for a method member, a displayabe object should be returned by the method. Otherwise, a runtime error will happen.

Specified by:
addReferenceToPane in interface GuiConf
Parameters:
gui - the GUI name
field - the member (reference, collection, or method)
panePath - the ID of the pane where the view must be opened
See Also:
GuiConf.registerCustomized(String), GuiConf.addReferenceToPane(String,MemberItem,,String,String[],Boolean,String)

addReferenceToPane

public void addReferenceToPane(String gui,
                               MemberItem member,
                               String viewType,
                               String[] viewParams,
                               Boolean small,
                               String paneId)
Description copied from interface: GuiConf
This configuration method delegates to the corresponding customized GUI.

The GUI must have been declared.

Specified by:
addReferenceToPane in interface GuiConf
Parameters:
gui - the GUI name
member - the field (reference of collection)
viewType - the type of the view to open
small - tell if the viewed object in this pane should be small
paneId - the path of the panel where the view must be opened (/)
See Also:
GuiConf.registerCustomized(String), GuiConf.addReferenceToPane(String,MemberItem,String), CustomizedGUI.addReferenceToPane(MemberItem,String,String[],String)

newWindow

public void newWindow(String gui,
                      String className,
                      String fieldName)

setCustomizedIcon

public void setCustomizedIcon(String gui,
                              String icon)
Description copied from interface: GuiConf
Sets the icon of the window

Specified by:
setCustomizedIcon in interface GuiConf
Parameters:
gui - the gui ID
icon - the name of the icon

setPosition

public void setPosition(String gui,
                        int left,
                        int up,
                        int width,
                        int height)
Description copied from interface: GuiConf
This configuration method delegates to the corresponding customized GUI.

The GUI must have been declared.

Specified by:
setPosition in interface GuiConf
Parameters:
gui - the GUI name
left - left-border pixel
up - upper-border pixel
width - in percentage regarding the screen
height - in percentage regarding the screen
See Also:
GuiConf.registerCustomized(String), CustomizedGUI.setPosition(int,int,int,int)

addMenuItem

public void addMenuItem(String gui,
                        String menu,
                        String[] menuPath,
                        AbstractMethodItem callback)
Description copied from interface: GuiConf
Add a menu item to a menu bar.

Specified by:
addMenuItem in interface GuiConf
Parameters:
gui - the GUI name
menu - the menu name
menuPath - the path of the menu item.
callback - the callback method for that menu item. It must be a static method with no arguments.
See Also:
GuiConf.registerCustomized(String), GuiConf.addMenuItem(String,String,String[],String,AbstractMethodItem), GuiConf.addMenuItem(String,String,String[],String,AbstractMethodItem,String[])

addMenuItem

public void addMenuItem(String gui,
                        String menu,
                        String[] menuPath,
                        String objectName,
                        AbstractMethodItem callback)
Description copied from interface: GuiConf
Add a menu item to a menu bar.

Specified by:
addMenuItem in interface GuiConf
Parameters:
gui - the GUI name
menu - the menu name
menuPath - the path of the menu item.
objectName - the name of the object on which to invoke the method
callback - the callback method for that menu item. It must be an instance method with no arguments.
See Also:
GuiConf.registerCustomized(String), GuiConf.addMenuItem(String,String,String[],AbstractMethodItem), GuiConf.addMenuItem(String,String,String[],AbstractMethodItem,String[])

addMenuItem

public void addMenuItem(String gui,
                        String menu,
                        String[] menuPath,
                        AbstractMethodItem callback,
                        String[] parameters)
Description copied from interface: GuiConf
Add a menu item to a menu bar.

Specified by:
addMenuItem in interface GuiConf
Parameters:
gui - the GUI name
menu - the menu name
menuPath - the path of the menu item.
callback - the callback method for that menu item. It must be a static method.
parameters - the arguments to pass to the callback method when it is called
See Also:
GuiConf.registerCustomized(String), GuiConf.addMenuItem(String,String,String[],AbstractMethodItem), GuiConf.addMenuItem(String,String,String[],String,AbstractMethodItem), GuiConf.addMenuItem(String,String,String[],String,AbstractMethodItem,String[])

addMenuItem

public void addMenuItem(String gui,
                        String menu,
                        String[] menuPath,
                        String objectName,
                        AbstractMethodItem callback,
                        String[] parameters)
Description copied from interface: GuiConf
Add a menu item to a menu bar.

Specified by:
addMenuItem in interface GuiConf
Parameters:
gui - the GUI name
menu - the menu name
menuPath - the path of the menu item.
objectName - the name of the object on which to invoke the method
callback - the callback method for that menu item. It must be an instance method.
parameters - the arguments to pass to the callback method when it is called
See Also:
GuiConf.registerCustomized(String), GuiConf.addMenuItem(String,String,String[],AbstractMethodItem), GuiConf.addMenuItem(String,String,String[],AbstractMethodItem,String[]), GuiConf.addMenuItem(String,String,String[],String,AbstractMethodItem)

addMenuSeparator

public void addMenuSeparator(String gui,
                             String menu,
                             String[] menuPath)
Description copied from interface: GuiConf
Add a separator in a menu.

Specified by:
addMenuSeparator in interface GuiConf
Parameters:
gui - the GUI name
menuPath - the path of the menu item separator.
See Also:
GuiConf.registerCustomized(String)

setMenuPosition

public void setMenuPosition(String gui,
                            String menu,
                            String position)
Description copied from interface: GuiConf
Sets the position of a menu

Specified by:
setMenuPosition in interface GuiConf
Parameters:
gui - the customized GUI
menu - the menu name
position - the position of the menu (TOP, BOTTOM, LEFT or RIGHT)

setMenuIcon

public void setMenuIcon(String gui,
                        String menu,
                        String[] menuPath,
                        String icon)
Description copied from interface: GuiConf
Set the icon for a menu.

Specified by:
setMenuIcon in interface GuiConf
Parameters:
gui - the GUI name
menuPath - the path of the menu
icon - the name of the icon
See Also:
GuiConf.registerCustomized(String)

addToolbarAction

public void addToolbarAction(String gui,
                             AbstractMethodItem method)
Description copied from interface: GuiConf
Add a button in the toolbar

Specified by:
addToolbarAction in interface GuiConf
Parameters:
gui - the GUI name
method - the callback method for that button. It must be a static method with no arguments.
See Also:
GuiConf.addToolbarAction(String,String,AbstractMethodItem), GuiConf.addToolbarAction(String,AbstractMethodItem,String[]), GuiConf.registerCustomized(String)

addToolbarAction

public void addToolbarAction(String gui,
                             String objectName,
                             AbstractMethodItem method)
Description copied from interface: GuiConf
Add a button in the toolbar

Specified by:
addToolbarAction in interface GuiConf
Parameters:
gui - the GUI name
objectName - name of the object on which to invoke the method
method - the callback method for that button. It must be a static method with no arguments.
See Also:
GuiConf.addToolbarAction(String,AbstractMethodItem), GuiConf.addToolbarAction(String,AbstractMethodItem,String[]), GuiConf.registerCustomized(String)

addToolbarAction

public void addToolbarAction(String gui,
                             AbstractMethodItem method,
                             String[] params)
Description copied from interface: GuiConf
Add a button in the toolbar

Specified by:
addToolbarAction in interface GuiConf
Parameters:
gui - the GUI name
method - a static method to invoke when the button is clicked
params - some parameters to pass the method
See Also:
GuiConf.addToolbarAction(String,String,AbstractMethodItem), GuiConf.addToolbarAction(String,AbstractMethodItem), GuiConf.registerCustomized(String)

addToolbarSeparator

public void addToolbarSeparator(String gui)
Description copied from interface: GuiConf
Add a separator in the toolbar

Specified by:
addToolbarSeparator in interface GuiConf
Parameters:
gui - the GUI name
See Also:
GuiConf.registerCustomized(String)

setSplitterLocation

public void setSplitterLocation(String gui,
                                int splitterId,
                                float location)
Description copied from interface: GuiConf
This configuration method delegates to the corresponding customized GUI.

The GUI must have been declared.

Specified by:
setSplitterLocation in interface GuiConf
Parameters:
gui - the GUI name
splitterId - the splitter's index
location - the position as a percentage between 0 and 1, regarding to the top/left component, a negative value means that the splitter should be set at the preferred sized of the inner components
See Also:
GuiConf.registerCustomized(String), CustomizedGUI.setSplitterLocation(int,float)

setTitle

public void setTitle(String gui,
                     String title)
Description copied from interface: GuiConf
This configuration method sets the title of the GUI main window.

The GUI must have been declared.

Specified by:
setTitle in interface GuiConf
Parameters:
gui - the GUI name
title - the window title
See Also:
GuiConf.registerCustomized(String)

addStyleSheetURL

public void addStyleSheetURL(String gui,
                             String url)
Description copied from interface: GuiConf
Adds a style-sheet URL for the generated html pages (for WEB GUIs).

By default, the style-sheets are the one defined in the org/objectweb/jac/aspects/gui/web directory but the user can override some of their characteristics by adding customized ones (last added overrides)

Specified by:
addStyleSheetURL in interface GuiConf
Parameters:
gui - the customized GUI the style sheets applies to
url - the URL string
See Also:
GuiConf.addStyleSheetURL(String)

addStyleSheetURL

public void addStyleSheetURL(String url)
Description copied from interface: GuiConf
Adds a style-sheet URL for the generated html pages (for WEB GUIs).

Specified by:
addStyleSheetURL in interface GuiConf
Parameters:
url - the URL string
See Also:
GuiConf.addStyleSheetURL(String,String)

getStyleSheetURLs

public static Vector getStyleSheetURLs()

setLoggingMethod

public void setLoggingMethod(String gui,
                             String objects,
                             String classes,
                             String methods,
                             int paneID)
Description copied from interface: GuiConf
Sets the given methods to be logging.

When it is called, the argument --- that must be a string --- is written into a text area added at the end of a subpanel defined by a customized GUI.

Specified by:
setLoggingMethod in interface GuiConf
Parameters:
gui - the customized gui (must be registered and configured with at least setSubPanesGeometry)
objects - the objects that contain the method (pointcut expression)
classes - the class the contains the method (pointcut expression)
methods - the method item names (pointcut expression)
paneID - the subpanel id
See Also:
GuiConf.registerCustomized(String), GuiConf.setSubPanesGeometry(String,int,String)

defineResource

public void defineResource(String type,
                           String name,
                           String path)
The wrapper that logs methods into a Swing console.

Specified by:
defineResource in interface GuiConf
Parameters:
type - the resource type (ICON) -- other types should be supported soon
name - the identifier of the resource (should be unique)
path - the path where the resource is located (can be classpath relative)
See Also:
ClassAppearenceGuiConf.setIcon(ClassItem,String)

setIcon

public void setIcon(ClassItem cli,
                    String name)
Description copied from interface: ClassAppearenceGuiConf
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).

Specified by:
setIcon in interface ClassAppearenceGuiConf
Parameters:
cli - the class
name - the icon's resource name
See Also:
ClassAppearenceGuiConf.setDynamicIcon(ClassItem,MethodItem)

setIcon

public void setIcon(MemberItem member,
                    String name)
Description copied from interface: FieldAppearenceGuiConf
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).

Specified by:
setIcon in interface FieldAppearenceGuiConf
Parameters:
member - the member (field or method)
name - the icon's resource name

setDynamicIcon

public void setDynamicIcon(MethodItem method,
                           MethodItem iconMethod)
Description copied from interface: MethodAppearenceGuiConf
Defines a method to dynamically compute the icon for a menu's method.

Specified by:
setDynamicIcon in interface MethodAppearenceGuiConf
Parameters:
method - method
iconMethod - a static method which must take 3 parameters (a MethodItem, an Object and an array of objects) and return a String or null. It will be invoked with the parameters array given to addMenuItem
See Also:
GuiConf.addMenuItem(String,String,String[],String,AbstractMethodItem,String[]), FieldAppearenceGuiConf.setIcon(MemberItem,String)

setDynamicIcon

public void setDynamicIcon(ClassItem cli,
                           MethodItem iconMethod)
Description copied from interface: ClassAppearenceGuiConf
Defines a method to dynamically compute the icon for a class.

Specified by:
setDynamicIcon in interface ClassAppearenceGuiConf
Parameters:
cli - a class
iconMethod - a static method which must take an object as parameter and return a String or null. It will be invoked with the object for which an icon must be determined.
See Also:
ClassAppearenceGuiConf.setIcon(ClassItem,String)

getIcon

public static String getIcon(MetaItem item)
Returns the icon associated with this item. If no icon was set with one the of setIcon() configuration methods, we try to return a reasonable default.

See Also:
setIcon(ClassItem,String), setIcon(MemberItem,String)

getIcon

public static String getIcon(ClassItem cli,
                             Object object)
Gets an icon for an object

Parameters:
cli - the class of the object
object - the object
Returns:
an icon's resource name

getIcon

public static String getIcon(Callback callback)

hideTreeRelation

public void hideTreeRelation(FieldItem field)
Description copied from interface: FieldAppearenceGuiConf
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 .

Specified by:
hideTreeRelation in interface FieldAppearenceGuiConf
Parameters:
field - the field

setMenu

public void setMenu(ClassItem classItem,
                    String[] menu)
Description copied from interface: ClassAppearenceGuiConf
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).

Specified by:
setMenu in interface ClassAppearenceGuiConf
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

getMenu

public static MethodItem[] getMenu(ClassItem classItem)

whenCloseDisplay

public void whenCloseDisplay(Display display)
Catch this event and remove the display from the handled list if exists.

Specified by:
whenCloseDisplay in interface BaseProgramListener
Overrides:
whenCloseDisplay in class AspectComponent
Parameters:
display - the closing display

whenReload

public void whenReload()
Description copied from class: AspectComponent
Called when the aspect's configuration is reloaded

Overrides:
whenReload in class AspectComponent

beforeReload

public void beforeReload()
Overrides:
beforeReload in class AspectComponent

setDefaults

public void setDefaults()
Defines the visible property to false for some JAC system items.


askForParameters

public void askForParameters(String classExpr)
Description copied from interface: GuiConf
Essential method for GUI, which weaves InputWrapper.askForParameters on all methods with parameters.

It permits to dynamically call methods, and so display something when user clicks on buttons.

Specified by:
askForParameters in interface GuiConf
Parameters:
classExpr - the classes

afterApplicationStarted

public void afterApplicationStarted()
The default behavior of this BaseProgramListener method is to notify the display with the applicationStarted event.

Specified by:
afterApplicationStarted in interface BaseProgramListener
Overrides:
afterApplicationStarted in class AspectComponent
See Also:
Display.applicationStarted()

getLocalSessionID

public static String getLocalSessionID()
Return a session id for the local display


getDefaultProgramName

protected String getDefaultProgramName()
The programmer of a new GUI aspect must overload this method to return the right default program name.

By default, it returns the package path name of the current GUI aspect (must be right most of the time).

Returns:
the default program name

setVisible

public void setVisible(MemberItem member,
                       boolean visible)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setVisible in interface FieldAppearenceGuiConf
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:
isVisible(MetaItem)

setEditable

public void setEditable(FieldItem field,
                        boolean editable)
Description copied from interface: FieldAppearenceGuiConf
Set a field to be editable.

Specified by:
setEditable in interface FieldAppearenceGuiConf
Parameters:
field - the field
editable - the flag (true is default)

setAddable

public void setAddable(CollectionItem collection,
                       boolean addable)
Description copied from interface: FieldAppearenceGuiConf
Tells wether to show an add button for a collection

Specified by:
setAddable in interface FieldAppearenceGuiConf
Parameters:
collection - the collection to configure
addable - wether to show a button or not
See Also:
FieldAppearenceGuiConf.setRemovable(CollectionItem,boolean)

setRemovable

public void setRemovable(CollectionItem collection,
                         boolean removable)
Description copied from interface: FieldAppearenceGuiConf
Tells wether to show remove buttons for items of a collection

Specified by:
setRemovable in interface FieldAppearenceGuiConf
Parameters:
collection - the collection to configure
removable - wether to show buttons or not
See Also:
FieldAppearenceGuiConf.setAddable(CollectionItem,boolean)

setEditableDefaultValues

public void setEditableDefaultValues(CollectionItem collection,
                                     boolean editable)
Description copied from interface: BehaviorGuiConf
Tells if the default values of an item can be editable from the GUI.

Specified by:
setEditableDefaultValues in interface BehaviorGuiConf

hasEditableDefaultValues

public static boolean hasEditableDefaultValues(MetaItem metaItem)

isVisible

public static boolean isVisible(Object substance,
                                MetaItem metaItem)
Tells if an item is visible (displayed by the GUI).

Parameters:
substance - the object holding the meta item
metaItem - the meta item to check
Returns:
true if visible
See Also:
setVisible(MemberItem,boolean), isVisible(Object,MetaItem)

isVisible

public static boolean isVisible(MetaItem metaItem)
Tells if an item is visible (displayed by the GUI).

Parameters:
metaItem - the meta item to check
Returns:
true if visible
See Also:
setVisible(MemberItem,boolean), isVisible(MetaItem)

isEditable

public static boolean isEditable(Object substance,
                                 FieldItem field)
Tells if a field is editable from the GUI.

Parameters:
substance - the object holding the field item
field - the field item to check
Returns:
true if the field is editable

isEditable

public static boolean isEditable(FieldItem field)
Tells if a field is editable from the GUI.

Parameters:
field - the field item to check
Returns:
true if the field is editable

isCreatable

public static boolean isCreatable(ClassItem cli)
Wether to show "new" buttons for a class (defaults to true)

Parameters:
cli - the class

isAddable

public static boolean isAddable(CollectionItem collection)
Tells wether to show an add button for a collection

Parameters:
collection - the collection item to check
Returns:
true if an add button must be displayed

isAddable

public static boolean isAddable(Object substance,
                                CollectionItem collection)
Tells wether to show an add button for a collection

Parameters:
substance - the object holding the field item
collection - the collection item to check
Returns:
true if an add button must be displayed

isRemovable

public static boolean isRemovable(CollectionItem collection)
Tells wether to show a remove button for a collection

Parameters:
collection - the collection item to check
Returns:
true if a remove button must be displayed

isRemovable

public static boolean isRemovable(Object substance,
                                  CollectionItem collection)
Tells wether to show a remove button for a collection

Parameters:
substance - the object holding the field item
collection - the collection item to check
Returns:
true if a remove button must be displayed

setVisible

public void setVisible(ClassItem cl,
                       String[] itemNames,
                       boolean visible)

setReadOnly

public void setReadOnly(ClassItem cli,
                        String viewName,
                        boolean readOnly)
Specified by:
setReadOnly in interface ClassAppearenceGuiConf

setEmbeddedEditors

public void setEmbeddedEditors(ClassItem cli)
Description copied from interface: FieldAppearenceGuiConf
Tells the GUI to use embedded editors in the default view for all fields of a class, whenever possible.

Specified by:
setEmbeddedEditors in interface FieldAppearenceGuiConf
Parameters:
cli - the class item
See Also:
FieldEditor

setEmbeddedEditors

public void setEmbeddedEditors(ClassItem cli,
                               String viewName,
                               boolean embedded)
Description copied from interface: FieldAppearenceGuiConf
Tells the GUI wether to use embedded editors in a view for all fields of a class.

Specified by:
setEmbeddedEditors in interface FieldAppearenceGuiConf
Parameters:
cli - the class item
viewName - the view name
embedded - wether to use embedded editors by default
See Also:
FieldEditor

setEmbeddedEditor

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

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

setEmbeddedEditor

public void setEmbeddedEditor(MemberItem member,
                              String viewName,
                              boolean embedded)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setEmbeddedEditor in interface FieldAppearenceGuiConf
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, FieldAppearenceGuiConf.setEmbeddedEditor(MemberItem,String,boolean)

setEmbeddedEditors

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

Specified by:
setEmbeddedEditors in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setEmbeddedEditorColumns(CollectionItem,String,MemberItem[])

setEmbeddedEditorColumns

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

Specified by:
setEmbeddedEditorColumns in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setEmbeddedEditors(CollectionItem,String,boolean)

setMultiLineCollection

public void setMultiLineCollection(CollectionItem collection,
                                   String viewName,
                                   CollectionItem multiLine)
Description copied from interface: FieldAppearenceGuiConf
Creates subrows in some cells of a table.

Specified by:
setMultiLineCollection in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.groupBy(CollectionItem,String,FieldItem)

setAdditionalRow

public void setAdditionalRow(CollectionItem collection,
                             String viewName,
                             String row)
Description copied from interface: FieldAppearenceGuiConf
Use a field as a row to be added at the end of a table

Specified by:
setAdditionalRow in interface FieldAppearenceGuiConf

groupBy

public void groupBy(CollectionItem collection,
                    String viewName,
                    FieldItem groupBy)
Description copied from interface: FieldAppearenceGuiConf
Groups cells of table.

Specified by:
groupBy in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setMultiLineCollection(CollectionItem,String,CollectionItem)

setViewType

public void setViewType(FieldItem field,
                        String viewName,
                        String viewType)
Description copied from interface: FieldAppearenceGuiConf
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)

Specified by:
setViewType in interface FieldAppearenceGuiConf

isEmbeddedEditor

public static boolean isEmbeddedEditor(MetaItem item)
Returns:
true is the item has the property Gui.embeddedEditor set to "true"
See Also:
hasEmbeddedEditors(ClassItem), setEmbeddedEditor(MemberItem)

hasEmbeddedEditors

public static boolean hasEmbeddedEditors(ClassItem cli)
Returns:
true if at least one field of the class has the property Gui.embeddedEditor set to "true"
See Also:
isEmbeddedEditor(MetaItem), setEmbeddedEditor(MemberItem)

setBorder

public void setBorder(FieldItem field,
                      String alignment,
                      String style)
Description copied from interface: FieldAppearenceGuiConf
Sets a border to the field in an object view.

Specified by:
setBorder in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setBorder(FieldItem)

setBorder

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

Specified by:
setBorder in interface FieldAppearenceGuiConf
Parameters:
field - the field
See Also:
FieldAppearenceGuiConf.setBorder(FieldItem,String,String)

getBorder

public static Border getBorder(FieldItem field)

setCondition

public void setCondition(AbstractMethodItem method,
                         String condition)
Description copied from interface: MethodAppearenceGuiConf
Sets a condition on a method. If the condition evaluates to false, the method is diabled in the GUI.

Specified by:
setCondition in interface MethodAppearenceGuiConf
Parameters:
method - the method to put a condition on
condition - the condition. It must be the name of method of the same class as method which returns a boolean.

getCondition

public static MethodItem getCondition(AbstractMethodItem method)
Gets the condition method associated with a method, or null if there's none.


setSlowOperation

public void setSlowOperation(AbstractMethodItem method,
                             boolean isSlow)
Description copied from interface: MethodAppearenceGuiConf
If an operation is expected to take a long time to complete, use this method to tell the GUI that it should display a message asking the user to wait for a while.

Specified by:
setSlowOperation in interface MethodAppearenceGuiConf
Parameters:
method - the method
isSlow - wether the method is slow or not

setMimeType

public void setMimeType(AbstractMethodItem method,
                        String type)
Description copied from interface: MethodAppearenceGuiConf

Sets the mime-type of the file written to an OutputStream or Writer.

If a method takes an OutputStream or Writer as a parameter, a display (such as the web display or instance) may redirect the stream, to the browser. So that the browser can correctly interpret the data, it may be necessary to specify its mime-type.

Specified by:
setMimeType in interface MethodAppearenceGuiConf
Parameters:
method -
type - the mime-type (such as "application/pdf")

isSlowOperation

public static boolean isSlowOperation(AbstractMethodItem method)
Tells wethers a method is slow


addPostInvoke

public void addPostInvoke(AbstractMethodItem method,
                          AbstractMethodItem hook)
Description copied from interface: MethodAppearenceGuiConf
Specifies a method to be invoked after a method is invoked from the GUI.

Specified by:
addPostInvoke in interface MethodAppearenceGuiConf
Parameters:
method -
hook - the method to be invoked after "method" is invoked. It must be static and take an InvokeEvent parameter
See Also:
InvokeEvent

isEnabled

public static boolean isEnabled(AbstractMethodItem method,
                                Object substance)
Tells wether a method should be enabled


setMethodParametersWidth

public void setMethodParametersWidth(AbstractMethodItem method,
                                     Length[] width)
                              throws Exception
Description copied from interface: MethodAppearenceGuiConf
Sets the width for all parameters of one method.

Specified by:
setMethodParametersWidth in interface MethodAppearenceGuiConf
Parameters:
method - the method
width - width of all parameters
Exception
See Also:
MethodAppearenceGuiConf.setMethodParametersHeight(AbstractMethodItem,Length[])

getMethodParametersWidth

public static Length[] getMethodParametersWidth(AbstractMethodItem method)
Returns the parameters widths of a method or null if none was set.

Parameters:
method - the method
See Also:
setMethodParametersWidth(AbstractMethodItem,Length[])

setMethodParametersHeight

public void setMethodParametersHeight(AbstractMethodItem method,
                                      Length[] height)
                               throws Exception
Description copied from interface: MethodAppearenceGuiConf
Sets the height for all parameters of one method.

Specified by:
setMethodParametersHeight in interface MethodAppearenceGuiConf
Parameters:
method - the method
height - height of all parameters
Exception
See Also:
MethodAppearenceGuiConf.setMethodParametersWidth(AbstractMethodItem,Length[])

getMethodParametersHeight

public static Length[] getMethodParametersHeight(AbstractMethodItem method)
Returns the parameters heights of a method or null if none was set.

Parameters:
method - the method
See Also:
setMethodParametersHeight(AbstractMethodItem,Length[])

setDefaultEditorWidth

public void setDefaultEditorWidth(VirtualClassItem type,
                                  Length width)
Description copied from interface: FieldAppearenceGuiConf
Sets the default editor width for value of a given type.

Specified by:
setDefaultEditorWidth in interface FieldAppearenceGuiConf
Parameters:
type - the type
width - the editor width
See Also:
FieldAppearenceGuiConf.setDefaultEditorWidth(ClassItem,Length), FieldAppearenceGuiConf.setDefaultEditorHeight(VirtualClassItem,Length), FieldAppearenceGuiConf.setEditorWidth(FieldItem,Length)

setDefaultEditorWidth

public void setDefaultEditorWidth(ClassItem type,
                                  Length width)
Description copied from interface: FieldAppearenceGuiConf
Sets the default editor width for value of a given type.

Specified by:
setDefaultEditorWidth in interface FieldAppearenceGuiConf
Parameters:
type - the type
width - the editor width
See Also:
FieldAppearenceGuiConf.setDefaultEditorWidth(VirtualClassItem,Length), FieldAppearenceGuiConf.setDefaultEditorHeight(VirtualClassItem,Length), FieldAppearenceGuiConf.setEditorWidth(FieldItem,Length)

getEditorWidth

public static Length getEditorWidth(MetaItem type)

getEditorHeight

public static Length getEditorHeight(MetaItem type)

setEditorWidth

public void setEditorWidth(FieldItem field,
                           Length width)
Description copied from interface: FieldAppearenceGuiConf
Sets the width of the field's embedded editor when exist.

Specified by:
setEditorWidth in interface FieldAppearenceGuiConf
Parameters:
field - the field
width - the editor width
See Also:
FieldAppearenceGuiConf.setEmbeddedEditor(MemberItem), FieldAppearenceGuiConf.setEditorHeight(FieldItem,Length), FieldAppearenceGuiConf.setDefaultEditorWidth(ClassItem,Length)

getEditorWidth

public static Length getEditorWidth(FieldItem field)
Returns the editor width of a field or 0 if none was set.

Parameters:
field - the field
See Also:
setEditorWidth(FieldItem,Length)

setSmallEditorWidth

public void setSmallEditorWidth(FieldItem field,
                                Length width)

setDefaultEditorHeight

public void setDefaultEditorHeight(VirtualClassItem type,
                                   Length height)
Description copied from interface: FieldAppearenceGuiConf
Sets the default editor height for value of a given type.

Specified by:
setDefaultEditorHeight in interface FieldAppearenceGuiConf
Parameters:
type - the type
height - the editor height
See Also:
FieldAppearenceGuiConf.setDefaultEditorHeight(ClassItem,Length), FieldAppearenceGuiConf.setDefaultEditorWidth(VirtualClassItem,Length), FieldAppearenceGuiConf.setEditorHeight(FieldItem,Length)

setDefaultEditorHeight

public void setDefaultEditorHeight(ClassItem type,
                                   Length height)
Description copied from interface: FieldAppearenceGuiConf
Sets the default editor height for value of a given type.

Specified by:
setDefaultEditorHeight in interface FieldAppearenceGuiConf
Parameters:
type - the type
height - the editor height
See Also:
FieldAppearenceGuiConf.setDefaultEditorHeight(VirtualClassItem,Length), FieldAppearenceGuiConf.setDefaultEditorWidth(VirtualClassItem,Length), FieldAppearenceGuiConf.setEditorHeight(FieldItem,Length)

setEditorHeight

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

Specified by:
setEditorHeight in interface FieldAppearenceGuiConf
Parameters:
field - the field
height - the editor height
See Also:
FieldAppearenceGuiConf.setEmbeddedEditor(MemberItem), FieldAppearenceGuiConf.setEditorWidth(FieldItem,Length), FieldAppearenceGuiConf.setDefaultEditorHeight(ClassItem,Length)

setSmallEditorHeight

public void setSmallEditorHeight(FieldItem field,
                                 Length height)

setFontAttribute

public void setFontAttribute(String attribute,
                             String value)
Description copied from interface: GuiConf
This configuration method allows the programmer to define attributes for the default font. It currently is only used by the swing display.

The specified font will be used by all the UI components.

Note: this method sets a global font that will be active for all the configured GUIs. It is not possible to have different font configurations when running several GUIs on the same container.

Configurable font attributes are:

family
serif,sans-serif or monospace
weight
normal or bold
style
normal or italic
size
the size of the font

Specified by:
setFontAttribute in interface GuiConf
Parameters:
attribute - the name of the attribute
value - the value for the attribute

getFontAttributes

public static Map getFontAttributes()

setCategories

public void setCategories(ClassItem cli,
                          String[] categories)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setCategories in interface ClassAppearenceGuiConf
Parameters:
cli - the class item
categories - the categories for this class
See Also:
FieldAppearenceGuiConf.setCategory(MemberItem,String)

setCategory

public void setCategory(MemberItem member,
                        String category)
Description copied from interface: FieldAppearenceGuiConf
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.

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

setCategories

public void setCategories(MemberItem member,
                          String[] categories)
Description copied from interface: FieldAppearenceGuiConf
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.

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

getCategories

public static String[] getCategories(MemberItem member)
Get the category of a member as configured with setCategory().

Parameters:
member - the MemberItem
Returns:
the category of the field or null.

isMemberInCategory

public static boolean isMemberInCategory(MemberItem member,
                                         String category)
Tells wether a member item belong to category

Returns:
if category==null, true, otherwise if the categories of the member contains the category, true, otherwise false.
See Also:
setCategory(MemberItem,String), setCategories(MemberItem,String[])

checkCategories

public void checkCategories(ClassItem cli,
                            int length)

setCategoriesIcons

public void setCategoriesIcons(ClassItem cli,
                               String[] icons)
Description copied from interface: ClassAppearenceGuiConf
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)

Specified by:
setCategoriesIcons in interface ClassAppearenceGuiConf
Parameters:
cli - the class
icons - the icons for the categories
See Also:
ClassAppearenceGuiConf.setCategories(ClassItem,String[])

getCategoriesIcons

public static String[] getCategoriesIcons(ClassItem cl)
Get the categories icons (icons displayed in tabs).

Parameters:
cl - the class.
Returns:
the list of icons.

setCategoriesLabels

public void setCategoriesLabels(ClassItem cli,
                                String[] labels)
Description copied from interface: ClassAppearenceGuiConf
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)

Specified by:
setCategoriesLabels in interface ClassAppearenceGuiConf
Parameters:
cli - the class
labels - the labels for the categories
See Also:
ClassAppearenceGuiConf.setCategories(ClassItem,String[])

getCategoriesLabels

public static String[] getCategoriesLabels(ClassItem cl)
Get the categories labels (text displayed in tabs).

Parameters:
cl - the class
Returns:
the list of labels.

setEmbeddedView

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

Specified by:
setEmbeddedView in interface FieldAppearenceGuiConf
Parameters:
member - the member (reference field or method) that must be embedded
See Also:
FieldAppearenceGuiConf.setEmbeddedView(MemberItem,String,boolean)

setEmbeddedView

public void setEmbeddedView(MemberItem member,
                            boolean embedded)

setEmbeddedView

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

Specified by:
setEmbeddedView in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setEmbeddedView(MemberItem)

setEmbeddedAdder

public void setEmbeddedAdder(CollectionItem collection,
                             boolean embedded)
Description copied from interface: FieldAppearenceGuiConf
Tells the GUI wether to use an embedded view for the adder of a collection.

Specified by:
setEmbeddedAdder in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
embedded - wether to use an embedded view for the adder

setDesktopCustomizedView

public void setDesktopCustomizedView(ClassItem classItem,
                                     ClassItem type)
Tells if a field item's value must be displayed embbeded.

Specified by:
setDesktopCustomizedView in interface ClassAppearenceGuiConf
Parameters:
classItem - the class of the viewed objects
type - the class of the view component
Returns:
wether to display the field's values embbeded, default to false.

setTableView

public void setTableView(FieldItem field)
Description copied from interface: FieldAppearenceGuiConf
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).

Specified by:
setTableView in interface FieldAppearenceGuiConf
Parameters:
field - the field that contains the collection

setChoiceView

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

Specified by:
setChoiceView in interface FieldAppearenceGuiConf
Parameters:
field - 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)
Description copied from interface: FieldAppearenceGuiConf
Tells the GUI wether to show row numbers for tables and lists.

Specified by:
showRowNumbers in interface FieldAppearenceGuiConf
Parameters:
collection - the affected collection
value - wether to show row numbers
See Also:
FieldAppearenceGuiConf.setDefaultShowRowNumbers(boolean)

setDefaultShowRowNumbers

public void setDefaultShowRowNumbers(boolean value)
Description copied from interface: FieldAppearenceGuiConf
Tells the GUI wether to show row numbers for tables and lists by default.

Specified by:
setDefaultShowRowNumbers in interface FieldAppearenceGuiConf
Parameters:
value - wether to show row numbers
See Also:
FieldAppearenceGuiConf.showRowNumbers(CollectionItem,boolean)

isShowRowNumbers

public static boolean isShowRowNumbers(CollectionItem collection)

setToString

public void setToString(ClassItem classItem,
                        String formatExpression)
Description copied from interface: ClassAppearenceGuiConf
Defines the string representation of the instances of the class.

Specified by:
setToString in interface ClassAppearenceGuiConf
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:
ClassAppearenceGuiConf.setToString(ClassItem,MemberItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,MemberItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,ClassItem,String)

setToString

public void setToString(ClassItem classItem,
                        MemberItem selector,
                        String formatExpression)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setToString in interface ClassAppearenceGuiConf
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:
ClassAppearenceGuiConf.setToString(ClassItem,String), ClassAppearenceGuiConf.setToString(ClassItem,MemberItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,MemberItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,ClassItem,String)

setToString

public void setToString(ClassItem classItem,
                        ClassItem selector,
                        String formatExpression)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setToString in interface ClassAppearenceGuiConf
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:
ClassAppearenceGuiConf.setToString(ClassItem,String), ClassAppearenceGuiConf.setToString(ClassItem,MemberItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,MemberItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,ClassItem,String)

setToolTipText

public void setToolTipText(ClassItem classItem,
                           String formatExpression)
Description copied from interface: ClassAppearenceGuiConf
Defines a contextual string tooltip for the instances of a class.

Specified by:
setToolTipText in interface ClassAppearenceGuiConf
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:
ClassAppearenceGuiConf.setToolTipText(ClassItem,ClassItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,MemberItem,String)

setToolTipText

public void setToolTipText(ClassItem classItem,
                           MemberItem selector,
                           String formatExpression)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setToolTipText in interface ClassAppearenceGuiConf
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:
ClassAppearenceGuiConf.setToolTipText(ClassItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,ClassItem,String)

setToolTipText

public void setToolTipText(ClassItem classItem,
                           ClassItem selector,
                           String formatExpression)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setToolTipText in interface ClassAppearenceGuiConf
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:
ClassAppearenceGuiConf.setToolTipText(ClassItem,String), ClassAppearenceGuiConf.setToolTipText(ClassItem,MemberItem,String)

showColumnFilters

public void showColumnFilters(CollectionItem collection,
                              String[] columnNames)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
showColumnFilters in interface FieldAppearenceGuiConf
Parameters:
collection - the collection to configure
columnNames - the field names (from the collection's component type) that can be filtered

setDefaultSortedColumn

public void setDefaultSortedColumn(CollectionItem collection,
                                   String column)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setDefaultSortedColumn in interface FieldAppearenceGuiConf
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.

setDefaultSortedColumn

public void setDefaultSortedColumn(ClassItem cl,
                                   String column)
Description copied from interface: ClassAppearenceGuiConf
Sets a default sorted column for a class.

Specified by:
setDefaultSortedColumn in interface ClassAppearenceGuiConf
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.

getDefaultSortedColumn

public static String getDefaultSortedColumn(CollectionItem collection)

setAutoCreate

public void setAutoCreate(FieldItem field)
Description copied from interface: BehaviorGuiConf
This configuration method tells the GUI to automatically create a new instance of the field type when a setter or an adder is invoke on the object that owns this field.

This features makes the GUI more usable in many cases (otherwhise, a intermediate step is asked to the user for creating or picking an existing instance).

Specified by:
setAutoCreate in interface BehaviorGuiConf
Parameters:
field - the field to be auto-created

isAutoCreate

public static boolean isAutoCreate(FieldItem field)

setAutoCreateInitializer

public void setAutoCreateInitializer(FieldItem field,
                                     MethodItem initializer)
Description copied from interface: BehaviorGuiConf
Defines a method to initialize new objects created by the auto-create behaviour.

Specified by:
setAutoCreateInitializer in interface BehaviorGuiConf
Parameters:
field - the field whose autocreate behaviour is considered
initializer - method used to initialize new objects. It must be a method of the field's owning class that takes an instance of the auto created object as parameter.
See Also:
BehaviorGuiConf.setAutoCreate(FieldItem)

getInitiliazer

public static MethodItem getInitiliazer(FieldItem field)
Returns the initializer method of a field, if any, or null.

Parameters:
field - the field
See Also:
setAutoCreateInitializer(FieldItem,MethodItem)

setAutoCreateParameters

public void setAutoCreateParameters(AbstractMethodItem method)
Description copied from interface: BehaviorGuiConf
This configuration method tells which parameters of the given method should be autocreated.

It does not use the constructor view but the actual modal view on an empty created object that needs to be filled by the user.

Specified by:
setAutoCreateParameters in interface BehaviorGuiConf
Parameters:
method - the method

isAutoCreateParameters

public static boolean isAutoCreateParameters(AbstractMethodItem method)

setAutoCreateAll

public void setAutoCreateAll(ClassItem cl)
Description copied from interface: BehaviorGuiConf
This configuration method tells that all the class methods must be in auto-creation mode.

Specified by:
setAutoCreateAll in interface BehaviorGuiConf
Parameters:
cl - the class

setAutoCreateParametersEx

public void setAutoCreateParametersEx(ClassItem cli,
                                      String[] excludedMethods)
Description copied from interface: BehaviorGuiConf
This configuration method tells that all the class methods must be in auto-creation mode except the excluded ones.

Specified by:
setAutoCreateParametersEx in interface BehaviorGuiConf
Parameters:
cli - the class
excludedMethods - the excluded methods names

setAutoCreateState

public void setAutoCreateState(ClassItem cli,
                               String[] fields)
Description copied from interface: BehaviorGuiConf
This configuration method tells which fields of the given class should be auto-created.

When a wrappee of the given class is auto-created using the setAutoCreateParameters method, all the fields mentioned here are also autocreated afterwards and a modal view is shown to the user so that he can fill the values. The given fields should be references (on other wrappees).

Specified by:
setAutoCreateState in interface BehaviorGuiConf
Parameters:
cli - the class
fields - the fields to autocreate
See Also:
BehaviorGuiConf.setAutoCreateParameters(AbstractMethodItem)

setOpenViewMethod

public void setOpenViewMethod(ClassItem cli,
                              String methodName)
Description copied from interface: BehaviorGuiConf
This configuration method allows the programmer to specify that the result of a given method (should be a wrappe) opens a new view on this result instead of treating it as a simple result.

Specified by:
setOpenViewMethod in interface BehaviorGuiConf
Parameters:
cli - the class
methodName - the method name
See Also:
Display.openView(Object)

declareView

public void declareView(ClassItem cli,
                        String viewName,
                        String parentViewName)

declareView

public void declareView(ClassItem cli,
                        String viewName)

getView

public static ObjectView getView(ClassItem cli,
                                 String viewName)
Gets an object view by name. Creates one if it does not exist


getView

public static MemberItemView getView(MemberItem member,
                                     String viewName)
Gets an object view by name. Creates one if it does not exist


getView

public static CollectionItemView getView(CollectionItem collection,
                                         String viewName)
Gets an object view by name. Creates one if it does not exist


setAttributesOrder

public void setAttributesOrder(ClassItem cli,
                               String[] attributeNames)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setAttributesOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class
attributeNames - the name of the attributes in the rendering order
See Also:
ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String,String[]), ClassAppearenceGuiConf.setTableMembersOrder(ClassItem,String[]), ClassAppearenceGuiConf.setMethodsOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setAttributesOrder

public void setAttributesOrder(ClassItem cli,
                               String viewName,
                               String[] attributeNames)
Description copied from interface: ClassAppearenceGuiConf
Sets the order in which the attributes of a class are to be rendered for a given view.

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

Specified by:
setAttributesOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class
viewName - the name of the view
attributeNames - the name of the attributes in the rendering order
See Also:
ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String[]), ClassAppearenceGuiConf.setTableMembersOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setLineBreaks

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

Specified by:
setLineBreaks in interface ClassAppearenceGuiConf
Parameters:
cli - the class
fields - the names fields which should start on a new line.

setMethodsOrder

public void setMethodsOrder(ClassItem cli,
                            String[] methodNames)
Description copied from interface: ClassAppearenceGuiConf
Sets the order in which the methods of a class are to be rendered for the default view.

Methods not listed here will not be rendered.

Specified by:
setMethodsOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class name
methodNames - the name of the methods in the rendering order
See Also:
ClassAppearenceGuiConf.setMethodsOrder(ClassItem,String,String[])

setMethodsOrder

public void setMethodsOrder(ClassItem cli,
                            String viewName,
                            String[] methodNames)
Description copied from interface: ClassAppearenceGuiConf
Sets the order in which the methods of a class are to be rendered for a view.

Methods not listed here will not be rendered.

Specified by:
setMethodsOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class name
viewName - the view for which to set the methods order
methodNames - the name of the methods in the rendering order
See Also:
ClassAppearenceGuiConf.setMethodsOrder(ClassItem,String[]), ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String,String[])

setCreationAttributesOrder

public void setCreationAttributesOrder(ClassItem cli,
                                       String[] attributeNames)
Description copied from interface: ClassAppearenceGuiConf
Sets the order in which the attributes of a class are to be rendered when an instance is created.

Specified by:
setCreationAttributesOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class name
attributeNames - the name of the attributes in the rendering order
See Also:
ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String[])

getCreationAttributesOrder

public static FieldItem[] getCreationAttributesOrder(ClassItem cl)
Gets the field items to display when creation a new instance a class


isCreationAttribute

public static boolean isCreationAttribute(FieldItem field)

setMembersOrder

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

Specified by:
setMembersOrder in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
targetClass - the class of attributes to render
memberNames - the name of the members in the rendering order
See Also:
FieldAppearenceGuiConf.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)
Description copied from interface: FieldAppearenceGuiConf
Sets the order in which the attributes of the elements of a collection are to be rendered for a given view.

Specified by:
setMembersOrder in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

getMembersOrder

public static MemberItem[] getMembersOrder(CollectionItem collection,
                                           String viewName)

setTableMembersOrder

public void setTableMembersOrder(ClassItem cli,
                                 String[] memberNames)
Description copied from interface: ClassAppearenceGuiConf
Sets the order in which the attributes of a class are to be rendered when their instance are placed within a table of the a default view.

Attributes not listed here will not be rendered.

Specified by:
setTableMembersOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class name
memberNames - the name of the member in the rendering order
See Also:
ClassAppearenceGuiConf.setTableMembersOrder(ClassItem,String,String[]), ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setTableMembersOrder

public void setTableMembersOrder(ClassItem cli,
                                 String viewName,
                                 String[] memberNames)
Description copied from interface: ClassAppearenceGuiConf
Sets the order in which the attributes of a class are to be rendered when their instance are placed within a table of a given view.

Attributes not listed here will not be rendered.

Specified by:
setTableMembersOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class name
viewName - the name of the view
memberNames - the name of the member in the rendering order
See Also:
ClassAppearenceGuiConf.setTableMembersOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setTreeAttributesOrder

public void setTreeAttributesOrder(ClassItem cli,
                                   String[] attributeNames)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
setTreeAttributesOrder in interface ClassAppearenceGuiConf
Parameters:
cli - the class name
attributeNames - the name of the attributes in the rendering order
See Also:
ClassAppearenceGuiConf.setAttributesOrder(ClassItem,String[]), FieldAppearenceGuiConf.setMembersOrder(CollectionItem,ClassItem,String[])

setFieldChoice

public void setFieldChoice(FieldItem field,
                           Boolean editable,
                           String[] choice)
Description copied from interface: FieldAppearenceGuiConf
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.

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

setFieldEnum

public void setFieldEnum(FieldItem field,
                         String enumName)
Description copied from interface: FieldAppearenceGuiConf

Declare a field as an enumeration.

Specified by:
setFieldEnum in interface FieldAppearenceGuiConf
Parameters:
field - the field
enumName - the name of the enumeration
See Also:
GuiConf.defineEnum(String,String[],int,int), FieldAppearenceGuiConf.setFieldChoice(FieldItem,Boolean,String[]), FieldAppearenceGuiConf.setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String)

getEnum

public static Enum getEnum(FieldItem field)

setParameterEnums

public void setParameterEnums(AbstractMethodItem method,
                              String[] enumNames)
                       throws Exception
Description copied from interface: MethodAppearenceGuiConf
Declares some parameters of method as enums.

Specified by:
setParameterEnums in interface MethodAppearenceGuiConf
Parameters:
method - the method
enumNames - the name of enums, for each parameter of the method. Use null to leave a parameter unaffected.
Exception

setLinkedParameters

public void setLinkedParameters(AbstractMethodItem method,
                                String[] collections)
                         throws Exception
Description copied from interface: MethodAppearenceGuiConf
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.

Specified by:
setLinkedParameters in interface MethodAppearenceGuiConf
Parameters:
method - the method
collections - the entire names of the collections that should be linked to the corresponding parameters (empty string if unlinked)
Exception

setDefaultValue

public void setDefaultValue(FieldItem field,
                            MethodItem method,
                            String value)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setDefaultValue in interface FieldAppearenceGuiConf
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:
getDefaultValue(FieldItem,String)

setDefaultValue

public void setDefaultValue(FieldItem field,
                            String value)
Description copied from interface: FieldAppearenceGuiConf
Set the default value for a choice.

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

Specified by:
setDefaultValue in interface FieldAppearenceGuiConf
Parameters:
field - the field
value - the string representation of the default value
See Also:
getDefaultValue(FieldItem,String), FieldAppearenceGuiConf.setDefaultValue(FieldItem,MethodItem,String)

hasDefaultValue

public static boolean hasDefaultValue(FieldItem field)

isEditableChoice

public static boolean isEditableChoice(FieldItem field)

setDynamicFieldChoice

public void setDynamicFieldChoice(FieldItem field,
                                  Boolean editable,
                                  ClassItem targetClass,
                                  String targetMethod)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setDynamicFieldChoice in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setDynamicFieldChoice(FieldItem,Boolean,MethodItem), ClassAppearenceGuiConf.setDynamicClassChoice(String,MethodItem)

setDynamicFieldChoice

public void setDynamicFieldChoice(FieldItem field,
                                  CollectionItem targetField)
Description copied from interface: FieldAppearenceGuiConf
Use objects from a collection as the available choices to edit a reference field.

Specified by:
setDynamicFieldChoice in interface FieldAppearenceGuiConf
Parameters:
field - the edited reference field
targetField - the collection. It belong to same class as the field.

setDynamicFieldChoice

public void setDynamicFieldChoice(FieldItem field,
                                  Boolean editable,
                                  MethodItem targetMethod)
Description copied from interface: FieldAppearenceGuiConf
Same as setFieldChoice but with dynamically defined values.

Specified by:
setDynamicFieldChoice in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setDynamicFieldChoice(FieldItem,Boolean,ClassItem,String), ClassAppearenceGuiConf.setDynamicClassChoice(String,MethodItem)

setMethodDynamicParameterChoice

public void setMethodDynamicParameterChoice(MethodItem method,
                                            ClassItem[] targetClasses,
                                            String[] targetMethods,
                                            boolean[] editable)
Description copied from interface: MethodAppearenceGuiConf
Same as 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.

Specified by:
setMethodDynamicParameterChoice in interface MethodAppearenceGuiConf
Parameters:
method - the method
targetClasses - 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)
See Also:
MethodAppearenceGuiConf.setMethodDynamicParameterChoice(MethodItem,MethodItem[],boolean[])

setMethodDynamicParameterChoice

public void setMethodDynamicParameterChoice(MethodItem method,
                                            MethodItem[] targetMethods,
                                            boolean[] editable)
Description copied from interface: MethodAppearenceGuiConf
Same as 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.

Specified by:
setMethodDynamicParameterChoice in interface MethodAppearenceGuiConf
Parameters:
method - the method
targetMethods - the static methods 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)
See Also:
MethodAppearenceGuiConf.setMethodDynamicParameterChoice(MethodItem,ClassItem[],String[],boolean[])

setDynamicClassChoice

public void setDynamicClassChoice(String className,
                                  MethodItem targetMethod)
Description copied from interface: ClassAppearenceGuiConf
Defines a method that returns instances of a class that should be displayed in comboboxes.

Specified by:
setDynamicClassChoice in interface ClassAppearenceGuiConf
Parameters:
className - the class to configure (ClassItem or VirtualClassItem)
targetMethod - the static method that returns instances of the class. It should take a ClassItem as a parameter and return a Collection
See Also:
FieldAppearenceGuiConf.setDynamicFieldChoice(FieldItem,Boolean,MethodItem)

setCollectionType

public void setCollectionType(CollectionItem collection,
                              String type)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setCollectionType in interface FieldAppearenceGuiConf
Parameters:
collection - the collection within this class
type - the type of this collection (an exiting class name)

setURLSelectionMode

public void setURLSelectionMode(FieldItem field,
                                String mode,
                                String[] extensions,
                                String extensionsDescription)
Sets the selection mode for an URL.

Parameters:
field - the field (of URL type)
mode - the selection mode (DIRECTORIES_ONLY || FILES_AND_DIRECTORIES), default is FILES_ONLY
extensions - the selection extensions (gif, ps, etc.)
extensionsDescription - the description of the extensions (can be null)

setViewOnSelection

public void setViewOnSelection(CollectionItem collection)
Description copied from interface: BehaviorGuiConf
This configuration method allows the programmer to specify that the view on an object contained in a collection will be automatically opened by the GUI when the user selects it.

Specified by:
setViewOnSelection in interface BehaviorGuiConf
Parameters:
collection - the collection
See Also:
BehaviorGuiConf.setOnSelection(CollectionItem,MethodItem), BehaviorGuiConf.setSelectionTarget(CollectionItem,ClassItem,String)

getViewOnSelection

public static boolean getViewOnSelection(FieldItem field)
Tells wether VIEW_ON_SELECTION is set for a given field. Defaults to true.

Parameters:
field - the field
Returns:
true if VIEW_ON_SELECTION is set for the field
See Also:
setViewOnSelection(CollectionItem)

setOnSelection

public void setOnSelection(CollectionItem collection,
                           MethodItem eventHandler)
Description copied from interface: BehaviorGuiConf
Sets the event handler to be called when an item of the collection is selected.

Specified by:
setOnSelection in interface BehaviorGuiConf
Parameters:
collection - the collection
eventHandler - the event handler method. It must be static method. It will be called with the following parameters : the CustomizedGUI, the CollectionItem and the selected Object. If the handler returns an object, it will be used as the selected object.

setSelectionTarget

public void setSelectionTarget(CollectionItem collection,
                               ClassItem targetClass,
                               String targetField)
Description copied from interface: BehaviorGuiConf
Sets the field to be displayed when an item of the collection is selected, instead of the item itself.

If the user selects an object o, o.<targetField> will be displayed instead of o.

Specified by:
setSelectionTarget in interface BehaviorGuiConf
Parameters:
collection - the collection
targetClass - the class owning the target field
targetField - the field to display
See Also:
BehaviorGuiConf.setViewOnSelection(CollectionItem)

getSelectionHandler

public static MethodItem getSelectionHandler(MemberItem member)

setPreferredHeight

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

Specified by:
setPreferredHeight in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
height - the preferred height
See Also:
FieldAppearenceGuiConf.setPreferredWidth(CollectionItem,Length)

setPreferredWidth

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

Specified by:
setPreferredWidth in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
width - the preferred width
See Also:
FieldAppearenceGuiConf.setPreferredHeight(CollectionItem,Length)

setNumRowsPerPage

public void setNumRowsPerPage(CollectionItem collection,
                              int numRows)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setNumRowsPerPage in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
numRows - the number of rows per page
See Also:
FieldAppearenceGuiConf.setAvailableNumRowsPerPage(CollectionItem,int[])

setAvailableNumRowsPerPage

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

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

getAvailableNumRowsPerPage

public static int[] getAvailableNumRowsPerPage(CollectionItem collection)

getNumRowsPerPage

public static int getNumRowsPerPage(CollectionItem collection)

getStartIndex

public static int getStartIndex(CollectionItem collection)
Gets start index for collection view from the context

Parameters:
collection - the collection to get the start index of

setStartIndex

public static void setStartIndex(CollectionItem collection,
                                 int index)
Sets the start index for a collection view in the context

Parameters:
collection - the collection
index - the start index

removeStartIndex

public static void removeStartIndex(CollectionItem collection)

setFileChooserView

public void setFileChooserView(MethodItem method,
                               String[] fileExtensions,
                               String fileDescription)
Description copied from interface: FieldAppearenceGuiConf
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.

Specified by:
setFileChooserView in interface FieldAppearenceGuiConf
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, isFileChooserView(MethodItem)

isFileChooserView

public boolean isFileChooserView(MethodItem setter)
Tells if the given method call by the GUI opens a file chooser dialog.

Parameters:
setter - the setter for the field
Returns:
true if a file chooser is oppened
See Also:
getFileExtensions(MethodItem), getFileDescription(MethodItem)

getFileExtensions

public String[] getFileExtensions(MethodItem setter)
Gets the file extensions for a given field that is view as a file chooser (more precisely, the field that is set by the given setter).

For instance, the file extensions can be a strings array like {"gif", "jpg", "png"} or {"txt", "doc"}.

Parameters:
setter - the setter for the field
Returns:
the description of the files that are associated to the field
See Also:
isFileChooserView(MethodItem)

getFileDescription

public String getFileDescription(MethodItem setter)
Gets the file description for a given field that is view as a file chooser (more precisely, the field that is set by the given setter).

For instance, the file description can be a string like "Image files" or "Text files".

Parameters:
setter - the setter for the field
Returns:
the description of the files that are associated to the field
See Also:
isFileChooserView(MethodItem)

isTableView

public static boolean isTableView(CollectionItem collection)
Returns true if the given item must be displayed by the GUI as a table.

Parameters:
collection - the collection to check

isChoiceView

public static boolean isChoiceView(CollectionItem collection)

isExternalChoiceView

public static boolean isExternalChoiceView(CollectionItem collection)

setCreationAllowedParameters

public void setCreationAllowedParameters(AbstractMethodItem method,
                                         boolean[] create)
Description copied from interface: MethodAppearenceGuiConf
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.

Specified by:
setCreationAllowedParameters in interface MethodAppearenceGuiConf
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).
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)
See Also:
MethodAppearenceGuiConf.setCreationAllowed(FieldItem,boolean)

setCreationAllowed

public void setCreationAllowed(FieldItem field,
                               boolean allow)
Description copied from interface: MethodAppearenceGuiConf
Tells wether should be allowed to create a new instance when editing the value of a field.

Specified by:
setCreationAllowed in interface MethodAppearenceGuiConf
Parameters:
field - the field
allow - wether to allow or not
See Also:
MethodAppearenceGuiConf.setCreationAllowedParameters(AbstractMethodItem,boolean[])

isCreationAllowedParameter

public static boolean isCreationAllowedParameter(AbstractMethodItem method,
                                                 int i)
Tells wether to display a "new" button for a parameter of a method

Parameters:
method - the method
i - index of the parameter
Returns:
a boolean
See Also:
setCreationAllowedParameters(AbstractMethodItem,boolean[])

setParameterNames

public void setParameterNames(AbstractMethodItem method,
                              String[] parameterNames)
Description copied from interface: MethodAppearenceGuiConf
Sets the argument names of a given method item so that they can be used by GUI aspect components.

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).

Specified by:
setParameterNames in interface MethodAppearenceGuiConf
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).
parameterNames - the parameter names

getParameterNames

public static String[] getParameterNames(AbstractMethodItem method)
Returns the parameter names of a method. If none were with setParameterNames, try some naming convention heuristic.

Parameters:
method - the method
Returns:
the parameter names of the method
See Also:
setParameterNames(AbstractMethodItem,String[]), setParameterNames(AbstractMethodItem,String[])

setParameterFields

public void setParameterFields(AbstractMethodItem method,
                               String[] parameterFields)
Description copied from interface: MethodAppearenceGuiConf
Specify that a parameter of a method corresponds to a field within the invoked object.

Specified by:
setParameterFields in interface MethodAppearenceGuiConf
Parameters:
method - the method
parameterFields - an array that contains the corresponding field for each parameter of the method

setPasswordParameters

public void setPasswordParameters(AbstractMethodItem method,
                                  String[] params)
Description copied from interface: MethodAppearenceGuiConf
Specify that a parameter of a method is a pasword method.

A password parameter will be rendered with stars instead of the actual characters.

Specified by:
setPasswordParameters in interface MethodAppearenceGuiConf
Parameters:
method - the method
params - an array that must contains "true" items if the corresponding parameter is a password, "false" or "" otherwhise.

setDirectCollectionMethods

public void setDirectCollectionMethods(CollectionItem collection,
                                       String[] methods)
Description copied from interface: MethodAppearenceGuiConf
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.

Specified by:
setDirectCollectionMethods in interface MethodAppearenceGuiConf
Parameters:
collection - the collection
methods - the names of the methods that can be invoked on the selected element

setDefaultValues

public void setDefaultValues(AbstractMethodItem method,
                             Object[] values)
Description copied from interface: MethodAppearenceGuiConf
Sets the default value for argument names of a given method item so that they can be used by GUI aspect components.

Specified by:
setDefaultValues in interface MethodAppearenceGuiConf
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).
values - the default parameter values

setDefaultsAttributesOrder

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

Specified by:
setDefaultsAttributesOrder in interface ClassAppearenceGuiConf
Parameters:
cl - the class
attributeNames - the name of the attributes
See Also:
BehaviorGuiConf.setEditableDefaultValues(CollectionItem,boolean)

getDefaultsAttributesOrder

public static FieldItem[] getDefaultsAttributesOrder(ClassItem cl)

setClosingMethod

public void setClosingMethod(ClassItem classItem,
                             String methodName)
Description copied from interface: BehaviorGuiConf
Sets the given method to be closing (ie, when the user press the corresponding button, it performs the call and closes the current object view).

Specified by:
setClosingMethod in interface BehaviorGuiConf
Parameters:
classItem - the class the contains the method
methodName - the method item name. 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).

setModifyingBoxes

public void setModifyingBoxes(ClassItem classItem,
                              String methodName,
                              String[] modifyingBoxes)

getModifyingBoxes

public String[] getModifyingBoxes(AbstractMethodItem method)
Get the modifying boxes for the given abstract method item (a method or a constructor).

Returns:
the mofifying boxes names for each parameter

captureSystemOut

public void captureSystemOut()
Tells the swing gui to capture System.out so that it appears a in tab.

Specified by:
captureSystemOut in interface BehaviorGuiConf

captureSystemErr

public void captureSystemErr()
Description copied from interface: BehaviorGuiConf
Tells the swing administration gui to capture System.err so that it appears in a tab.

Specified by:
captureSystemErr in interface BehaviorGuiConf

setDefaultCurrency

public void setDefaultCurrency(String currencyName,
                               int precision)
Description copied from interface: GuiConf
Set the default currency

Specified by:
setDefaultCurrency in interface GuiConf
Parameters:
currencyName - the name of the default currency
precision - number of decimals to display

getDefaultCurrency

public static String getDefaultCurrency()
Returns the default currency


declareCurrency

public void declareCurrency(String currencyName,
                            int precision,
                            double rate)
Description copied from interface: GuiConf
Declare a currency and it's change rate with the default currency

Specified by:
declareCurrency in interface GuiConf
Parameters:
currencyName - the name of currency
precision - number of decimals to display for the currency
rate - the change rate for the currency

getCurrencies

public static Enumeration getCurrencies()
Returns an enumeration of all declared currencies, including the default currency.

Returns:
the declared currencies as an Enumeration of Currency.

getCurrency

public static Currency getCurrency(String currencyName)
Returns the Currency object associated with a currency name.


getViewFactory

public static ViewFactory getViewFactory(String guiType)
Returns a ViewFactory for a given guiType

Parameters:
guiType - the type of the gui ("swing","web",...)

setViewConstructor

public void setViewConstructor(String guiType,
                               String viewType,
                               AbstractMethodItem constructor)
Set the view constructor for a given gui type.

Specified by:
setViewConstructor in interface GuiConf
Parameters:
guiType - the type of the gui ("swing","web",...)
viewType - the type of the view
constructor - the view constructor for this gui type and view type

setDateFormat

public void setDateFormat(String dateFormat)
Description copied from interface: GuiConf
Set the default date format used by date components. It must be a valid format as defined by java.text.SimpleDateFormat

Specified by:
setDateFormat in interface GuiConf
Parameters:
dateFormat - the date format
See Also:
SimpleDateFormat

getDateFormat

public static String getDateFormat()
Returns the date format as set by setDateFormat.

Returns:
the date format

setDateHourFormat

public void setDateHourFormat(String dateFormat)

getDateHourFormat

public static String getDateHourFormat()
Returns the date format for DateHours as set by setDateHourFormat.

Returns:
the date format

getFloatFormat

public static String getFloatFormat()
Returns the default display format of floats.


setFloatFormat

public void setFloatFormat(FieldItem field,
                           String format)
Description copied from interface: FieldAppearenceGuiConf
Sets the display format of a float or double field.

Specified by:
setFloatFormat in interface FieldAppearenceGuiConf
Parameters:
field - the field
format - the display format of the field
See Also:
DecimalFormat

getIntFormat

public static String getIntFormat()
Returns the default display format of integers.


setIntFormat

public void setIntFormat(FieldItem field,
                         String format)

setFormat

public void setFormat(String className,
                      String format)
Description copied from interface: ClassAppearenceGuiConf
Sets the display format of a class.

Specified by:
setFormat in interface ClassAppearenceGuiConf

getFormat

public static String getFormat(MetaItem item)
Returns the format of a ClassItem or VirtualClassItem.

See Also:
setFormat(String,String)

getFloatFormat

public static String getFloatFormat(MetaItem item)
Returns the display format of an item.


getIntFormat

public static String getIntFormat(MetaItem item)
Returns the display format of an item.


setCommitOnFocusLost

public void setCommitOnFocusLost(boolean value)
Description copied from interface: BehaviorGuiConf
Set the commit method to use when attibutes are edited.

Specified by:
setCommitOnFocusLost in interface BehaviorGuiConf
Parameters:
value - If true, attribute changes are committed when the widget loses focus. Otherwise, a commit and a cancel button are displayed in each object view.

getCommitOnFocusLost

public static boolean getCommitOnFocusLost()

setDescription

public void setDescription(ClassItem classItem,
                           String description)
Description copied from interface: ClassAppearenceGuiConf
Sets the description of a class.

Specified by:
setDescription in interface ClassAppearenceGuiConf
Parameters:
classItem - the class
description - the description of the class

setDescription

public void setDescription(MemberItem member,
                           String description)
Description copied from interface: FieldAppearenceGuiConf
Sets the description of a class member (field of method).

Specified by:
setDescription in interface FieldAppearenceGuiConf
Parameters:
member - the member
description - the description of the class member

getDescription

public static String getDescription(Object object)
Returns the description of an object if it has been set.


getDescription

public static String getDescription(Object object,
                                    String beforeString,
                                    String afterString)

setLabel

public void setLabel(ClassItem classItem,
                     String label)
Description copied from interface: ClassAppearenceGuiConf
Sets the label of a class.

Specified by:
setLabel in interface ClassAppearenceGuiConf
Parameters:
classItem - the class
label - the label of the class

setLabel

public void setLabel(MemberItem member,
                     String label)
Description copied from interface: FieldAppearenceGuiConf
Sets the label of a class member (field of method).

Specified by:
setLabel in interface FieldAppearenceGuiConf
Parameters:
member - the member
label - the label of the class member
See Also:
FieldAppearenceGuiConf.setLabel(MemberItem,MemberItem,String)

setLabel

public void setLabel(MemberItem member,
                     MemberItem selector,
                     String label)
Description copied from interface: FieldAppearenceGuiConf
Sets the label of a class member (field of method) for a given context

Specified by:
setLabel in interface FieldAppearenceGuiConf
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:
FieldAppearenceGuiConf.setLabel(MemberItem,String)

getLabel

public static String getLabel(MetaItem item)

getLabel

public static String getLabel(MetaItem item,
                              Stack context)
Returns the label of an item, or an automatically computed string if none was set.

Parameters:
item - the MetaItem
Returns:
the label of the MetaItem

setMnemonics

public void setMnemonics(MemberItem method,
                         String mnemonics)
Description copied from interface: FieldAppearenceGuiConf
Defines preferred mnemonics for field of method.

Specified by:
setMnemonics in interface FieldAppearenceGuiConf
Parameters:
method -
mnemonics - the mnemonics

setMnemonics

public void setMnemonics(ClassItem cli,
                         String mnemonics)
Description copied from interface: ClassAppearenceGuiConf
Defines preferred mnemonics for class.

Specified by:
setMnemonics in interface ClassAppearenceGuiConf
Parameters:
cli -
mnemonics - the mnemonics

getMnemonics

public static String getMnemonics(MetaItem item)

getMnemonics

public static String getMnemonics(MethodItem method)

defineEnum

public void defineEnum(String name,
                       String[] values,
                       int start,
                       int step)
Description copied from interface: GuiConf
Define an enumeration. It associates integer values with strings.

Specified by:
defineEnum in interface GuiConf
Parameters:
name - the name of enumeration to define
values - the labels of the values
start - the integer value of the first item.
step -
See Also:
FieldAppearenceGuiConf.setFieldEnum(FieldItem,String), FieldAppearenceGuiConf.setFieldChoice(FieldItem,Boolean,String[])

setDisplayLabel

public void setDisplayLabel(MemberItem member,
                            boolean displayLabel)
Description copied from interface: FieldAppearenceGuiConf
Wether to display a label containing the name of the field in views.

Specified by:
setDisplayLabel in interface FieldAppearenceGuiConf
Parameters:
member - the member
displayLabel - boolean indicating wether to display the label

setDisplayLabel

public void setDisplayLabel(String itemName,
                            boolean displayLabel)
Description copied from interface: ClassAppearenceGuiConf
Wether to display a label containing the name of the field in views.

Specified by:
setDisplayLabel in interface ClassAppearenceGuiConf
Parameters:
itemName - the name of the class
displayLabel - boolean indicating wether to display the label or not

setViewableItems

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

Specified by:
setViewableItems in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
viewable - wether items are viewable
See Also:
FieldAppearenceGuiConf.setViewableItems(CollectionItem,String,boolean)

setViewableItems

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

Specified by:
setViewableItems in interface FieldAppearenceGuiConf
Parameters:
collection - the collection
viewName - the view to configure
viewable - wether items have a view button
See Also:
FieldAppearenceGuiConf.setViewableItems(CollectionItem,boolean)

setEnableLinks

public void setEnableLinks(CollectionItem collection,
                           String viewName,
                           boolean enable)
Description copied from interface: FieldAppearenceGuiConf
Enables or disables links for references in cells of a table

Specified by:
setEnableLinks in interface FieldAppearenceGuiConf

setEnableLinks

public void setEnableLinks(ClassItem cli,
                           String viewName,
                           boolean enable)

setCellViewType

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

Specified by:
setCellViewType in interface FieldAppearenceGuiConf
Parameters:
collection - the collection to configure
viewName - the view to configure
field - the column to configure
viewType - the view type to use for that column
See Also:
GuiConf.setViewConstructor(String,String,AbstractMethodItem)

getDefaultValue

public static Object getDefaultValue(FieldItem field,
                                     String value)
Converts the a String into an object for the value of a field

Parameters:
field - the field for which to convert the value
value - the string to convert
Returns:
an object of the type of the field whose string representation is value, or null.

getDefaultConfigs

public String[] getDefaultConfigs()
Description copied from class: AspectComponent
Returns defaults configuration files that must be loaded before the user's configuration

Overrides:
getDefaultConfigs in class AspectComponent

setNavBar

public void setNavBar(String gui,
                      CollectionItem collection)
Description copied from interface: GuiConf
Enables navigation bar for a collection.

Navigation bar is a set of buttons (previous element, next element, remove element) used to navigate in a collection

Specified by:
setNavBar in interface GuiConf
Parameters:
gui - the gui
collection - the collection

hasSetNavBar

public static boolean hasSetNavBar(CustomizedGUI gui,
                                   CollectionItem coll)

addViewFieldDependency

public void addViewFieldDependency(ClassItem cl,
                                   String fieldName)
Description copied from interface: BehaviorGuiConf
Specify that the object views of instances of a class depend on the value of a field. That is, these views must be refreshed whenever the value of that field changes.

Specified by:
addViewFieldDependency in interface BehaviorGuiConf
Parameters:
cl - the class
fieldName - the field name

setInteractionHandler

public void setInteractionHandler(MethodItem method,
                                  MethodItem handler)
Description copied from interface: BehaviorGuiConf
Sets a method to be used to handler user interaction when a method is called, instead of the standard "ask for parameters stuffs".

Specified by:
setInteractionHandler in interface BehaviorGuiConf
Parameters:
method -
handler - It should be a static method taking as arguments (Interaction,DisplayContext)

getInteractionHandler

public static MethodItem getInteractionHandler(AbstractMethodItem method)

getDependentFields

public static Collection getDependentFields(ClassItem cli)
Returns the fields the views a class depend on.

Parameters:
cli - the class
Returns:
a collection of FieldItem
See Also:
addViewFieldDependency(ClassItem,String)

setDialogTimeout

public void setDialogTimeout(long timeout)
Description copied from interface: GuiConf
Sets the delay before a dialog times out. Dialogs only time out on the web GUI, to avoid locking threads on the server for ever.

Specified by:
setDialogTimeout in interface GuiConf
Parameters:
timeout - the timeout delay in milliseconds

setLabelAdd

public void setLabelAdd(String label)
Specified by:
setLabelAdd in interface GuiConf

getLabelAdd

public static String getLabelAdd()

setLabelNew

public void setLabelNew(String label)
Specified by:
setLabelNew in interface GuiConf

getLabelNew

public static String getLabelNew()

setLabelCancel

public void setLabelCancel(String label)
Specified by:
setLabelCancel in interface GuiConf

getLabelCancel

public static String getLabelCancel()

setLabelOK

public void setLabelOK(String label)
Specified by:
setLabelOK in interface GuiConf

getLabelOK

public static String getLabelOK()

setLabelClose

public void setLabelClose(String label)

getLabelClose

public static String getLabelClose()

setLabelNone

public void setLabelNone(String label)
Specified by:
setLabelNone in interface GuiConf

getLabelNone

public static String getLabelNone()

setLabelAll

public void setLabelAll(String label)
Specified by:
setLabelAll in interface GuiConf

getLabelAll

public static String getLabelAll()

selectWithIndexedField

public void selectWithIndexedField(ClassItem cl,
                                   CollectionItem collection,
                                   String repositoryName)
Description copied from interface: ClassAppearenceGuiConf
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.

Specified by:
selectWithIndexedField in interface ClassAppearenceGuiConf
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)

setIndexNotFoundHandler

public void setIndexNotFoundHandler(ClassItem cl,
                                    MethodItem handler)
Description copied from interface: BehaviorGuiConf
Defines a method to be called when an object referred to by it's indexed field is not found.

Specified by:
setIndexNotFoundHandler in interface BehaviorGuiConf
Parameters:
cl - the class of which the instance is not found
handler - the method to be called. It must be a static method taking 2 parameters: a ClassItem, which is the class of the object which could not be found, and an Object which is the value of the indexed field. And it should return an Object, which if not null will used as the found object.
See Also:
ClassAppearenceGuiConf.selectWithIndexedField(ClassItem,CollectionItem,String)

getRepository

public static Object getRepository(ClassItem cl)
Gets the repository object of a class

Parameters:
cl - the class
See Also:
selectWithIndexedField(ClassItem,CollectionItem,String)

setEncoding

public void setEncoding(String encoding)
Description copied from interface: GuiConf
Sets the default charset encoding to use when interaction with the user's terminal. Defaults to "UTF-8". Used by the WEB diplay.

Specified by:
setEncoding in interface GuiConf
Parameters:
encoding - the charset encoding
See Also:
Charset

getEncoding

public static String getEncoding()