ARoad0.Gui1
Class CollectionPropertyEditor

java.lang.Object
  extended by ARoad0.Gui1.SimplePropertyEditor
      extended by ARoad0.Gui1.CollectionPropertyEditor
All Implemented Interfaces:
AddRemoveBaseObjectListener, CommonPropertyEditor, NewBaseObjectListener, SelectionDialogListener, MVC_Controller, MVC_View, java.awt.event.ActionListener, java.beans.PropertyChangeListener, java.beans.PropertyEditor, java.util.EventListener

public class CollectionPropertyEditor
extends SimplePropertyEditor
implements AddRemoveBaseObjectListener

This class is responsible for displaying and editing, by the mean of panels, one property of a gBase BaseObject for which the type is an array, a map or a collection.

It completes SimplePropertyEditor, which handles simple types, RightMapPropertyEditor for StringRight maps and StringRightPropertyEditor for unmodifiable String maps. It is not overridden. valueOf() is the only factory method to build up an instance. It is possible to get a reusable empty instance.

getCustomEditor() is used to display the property editor. The updating is done through a setValue() or an adding method. setAsText() throws an exception, and getAsText() returns a null value. This class handles the reading method, and for the updatings, it tries the 'ChoiceMethodForNew', first, 'add' and 'remove' methods, second, then the set method for the property. This class is returned by the XXXBeanInfo classes in gBase, in their property descriptors. It is used by Gui1.BeamerManager.addPropertyEditor(). The possible property types are String[], BaseObject[], ImmutableName[], StringRight[], java.util.Collection and java.util.Map, where the values of the Map or the Collection are BaseObjects, DetailledNames, Strings or Names. There are functionnal restrictions when the type is a Collection:

- StringRight is a forbidden type for the values,

and there are also functionnal restrictions with Map:

- only BaseObject is allowed as type for the values,

- the map is not displayed; only the values are,

- the 'add/select' and 'remove/delete' buttons are not workable.

When the type is String, it cannot use the remove method, only the write one. When the type is a subclass of BaseObject without being a DetailledName, the displayed list contains the names of the BaseObjects. This class extends the SimplePropertyEditor class which handles the types Boolean, String, ARoad0.gBase.ImmutableName and ARoad0.gBase.BaseObject. This class listens actions in two cases:

- from a JButton in the JComponent when the user enters data,

- from gBase objects (typically the source) when the program updates the property, through a PropertyChangeEvent about all the property or only ONE element.

To allow the user updating to make changes in the data base, this class instance edits the base object, then these changes are fired to the class instance to update the JComponent in the GUI. If the new value is an array or a collection, the GUI shows always the true data in the base. Otherwise, the new value is an array or a collection item, and the GUI is updated whitout any call to the base.

After an user click on a button in the JComponent, the sequence of calls is:

- actionPerformed() from the JButton,

- addElements(), addOneStringElement(), addRestrictedStringElements() or removeElements(), which calls to the data base object,

- propertyChange() from the object,

- updating of the JList in the JComponent.

After an InvocationTargetException, this class does not restore the true value in the editor. As a PropertyEditor, it registers PropertyChangeListeners but this is not recommanded so far - use rather registration on gBase PropertyChangeListeners.

See Also:
SimplePropertyEditor, StringMapPropertyEditor

Field Summary
protected  java.lang.reflect.Method addMethod_
          The add method if it exists, for the property.
static CollectionPropertyEditor EMPTY_INSTANCE
          A reusable empty instance for initialization, to avoid the use of 'new' for temporary values.
(package private)  javax.swing.DefaultListModel listModel_
          The listModel_ of ImmutableNames for BaseObjects not being DetailledName, or Strings otherwise, in the JList which displays the collection
protected  int maxSize_
          The maximal size which is allowed for this collection.
protected  boolean propertyIsArray_
          True if the property is an array, false if it is a collection or a map
protected  java.lang.Class propertyTypeInGroup_
          When the property type is a Collection or a Map, propertyTypeInGroup_ is set following the 'valueTypeInGroup' value in the BeanInfo.
protected  java.lang.reflect.Method removeMethod_
          The remove method if it exists, for the property If it is non null, the writeMethod in 'super' may be still non null.
protected  javax.swing.JScrollPane scrollPane_
          the scrollpane of the list
 
