HiRISE

HiRISE.HiPlan.HOGG
Class CCD_Parameters_Table_Model

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by HiRISE.HiPlan.HOGG.CCD_Parameters_Table_Model
All Implemented Interfaces:
Serializable, TableModel

public class CCD_Parameters_Table_Model
extends AbstractTableModel

A table model for displaying CCD parameters.

Version:
2.4
Author:
Christian Schaller - UA/PIRL
See Also:
Serialized Form

Field Summary
static String[] COLUMN_NAMES
          Column names.
static Class[] COLUMN_TYPES
          Column types.
static String ID
          Class identification name with source code version and date.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
CCD_Parameters_Table_Model()
          Creates an empty table model.
 
Method Summary
 boolean ccd_active(int ccd)
           
 void ccd_active(int ccd, boolean active)
           
 Class getColumnClass(int column_index)
          Gets the specific superclass for all the cell values in the column.
 int getColumnCount()
          Gets the number of columns in the table model.
 String getColumnName(int column_index)
          Gets the name of the column at column_index.
 int getRowCount()
          Gets the number of rows in the table model.
 Object getValueAt(int row_index, int column_index)
          Returns the value for the cell at column_index and row_index.
 boolean isCellEditable(int row_index, int column_index)
          Determines if a given table cell is editable.
 void setValueAt(Object value, int row_index, int column_index)
          Sets the value of the table data cell.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

COLUMN_NAMES

public static final String[] COLUMN_NAMES
Column names.


COLUMN_TYPES

public static final Class[] COLUMN_TYPES
Column types.

Constructor Detail

CCD_Parameters_Table_Model

public CCD_Parameters_Table_Model()
Creates an empty table model.

Method Detail

ccd_active

public boolean ccd_active(int ccd)

ccd_active

public void ccd_active(int ccd,
                       boolean active)

getRowCount

public int getRowCount()
Gets the number of rows in the table model. The number of rows corresponds to the number of CCDs for which LUT data have been specified.

Returns:
the number of rows in the model.

getColumnCount

public int getColumnCount()
Gets the number of columns in the table model. There are always four columns in the model: the CCD name, the LUT type, the first LUT parameter, and the second LUT parameter.

Returns:
the number of columsn in the model: 4.

getValueAt

public Object getValueAt(int row_index,
                         int column_index)
Returns the value for the cell at column_index and row_index.

Parameters:
row_index - the row whose value is to be queried.
column_index - the column whose value is to be queried.
Returns:
the value Object at the specified cell; null if the indicies are not valid.

getColumnClass

public Class getColumnClass(int column_index)
Gets the specific superclass for all the cell values in the column. The first two columns are Strings. The remaining columns are Integers.

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
column_index - the index of the column.
Returns:
the common ancestor class of the object values in the model.

getColumnName

public String getColumnName(int column_index)
Gets the name of the column at column_index.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
Parameters:
column_index - the index of the column.
Returns:
the name of the column.

isCellEditable

public boolean isCellEditable(int row_index,
                              int column_index)
Determines if a given table cell is editable.

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel
Parameters:
row_index - the row of the cell in question.
column_index - the column of the cell in question.
Returns:
true if the cell is editable; false otherwise.

setValueAt

public void setValueAt(Object value,
                       int row_index,
                       int column_index)
Sets the value of the table data cell.

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel
Parameters:
value - the new value for the cell.
row_index - the row of the cell in question.
column_index - the column of the cell in question.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona