org.keridwen.modelling.global.parameters.ui
Class TableBasedGlobalParameterEditor

java.lang.Object
  extended by org.keridwen.modelling.global.parameters.ui.TableBasedGlobalParameterEditor
All Implemented Interfaces:
ActionListener, EventListener

public class TableBasedGlobalParameterEditor
extends Object
implements ActionListener

Table based GlobalParameters Editor

Author:
J.Forest, Artenum SARL

Field Summary
static String ADD_ROW
           
static String EXPORT_XLS
           
static String IMPORT_XLS
           
static String OK_ACTION
           
static String REMOVE_ROW
           
 
Constructor Summary
TableBasedGlobalParameterEditor()
          Basic constructor.
TableBasedGlobalParameterEditor(GlobalParametersList parameterList)
          Default constructor and set the editor according the given global parameters list.
 
Method Summary
 void actionPerformed(ActionEvent evt)
           
 void addActionListener(ActionListener listener)
          Add the given ActionListener to all active buttons and combo-boxes.
 void addActionListenerToEscapeButton(ActionListener listener)
          Add a specific ActionListener to the Escape button.
 void addActionListenerToOKButton(ActionListener listener)
          Add a specific ActionListener to the OK button.
 void addRow()
           
 void changeVerbosityLevel(GlobalParameter.VerbosityLevel level)
           
protected  ImageIcon createImageIcon(String path)
          Returns an ImageIcon, or null if the path was invalid.
 JPanel getBottomControlPanel()
           
 JPanel getMainPanel()
          Get the main panel of the editor.
 GlobalParametersList getOutputParameterList()
          Get the output list of GlobalParameter list.
 ArrayList<ParameterTableManager> getTableManagerList()
           
 JToolBar getToolBar()
          Return the tool bar of the editor.
 void initGUI()
          Initialize the GUI of the editor.
 void removeSelectedRow()
           
 void setInputParametersList(GlobalParametersList parameterList)
          Update the model of the editor according the given of parameters list.
 GlobalParametersList updateOutputParameterList()
          Recover the data from the tables and update the output parameters list.
 void updateUI()
          Update the view of the editor.
 
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

ADD_ROW

public static final String ADD_ROW
See Also:
Constant Field Values

REMOVE_ROW

public static final String REMOVE_ROW
See Also:
Constant Field Values

IMPORT_XLS

public static final String IMPORT_XLS
See Also:
Constant Field Values

EXPORT_XLS

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

TableBasedGlobalParameterEditor

public TableBasedGlobalParameterEditor()
Basic constructor.


TableBasedGlobalParameterEditor

public TableBasedGlobalParameterEditor(GlobalParametersList parameterList)
Default constructor and set the editor according the given global parameters list.

Parameters:
parameterList - - input list of global parameters.
Method Detail

setInputParametersList

public void setInputParametersList(GlobalParametersList parameterList)
Update the model of the editor according the given of parameters list. The editor should instanciated before (of course...) using one of the constructors, like TableBasedGlobalParameterEditor.

To update the view of editor, the methode updateUI should be called after.

Parameters:
parameterList - - input list of global parameters.

updateUI

public void updateUI()
Update the view of the editor.


initGUI

public void initGUI()
Initialize the GUI of the editor.


getMainPanel

public JPanel getMainPanel()
Get the main panel of the editor.

Returns:
The main panel of the editor.

getToolBar

public JToolBar getToolBar()
Return the tool bar of the editor.

Returns:
The tool bar of the editor.

getBottomControlPanel

public JPanel getBottomControlPanel()

actionPerformed

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

changeVerbosityLevel

public void changeVerbosityLevel(GlobalParameter.VerbosityLevel level)

addRow

public void addRow()

removeSelectedRow

public void removeSelectedRow()

updateOutputParameterList

public GlobalParametersList updateOutputParameterList()
Recover the data from the tables and update the output parameters list.


addActionListener

public void addActionListener(ActionListener listener)
Add the given ActionListener to all active buttons and combo-boxes.

Parameters:
listener -

addActionListenerToOKButton

public void addActionListenerToOKButton(ActionListener listener)
Add a specific ActionListener to the OK button.


addActionListenerToEscapeButton

public void addActionListenerToEscapeButton(ActionListener listener)
Add a specific ActionListener to the Escape button.


getOutputParameterList

public GlobalParametersList getOutputParameterList()
Get the output list of GlobalParameter list.

Returns:

createImageIcon

protected ImageIcon createImageIcon(String path)
Returns an ImageIcon, or null if the path was invalid.


getTableManagerList

public ArrayList<ParameterTableManager> getTableManagerList()


Copyright © 2012-2013 Artenum. All Rights Reserved.