Fields inherited from class ARoad0.Gui1.SimplePropertyEditor
boundComponent_, displayName_, EMPTY_OBJECT, INITIAL_CAPACITY, isRestrictedArgument_, listeners_, propertyDescriptor_, propertyType_, readMethod_, source_, sourceBeanInfo_, writeMethod_
 
Fields inherited from interface ARoad0.Gui1.CommonPropertyEditor
BOOLEAN_FIELD_DIMENSION, BOOLEAN_NAME_DIMENSION, BUTTON_DIMENSION, BUTTON_DIMENSION_2, BUTTON_DIMENSION_3, COLOMN_DIMENSION, COMBOBOX_FIELD_DIMENSION, EMPTY_FIELD_DIMENSION, HEIGHT_DIMENSION, INT_EMPTY_FIELD_DIMENSION, INT_FIELD_DIMENSION, LIST_HEIGHT_DIMENSION, LIST_WIDTH_DIMENSION, MAP_NAME_WIDTH_DIMENSION, NAME_DIMENSION, NAME_MAP_DIMENSION, NAME_WIDTH_DIMENSION, NAME_WIDTH_DIMENSION_2, NO_BUTTON_FIELD_DIMENSION, NO_BUTTON_WIDTH_DIMENSION, ONE_BUTTON_FIELD_DIMENSION, THREE_BUTTONS_FIELD_DIMENSION, TWO_BUTTONS_FIELD_DIMENSION
 
Constructor Summary
CollectionPropertyEditor()
          Constructor for using only through the super.valueOf() method and EMPTY_INSTANCE.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent _evt)
          Manages the events fired by the buttons 'See', 'New', 'Select', 'Remove', 'Delete', 'Previous' in the JPanel displayed in the beamer.
private  void addElement()
          Called by actionPerformed() when the user clicks on the button 'New'.
 void addOneBaseObject(java.lang.Object[] _l_obj)
          Called by BaseObjectHandler for addElement(), to add a BaseObject by the mean of the calling to a specific method on the right instance in the data base.
private  void addOneStringOrNameElements()
          Called by addElement() when the user clicks on the button 'New' for adding one String or a Name value for a BaseObject.
private  void addRestrictedStringElements(java.lang.String[] _l_ACSlimitedValues)
          This method displays to the user a list of allowed values which are not still selected.
 void finalizeForProcess()
          Finalize the instance; the call is reserved to BeamerManager.
 java.lang.String getAsText()
          Gets the property value as a string suitable for presentation to a human to edit.
private  javax.swing.JPanel getCollectionEditor()
          This is the main method of this class, which gets the array, collection or map editor with the property name and the relevant buttons.
 java.awt.Component getCustomEditor()
          Makes a full custom JPanel that edits the property value.
 java.awt.Dimension getPreferedSizeForEditing()
          Get the prefered size for the rectangle into which the value is displayed, in the component returned by getCustomEditor().
 java.lang.String[] getTags()
          Overridden method.
 java.lang.Object getValue()
          Gets the true values of the property, from the gBase instance, through the property descriptor in the relevant BeanInfo class.
 void handleNewBaseObject(java.lang.Object _obj)
          Called by BaseObjectHandler for addElement(), when there is a new BaseObject instance which has been created by BaseObjectHandler, and which has to be added to the collection property.
 void handleSelectionDialog(java.util.Map _validatedObjectsSetMap)
          Called by DialogBox.showExplorerSelectionDialog() for actionPerformed(), when the property is a Collection, a Map or an array, and the property type is a BaseObject which has to be selected in the explorer through the button 'Select'.
private  void handleSelectionUpdate(java.util.List _list)
          Called by handleSelectionDialog() for actionPerformed() and directly by actionPerformed() for restricted values, when the property is a Collection, a Map or an array, and the property type is a BaseObject which has to be selected in the explorer through the button 'Select'.
private  void initializeListModel()
          Called by getCollectionEditor() and getCustomEditor() to initialize the list model.
 void propertyChange(java.beans.PropertyChangeEvent _evt)
          Manages the events fired by the base object source_ displayed in the beamer, if it is a bound property and when the property value has changed.
private  void removeElements(java.lang.Object[] _l_objectsToRemove, java.lang.String _type)
          This method calls the remove/delete method of the property.
 void removeOneBaseObject(java.lang.Object[] _l_obj)
          NO USE.
(package private)  void removeWithSpecificMethod(BaseObject _objectToRemove)
          Removes a BaseObject when writeMethod_ and finalizeForUser() do not exist.
 void setAsText(java.lang.String _text)
          Sets the property value by parsing a given String.
 void setValue(java.lang.Object _value)
          Set the object in the base through the write method.
private  boolean setValueControl(java.lang.Object _value)
          Called by setValue() to control the parameter and the global variables.
 java.lang.String toString()
          Get the values of variables for the instance.
static CommonPropertyEditor valueOf(BaseObject _source, java.beans.PropertyDescriptor _propertyDescriptor)
          Factory method to use when a CollectionPropertyEditor is delegating to us.
private  void viewElement()
          Called by actionPerformed() when the user clicks on the button 'See'.
 
Methods inherited from class ARoad0.Gui1.SimplePropertyEditor
addPropertyChangeListener, getButtonsDisplaying, getDisplayName, getJavaInitializationString, getKnownValuesForNewElement, getNameFromDetailledName, getPropertyDescriptor, getPropertyType, getRestrictedValues, getSource, getWriteMethod, handleNewBaseObject, isPaintable, paintValue, removePropertyChangeListener, setListPanelDimension, setVerticalButtonsInEditor, supportsCustomEditor, viewOneElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ARoad0.Gui1.AddRemoveBaseObjectListener
getSource
 
Methods inherited from interface ARoad0.Gui1.NewBaseObjectListener
handleNewBaseObject
 

Field Detail

listModel_

javax.swing.DefaultListModel listModel_
The listModel_ of ImmutableNames for BaseObjects not being DetailledName, or Strings otherwise, in the JList which displays the collection


propertyIsArray_

protected boolean propertyIsArray_
True if the property is an array, false if it is a collection or a map


propertyTypeInGroup_

protected java.lang.Class propertyTypeInGroup_
When the property type is a Collection or a Map, propertyTypeInGroup_ is set following the 'valueTypeInGroup' value in the BeanInfo. Otherwise, it is set with the type of the elements in the array. It does not replace propertyType_ which gives the true type of the property, that is array, List, Set or Map.


scrollPane_

protected javax.swing.JScrollPane scrollPane_
the scrollpane of the list


addMethod_

protected java.lang.reflect.Method addMethod_
The add method if it exists, for the property. If it is non null, the writeMethod in 'super' may be still non null.


removeMethod_

protected java.lang.reflect.Method removeMethod_
The remove method if it exists, for the property If it is non null, the writeMethod in 'super' may be still non null.


maxSize_

protected int maxSize_
The maximal size which is allowed for this collection. No use in BeanInfo so far.


EMPTY_INSTANCE

public static final CollectionPropertyEditor EMPTY_INSTANCE
A reusable empty instance for initialization, to avoid the use of 'new' for temporary values. Caution: never change the state of the returned instance.

Constructor Detail

CollectionPropertyEditor

CollectionPropertyEditor()
Constructor for using only through the super.valueOf() method and EMPTY_INSTANCE.

Method Detail

valueOf

public static CommonPropertyEditor valueOf(BaseObject _source,
                                           java.beans.PropertyDescriptor _propertyDescriptor)
                                    throws java.lang.NullPointerException,
                                           ProcessError
Factory method to use when a CollectionPropertyEditor is delegating to us. It constructs the read, write, add and remove methods for the property, if they exist, from the BeanInfo informations. The property must be an array, a collection or a map. Overridden method. Calls the super class valueOf method. The remove method is selected only if there is only one method with the right name, and without argument. Called by BeamerManager.addPropertyEditor() and initializeDeleteButton(). Calls BeamerManager.getElementaryPropertyType().

Parameters:
_source - owning the property.
_propertyDescriptor - is the descriptor of the property
Returns:
a CollectionPropertyEditor instance
Throws:
java.lang.NullPointerException - if _source or _displayName is null
ProcessError - if BeanInfo and PropertyDecriptor calls fail

getValue

public java.lang.Object getValue()
Gets the true values of the property, from the gBase instance, through the property descriptor in the relevant BeanInfo class. Caution: does not return ImmutableNames for BaseObjects. Returns also the true objects when propertyTypeInGroup_ is a DetailledName. Creates a ProcessError without thrown it, if there is an exception fired by java.lang.reflect.Method.invoke(). Overriddes the super method.

Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class SimplePropertyEditor
Returns:
the value of the property in an ArrayList (also true if an array), a HashMap, a TreeSet, a TreeMap. Is an empty HashSet if there is no read method.

