|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteap.fits.FitsData
eap.fits.FitsTableData
This abstract class represents the data in either a FITS ASCII table or a FITS BINTABLE. The data implement the Swing TableModel interface, so they can be accessed in a way natural to Java. In particular, an object of this class may be displayed in a JTable component. Rows and columns are numbered starting at zero, as is natural in Java. People used to the FORTRAN convention of numbering from "1" used in the FITS files themselves may need to be careful.
| Field Summary |
| Fields inherited from class eap.fits.FitsData |
data, interpreter, isComplete, PADDING, setter, valid_bytes |
| Constructor Summary | |
FitsTableData(FitsHeader header)
Create a table object, reading the column information from the given header |
|
| Method Summary | |
void |
addTableModelListener(TableModelListener l)
add a listener to the table which will be alerted when the table changes |
int |
findColumn(String name)
returns the column number for a given column name, or -1 if there is no such column in the table. |
protected void |
fireTableModelEvent(int row,
int col)
send a TableModelEvent to all the listeners that a given cell has changed. |
protected void |
fireTableModelEvent(TableModelEvent e)
send a TableModelEvent to all the listeners. |
FitsColumn |
getColumn(int col)
returns the column object for a given column number. |
Class |
getColumnClass(int col)
returns the Java class of the data in a column |
int |
getColumnCount()
returns the number of columns in the table |
String |
getColumnName(int col)
returns the name of a given column. |
int |
getRowCount()
returns the number of rows in the table |
protected void |
goToElement(int row,
FitsColumn column)
reposition the reader to read the given table element |
boolean |
isCellEditable(int row,
int col)
always returns true. |
void |
removeTableModelListener(TableModelListener l)
remove a listener from the table. |
| Methods inherited from class eap.fits.FitsData |
available, blockCount, createFrom, data, goToByte, incrementValidBytes, isComplete, setValidBytes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.table.TableModel |
getValueAt, setValueAt |
| Constructor Detail |
public FitsTableData(FitsHeader header)
throws FitsException
header - the HDU header used to extract column information
FitsException - if the FITS format is incorrect.| Method Detail |
public FitsColumn getColumn(int col)
col - the column number - the first column is numbered "0", despite
the fact that it is numbered "1" in the FITS file itself.
protected void goToElement(int row,
FitsColumn column)
row - the desired row of the column, with the first row numbered "0".column - the column object corresponding to the desired column.public void addTableModelListener(TableModelListener l)
addTableModelListener in interface TableModell - the listener to addpublic void removeTableModelListener(TableModelListener l)
removeTableModelListener in interface TableModell - the listener to removeprotected void fireTableModelEvent(TableModelEvent e)
protected void fireTableModelEvent(int row,
int col)
row - - the row which has changed. The first row is "0".col - - the columns wich has changed. The first columns is "0".public Class getColumnClass(int col)
getColumnClass in interface TableModelcol - - the index of the desired column.
The first column is numbered "0"public int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int col)
getColumn(int) to get the column object and then
FitsColumn.getName().
getColumnName in interface TableModelcol - the desired column. The first column is numbered "0".
public int findColumn(String name)
name - the undecorated name of the desired column
public int getRowCount()
getRowCount in interface TableModel
public boolean isCellEditable(int row,
int col)
isCellEditable in interface TableModelrow - the row number counting from zero.col - the column number counting from zero.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||