org.keridwen.modelling.group.editor.ui
Class SelectionPropertyFromCatalogDialogBox

java.lang.Object
  extended by org.keridwen.modelling.group.editor.ui.SelectionPropertyFromCatalogDialogBox
All Implemented Interfaces:
ActionListener, EventListener

public class SelectionPropertyFromCatalogDialogBox
extends Object
implements ActionListener

Provide a graphical selection component for properties loaded from a set of Properties Catalog. A tabbed pane is generated with an Index for each loaded catalog. In each index a combo box of selection (and a description area) list the selectable properties.
The component is modal and should be used like a file chooser. Selected properties are available in a arraylist after the "OK" action has been performed. See getSelectedProperties method.

Author:
J.Forest, Artenum SARL.

Field Summary
static String CANCEL_ACTION
           
static String OK_ACTION
           
 
Constructor Summary
SelectionPropertyFromCatalogDialogBox(HashMap<String,com.artenum.frida.properties.PropertiesList> propertiesCatalog)
          Default constructor.
SelectionPropertyFromCatalogDialogBox(HashMap<String,com.artenum.frida.properties.PropertiesList> propertiesCatalog, JFrame frame, JComponent parent)
          Advanced constructor.
 
Method Summary
 void actionPerformed(ActionEvent evt)
           
 void activeDefaultActionListener()
          Active the default (embedded) action listener.
 com.artenum.frida.interfaces.PropertyInterface getLastSelectedProperty()
          Get the last selected property (i.e from the current catalog).
 ArrayList<com.artenum.frida.interfaces.PropertyInterface> getSelectedProperties()
          Get all selected properties (whatever the current selected catalog) into an ArrayList of PropertyInterface.
 boolean showSelectionDialog()
          Display the dialog box and returns true if the ok button is click or false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK_ACTION

public static final String OK_ACTION
See Also:
Constant Field Values

CANCEL_ACTION

public static final String CANCEL_ACTION
See Also:
Constant Field Values
Constructor Detail

SelectionPropertyFromCatalogDialogBox

public SelectionPropertyFromCatalogDialogBox(HashMap<String,com.artenum.frida.properties.PropertiesList> propertiesCatalog)
Default constructor.

Parameters:
propertiesCatalog -

SelectionPropertyFromCatalogDialogBox

public SelectionPropertyFromCatalogDialogBox(HashMap<String,com.artenum.frida.properties.PropertiesList> propertiesCatalog,
                                             JFrame frame,
                                             JComponent parent)
Advanced constructor.

Parameters:
propertiesCatalog -
frame -
parent -
Method Detail

showSelectionDialog

public boolean showSelectionDialog()
Display the dialog box and returns true if the ok button is click or false otherwise.

Returns:
answer - true if ok button is click or false otherwise.

activeDefaultActionListener

public void activeDefaultActionListener()
Active the default (embedded) action listener. Called by default during the components initialisation.


actionPerformed

public void actionPerformed(ActionEvent evt)
Specified by:
actionPerformed in interface ActionListener

getLastSelectedProperty

public com.artenum.frida.interfaces.PropertyInterface getLastSelectedProperty()
Get the last selected property (i.e from the current catalog).


getSelectedProperties

public ArrayList<com.artenum.frida.interfaces.PropertyInterface> getSelectedProperties()
Get all selected properties (whatever the current selected catalog) into an ArrayList of PropertyInterface.

Returns:
the list of selected properties.


Copyright © 2012-2013 Artenum. All Rights Reserved.