getAsText

public java.lang.String getAsText()
Gets the property value as a string suitable for presentation to a human to edit. Return null. Overridden method.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class SimplePropertyEditor
Returns:
null

setAsText

public void setAsText(java.lang.String _text)
               throws java.lang.IllegalArgumentException
Sets the property value by parsing a given String. Raise java.lang.IllegalArgumentException, because this kind of property can't be expressed as text. Overridden method.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class SimplePropertyEditor
Parameters:
_text - The string to be parsed.
Throws:
java.lang.IllegalArgumentException

setValue

public void setValue(java.lang.Object _value)
Set the object in the base through the write method. No action if the write method is unknown. No update of the JComponent, since the object fires an event to propertyChange() when it is changed. No operation if the value Class is not a java.util.Collection, when the property type is an array or a Collection, or if the value Class is not a Map, when Map is the property type, or if there is no write method, or a value that has not the right type, or if the invocation to the write method fires an exception - then, a ProcessError is created but not thrown, since the method signature does not allow it. Called by handleSelectionUpdate() and, for the button "Prev.", by actionPerformed(). Overriddes the super method.

Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class SimplePropertyEditor
Parameters:
_value - The java.util.Collection or Map to be edited. This object is not modified by the PropertyEditor.

getTags

public java.lang.String[] getTags()
Overridden method.

Specified by:
getTags in interface java.beans.PropertyEditor
Overrides:
getTags in class SimplePropertyEditor
Returns:
null.

getCustomEditor

public java.awt.Component getCustomEditor()
Makes a full custom JPanel that edits the property value. A null or empty collection produces an empty panel. The possible property types are Object[], java.util.Collection, java.util.Map. Calls getCollectionEditor().

Specified by:
getCustomEditor in interface CommonPropertyEditor
Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Overrides:
getCustomEditor in class SimplePropertyEditor
Returns:
a JPanel that will allow an user to directly edit the current property value.
See Also:
PropertyEditor.getCustomEditor()

getPreferedSizeForEditing

public java.awt.Dimension getPreferedSizeForEditing()
Get the prefered size for the rectangle into which the value is displayed, in the component returned by getCustomEditor(). Overridden method.

Specified by:
getPreferedSizeForEditing in interface CommonPropertyEditor
Overrides:
getPreferedSizeForEditing in class SimplePropertyEditor
Returns:
the prefered size.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent _evt)
Manages the events fired by the buttons 'See', 'New', 'Select', 'Remove', 'Delete', 'Previous' in the JPanel displayed in the beamer. These buttons are returned by getCustomEditor(). The bound component fires no event. The 'Previous' button adds the values of the previous list in the beamer, if any, to the current values. Overridden method.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class SimplePropertyEditor
Parameters:
_evt - is the event fired by a JComboBox, a JCheckBox, a JTextField or a JButton class

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent _evt)
Manages the events fired by the base object source_ displayed in the beamer, if it is a bound property and when the property value has changed. Handles changes on all the collection, map and array, as a total change or only for one item if the value in _evt is a single item. This is the single method that updates the value this property editor displays. When the property is a map, the map values are displayed, and not the map keys. The main behavior is that the old and new property values in the argument may be ridden to update the values. This is not like StringRightMapEditor. A DetailledName is displayed through its detailled name, and the PreviousDetailledName interface is also tested to find the item to remove. Synchronized on listModel_. By default, the displayed list is sorted using the default sorting of the list. The PropertyDescriptor value 'withoutListSorting' is used to forbid the sorting. Overrides the super method.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class SimplePropertyEditor
Parameters:
_evt - with a new value which may be the new property value (collection or array), and then the old value is not used, OR, when the change is about only one element in the collection, map or the array, it may be only ONE value to add or to remove in the collection or the array.

addOneBaseObject

public void addOneBaseObject(java.lang.Object[] _l_obj)
                      throws ProcessError
Called by BaseObjectHandler for addElement(), to add a BaseObject by the mean of the calling to a specific method on the right instance in the data base. On the contrary of handleNewBaseObject(), the object is not already created when this method is called, and this method makes the job with a call to the addMethod_. The adding produces a backing call to propertyChange().

Specified by:
addOneBaseObject in interface AddRemoveBaseObjectListener
Parameters:
_l_obj - is the BaseObject instance arguments to use when the 'add' method is invoked
Throws:
ProcessError - if an InvocationTargetException is thrown

