|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
javax.swing.table.DefaultTableModel
jsky.catalog.MemoryCatalog
jsky.catalog.astrocat.AstroCatTable
public class AstroCatTable
Used to read and write Skycat style tab separated catalog data and manage the rows and columns in memory. This class extends the MemoryCatalog class, which supports searching and working with a JTable widget.
Field Summary |
---|
Fields inherited from class jsky.catalog.MemoryCatalog |
---|
DEC_COL, EQUINOX, ID_COL, RA_COL, SYMBOL, X_COL, Y_COL |
Fields inherited from class javax.swing.table.DefaultTableModel |
---|
columnIdentifiers, dataVector |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Fields inherited from interface jsky.catalog.Catalog |
---|
ARCHIVE, CATALOG, DIRECTORY, IMAGE_SERVER, LOCAL, NAME_SERVER |
Constructor Summary | |
---|---|
protected |
AstroCatTable()
Construct a new AstroCatTable with no header or data (For use only by derived classes). |
|
AstroCatTable(AstroCatalog catalog,
java.io.InputStream in)
Initialize the table from the given stream. |
|
AstroCatTable(AstroCatalog catalog,
java.io.InputStream in,
int maxRows)
Initialize the table from the given stream by reading up to maxRows of the data. |
|
AstroCatTable(AstroCatalog catalog,
java.io.InputStream in,
QueryArgs queryArgs)
Initialize the table from the given stream by reading up to maxRows of the data. |
|
AstroCatTable(AstroCatalog catalog,
java.lang.String filename)
Initialize the table from the given file. |
|
AstroCatTable(java.lang.String filename)
Initialize the table from the given file |
Method Summary | |
---|---|
Catalog |
getCatalog()
Return the catalog used to create this table, or a dummy, generated catalog object, if not known. |
static void |
main(java.lang.String[] args)
Test cases |
protected MemoryCatalog |
makeQueryResult(FieldDesc[] fields,
java.util.Vector dataRows)
Return a new MemoryCatalog with the given column fields and data rows. |
Methods inherited from class javax.swing.table.DefaultTableModel |
---|
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt |
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 |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jsky.catalog.TableQueryResult |
---|
getDataVector |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getColumnCount, getRowCount, getValueAt, removeTableModelListener, setValueAt |
Constructor Detail |
---|
public AstroCatTable(AstroCatalog catalog, java.io.InputStream in, int maxRows) throws java.io.IOException
catalog
- the catalog where the data originated, if knownin
- the stream to read the catalog data frommaxRows
- the maximum number of data rows to read
java.io.IOException
public AstroCatTable(AstroCatalog catalog, java.io.InputStream in, QueryArgs queryArgs) throws java.io.IOException
catalog
- the catalog where the data originated, if knownin
- the stream to read the catalog data fromqueryArgs
- represents the arguments to the query that resulted in this table
java.io.IOException
public AstroCatTable(AstroCatalog catalog, java.io.InputStream in) throws java.io.IOException
catalog
- the catalog where the data originated, if knownin
- the stream to read the catalog data from
java.io.IOException
public AstroCatTable(AstroCatalog catalog, java.lang.String filename) throws java.io.IOException
catalog
- the catalog where the data originated, if knownfilename
- the name of the catalog file
java.io.IOException
public AstroCatTable(java.lang.String filename) throws java.io.IOException
filename
- the name of the catalog file
java.io.IOException
protected AstroCatTable()
Method Detail |
---|
public Catalog getCatalog()
getCatalog
in interface TableQueryResult
getCatalog
in class MemoryCatalog
protected MemoryCatalog makeQueryResult(FieldDesc[] fields, java.util.Vector dataRows)
makeQueryResult
in class MemoryCatalog
fields
- an array of objects describing the table columnsdataRows
- a vector of data rows, each of which is a vector of column values.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |