HiRISE

HiRISE.HiPlan.HOGG
Class LUT_Selector_Table_Model

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

public class LUT_Selector_Table_Model
extends AbstractTableModel

A table model for displaying results from a LUT_Selector_Dialog.

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

Field Summary
static String[] COLUMN_NAMES
          Column names.
static String ID
          Class identification name with source code version and date.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
LUT_Selector_Table_Model()
          Creates an empty table model.
LUT_Selector_Table_Model(Parameter lut_selector_data)
          Creates a table model with the indicated LUT Selector data.
 
Method Summary
 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.
 Parameter table_data()
          Gets the table data backing the table model.
 void table_data(Parameter lut_selector_data)
          Sets the table data backing the table model.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
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.

Constructor Detail

LUT_Selector_Table_Model

public LUT_Selector_Table_Model(Parameter lut_selector_data)
Creates a table model with the indicated LUT Selector data.

Parameters:
lut_selector_data - the results returned from the LUT_Selector_Dialog's LUT_Selector_Dialog.showDialog(java.awt.Component, java.lang.String, PIRL.PVL.Parameter, boolean[]) methods.

LUT_Selector_Table_Model

public LUT_Selector_Table_Model()
Creates an empty table model.

Method Detail

table_data

public Parameter table_data()
Gets the table data backing the table model. These data are in the same format as those returned by the LUT_Selector_Dialog's LUT_Selector_Dialog.showDialog(java.awt.Component, java.lang.String, PIRL.PVL.Parameter, boolean[]) method.

Returns:
the LUT Selector data.

table_data

public void table_data(Parameter lut_selector_data)
Sets the table data backing the table model. These data are assumed to be in the same format as those returned by the LUT_Selector_Dialog's LUT_Selector_Dialog.showDialog(java.awt.Component, java.lang.String, PIRL.PVL.Parameter, boolean[]) method.

Parameters:
lut_selector_data - the LUT Selector data.

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.

HiRISE

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