removeOneBaseObject

public void removeOneBaseObject(java.lang.Object[] _l_obj)
                         throws ProcessError
NO USE. Called by BaseObjectHandler for actionPerformed(), to remove a BaseObject in calling a specific method.

Specified by:
removeOneBaseObject in interface AddRemoveBaseObjectListener
Parameters:
_l_obj - is the BaseObject instance arguments to use when the 'remove' method is invoked. May be null.
Throws:
ProcessError - if an InvocationTargetException is thrown

toString

public java.lang.String toString()
Get the values of variables for the instance.

Overrides:
toString in class SimplePropertyEditor
Returns:
source, propertyName and listeners (if they have toString() methods).

handleSelectionDialog

public void handleSelectionDialog(java.util.Map _validatedObjectsSetMap)
Called by DialogBox.showExplorerSelectionDialog() for actionPerformed(), when the property is a Collection, a Map or an array, and the property type is a BaseObject which has to be selected in the explorer through the button 'Select'. Call handleSelectionUpdate(). Caution: it is an overridden method.

Specified by:
handleSelectionDialog in interface SelectionDialogListener
Overrides:
handleSelectionDialog in class SimplePropertyEditor
Parameters:
_validatedObjectsSetMap - with one element, where - the key is propertyTypeInGroup_, - the value is a List of one selected object. May be null or empty if the user cancels the operation.

handleNewBaseObject

public void handleNewBaseObject(java.lang.Object _obj)
Called by BaseObjectHandler for addElement(), when there is a new BaseObject instance which has been created by BaseObjectHandler, and which has to be added to the collection property. No operation since the new object creation fires an exception. No control of maxSize_ and value, since it is not an object selection in the explorer. See addOneBaseObject() when this class creates the new object, and BaseObjectHandler is just the arguments producer. Overriddes the super method. Caution: the name of _obj may has been changed by gBase at its creation.

Parameters:
_obj - is the BaseObject instance to add to this collection

finalizeForProcess

public void finalizeForProcess()
Finalize the instance; the call is reserved to BeamerManager. Overridden method.

Specified by:
finalizeForProcess in interface CommonPropertyEditor
Overrides:
finalizeForProcess in class SimplePropertyEditor

setValueControl

private boolean setValueControl(java.lang.Object _value)
Called by setValue() to control the parameter and the global variables.

Parameters:
_value - is the parameter of the method setValue()
Returns:
true if all is ok

addElement

private void addElement()
Called by actionPerformed() when the user clicks on the button 'New'. For a String or a BaseObject to add (not a DetailledName), calls addOneStringOrNameElements(), or a dialog box displays a special frame to edit all the arguments of one new BaseObject.

Otherwise, the key 'choiceMethodForNew' is used to try to call a specific adding method from the BeanInfo class for the property, typically to create a Resource or an Eligible Party through the call of an gDMak.Action class.

If such a method does not exist, the key 'addMethod' is tested in the BeanInfo class for the property, to try to get the adding method.

If none of these tests gets any result, the BaseObject constructor is called.

In the two last cases (with an 'addMethod' or a constructor method), the BaseObjectHandler class is used to let the user enters the properties of the new BaseObject, and then to call the relevant method or contructor. Defined arguments may be set in the BeanInfo class for the property.

Stops all the actions on the beamer buttons until the ending of the method. No action and error message if there is no open ACS which manages AclEntries, for the creation of such an object.

Uses SimplePropertyEditor.getKnownValuesForNewElement() to get the defined arguments to use.


addOneStringOrNameElements

private void addOneStringOrNameElements()
Called by addElement() when the user clicks on the button 'New' for adding one String or a Name value for a BaseObject. A dialog box allows to enter the value, and a selection is displayed when the allowed values are limited. No action if it is a null value, a known value, or with a size superior to 200. Manages the restricted values, if any, in calling super.getRestrictedValues() then addRestrictedStringElements(). Calls DialogBox.showSingleEditor().


addRestrictedStringElements

private void addRestrictedStringElements(java.lang.String[] _l_ACSlimitedValues)
This method displays to the user a list of allowed values which are not still selected. Called by addOneStringOrNameElement() for a String value where a restricted set of values is defined in the source ACS or in the BeanInfo class. To select the allowed values, the order is: - applies the source ACS restrictions to the proposed values, if any, - if not, applies then the BeanInfo restrictions to the proposed values, - removes the restricted values which are already selected. A dialog box allows to select only one value. A message informs the user when an entered value is not allowed.

