Public Member Functions | |
Component | getTableCellEditorComponent (JTable jTable, Object oValue, boolean bIsSelected, int iRow, int iColumn) |
Retrieves the editor for a given cell. | |
void | actionPerformed (ActionEvent e) |
Sets the m_sValue string correctly when a combo box change is fired. | |
Package Functions | |
ParameterCellEditor () | |
Constructor. |
The main features added are support for combo boxes and forcing all other values entered to be numbers.
I put in undo / redo support for individual cells but I'm commenting it out for now. I'm not convinced it's useful, especially since I haven't implemented undo / redo for multi-cell operations (like cut / paste).
Copyright: Copyright (c) Charles D. Canham 2003 Company: Institute of Ecosystem Studies
javawrapper::ParameterCellEditor::ParameterCellEditor | ( | ) | [inline, package] |
Constructor.
Sets up a text field as the default editor unless we say otherwise.
Component javawrapper::ParameterCellEditor::getTableCellEditorComponent | ( | JTable | jTable, | |
Object | oValue, | |||
boolean | bIsSelected, | |||
int | iRow, | |||
int | iColumn | |||
) | [inline] |
Retrieves the editor for a given cell.
If the cell's value starts with "&&", that's the code that it's formatted for a combo box. The format is "&¤t_m_sValue|combo_choice_1,combo_choice_2,combo_choice_n". Otherwise, it gets the default text field.
jTable | The table being edited. | |
oValue | The m_sValue currently in the cell. | |
bIsSelected | Whether or not the cell is selected. | |
iRow | Row number of the cell. | |
iColumn | Column number of the cell. |
void javawrapper::ParameterCellEditor::actionPerformed | ( | ActionEvent | e | ) | [inline] |
Sets the m_sValue string correctly when a combo box change is fired.
e | Action event |