/[svn]/jsampler/trunk/src/org/jsampler/view/ParameterTableModel.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/ParameterTableModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 910 by iliev, Mon Oct 10 16:03:12 2005 UTC revision 911 by iliev, Mon Aug 7 18:25:58 2006 UTC
# Line 64  import org.linuxsampler.lscp.StringListP Line 64  import org.linuxsampler.lscp.StringListP
64    
65    
66  /**  /**
67   *   * A tabular data model for representing LSCP parameters.
68     * @see ParameterTable
69   * @author Grigor Iliev   * @author Grigor Iliev
70   */   */
71  public class ParameterTableModel extends AbstractTableModel {  public class ParameterTableModel extends AbstractTableModel {
72          public final static int PARAMETER_NAME_COLUMN = 0;          public final static int PARAMETER_NAME_COLUMN = 0;
73          public final static int PARAMETER_VALUE_COLUMN = 1;          public final static int PARAMETER_VALUE_COLUMN = 1;
74                    
75          Parameter[] parameters;          private Parameter[] parameters;
76                    
77          private final BooleanCellRenderer booleanRenderer = new BooleanCellRenderer();          private final BooleanCellRenderer booleanRenderer = new BooleanCellRenderer();
78          private final BooleanCellEditor booleanEditor = new BooleanCellEditor();          private final BooleanCellEditor booleanEditor = new BooleanCellEditor();
# Line 151  public class ParameterTableModel extends Line 152  public class ParameterTableModel extends
152          public Parameter          public Parameter
153          getParameter(int row) { return parameters[row]; }          getParameter(int row) { return parameters[row]; }
154                    
155            /**
156             * Returns an appropriate renderer for the cell specified by
157             * <code>row</code> and <code>column</code>.
158             * @param row The row of the cell to render, where 0 is the first row.
159             * @param column The column of the cell to render, where 0 is the first column.
160             */
161          public TableCellRenderer          public TableCellRenderer
162          getCellRenderer(int row, int column) {          getCellRenderer(int row, int column) {
163                  if(column != PARAMETER_VALUE_COLUMN) return null;                  if(column != PARAMETER_VALUE_COLUMN) return null;
# Line 165  public class ParameterTableModel extends Line 172  public class ParameterTableModel extends
172                  return null;                  return null;
173          }          }
174                    
175            /**
176             * Returns an appropriate editor for the cell specified by
177             * <code>row</code> and <code>column</code>.
178             * @param row The row of the cell to edit, where 0 is the first row.
179             * @param column The column of the cell to edit, where 0 is the first column.
180             */
181          public TableCellEditor          public TableCellEditor
182          getCellEditor(int row, int column) {          getCellEditor(int row, int column) {
183                  if(column != PARAMETER_VALUE_COLUMN) return null;                  if(column != PARAMETER_VALUE_COLUMN) return null;
# Line 258  public class ParameterTableModel extends Line 271  public class ParameterTableModel extends
271          }          }
272                    
273          /**          /**
274           * Sets the value in the cell at <code>columnIndex</code>           * Sets the value in the cell at <code>col</code>
275           * and <code>rowIndex</code> to <code>value</code>.           * and <code>row</code> to <code>value</code>.
276           */           */
277          public void          public void
278          setValueAt(Object value, int row, int col) {          setValueAt(Object value, int row, int col) {
# Line 272  public class ParameterTableModel extends Line 285  public class ParameterTableModel extends
285                    
286          /**          /**
287           * Returns <code>true</code> if the cell at           * Returns <code>true</code> if the cell at
288           * <code>rowIndex</code> and <code>columnIndex</code> is editable.           * <code>row</code> and <code>col</code> is editable.
289           */           */
290          public boolean          public boolean
291          isCellEditable(int row, int col) {          isCellEditable(int row, int col) {

Legend:
Removed from v.910  
changed lines
  Added in v.911

  ViewVC Help
Powered by ViewVC