Parameters:
_l_ACSlimitedValues - is the array of the allowed values. Never null.

removeElements

private void removeElements(java.lang.Object[] _l_objectsToRemove,
                            java.lang.String _type)
This method calls the remove/delete method of the property. Called by actionPerformed() when the user clicks on the button 'Remove' or 'Delete'. Removes all the elements the user has selected in the list. Called directly by BeamerManager.initializeDeleteButton(). There are two cases:

1 - Uses the removing method if it exists. In this case, in the property descriptor, 'removeMethod' defines the removing method for the property. If 'removeMethod' is finalizeForUser() and _type is 'delete', it is used there to delete. Else, the removing method is a specific one which is returned by the property descriptor.

2 - otherwise, uses the writing method to update the collection with no direct use of finalizeForUser() on each element. Then, it is more general.

Caution: for Strings, the removing method cannot be used.

Parameters:
_l_objectsToRemove - is the list of Strings or ImmutableNames selected in the JList to be removed or deleted.
_type - 'remove' for removing, or 'delete' for deleting

removeWithSpecificMethod

void removeWithSpecificMethod(BaseObject _objectToRemove)
                        throws java.lang.ClassNotFoundException,
                               java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException,
                               java.lang.InstantiationException
Removes a BaseObject when writeMethod_ and finalizeForUser() do not exist. Called by removeElements() and by BeamerManager.initializeDeleteButton(). In the property descriptor, "removeMethod" defines: the 'remove' method for the property, and "removeArgumentsFromName", if it is non-null, defines the class and the method to call to get the right removing arguments from the object name. If "removeArgumentsFromName" is null, the remove method is invoked with the object to remove as single argument. For example, for removing an AclEntry, there is: - propertyDescriptor.setValue("removeMethod", "removeAclEntry"); - propertyDescriptor.setValue("removeArgumentsFromName", new Object[] {"AclEntryImpl", "getKeyReferencesFromName", new Integer(0), new Integer(1), new Integer(3), new Integer(4)} ); The first returned array defines the name of the remove method. It allows this instance to call the remove method of the property. Following the KeyPropertiesInName pattern, in the property descriptor, 'removeArgumentsFromName' defines : how to find the right arguments for the 'remove' method of the property, when the name of the object to remove is known, and finalizeForUser() does not exist. The returned array defines: - the name of the class to call, at the index 0 - the name of the static method to call, at the index 1, with the name of the object to remove as argument, and with an Object[] array as returned value - in the Object[] array returned as value by the static method, the sequence of index where are the n arguments to use in the remove method, in the correct order, if they do exist. Otherwise, the argument is null. These elements allow this method to call the remove method of the property.

Parameters:
_objectToRemove - is the object to remove which is associated to a specific remove method. No operation if this object has not the right property type.
Throws:
thrown - by Method.invoke(): ClassNotFoundException, IllegalAccessException, InvocationTargetException, InstantiationException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.InstantiationException

viewElement

private void viewElement()
Called by actionPerformed() when the user clicks on the button 'See'. This method selects a BaseObject in the explorer, and then it is displayed in the beamer. This method cannot handle a Collection of StringRights, but it works with an array of StringRights. Calls super.viewOneElement().


getCollectionEditor

private javax.swing.JPanel getCollectionEditor()
This is the main method of this class, which gets the array, collection or map editor with the property name and the relevant buttons. The possible property types are Object[], java.util.Collection or Map. Each call creates a new independant editor that has this instance as an action listener for updating the property. Calls getButtonsDisplaying(), initializeListModel().

Returns:
the panel

initializeListModel

private void initializeListModel()
Called by getCollectionEditor() and getCustomEditor() to initialize the list model. Does not control the size. Processes, in the order, the arrays, the collections and the maps having as items some BaseObjects, DetailledNames, Strings or ImmutableNames. If the read method returns null, sets an empty list.


handleSelectionUpdate

private void handleSelectionUpdate(java.util.List _list)
Called by handleSelectionDialog() for actionPerformed() and directly by actionPerformed() for restricted values, when the property is a Collection, a Map or an array, and the property type is a BaseObject which has to be selected in the explorer through the button 'Select'. Uses the 'add' method or the write method, in this order. Controls the collection size and if the new value is already known. Caution: it is an overridden method.

Parameters:
_list - contains the new selected objects