Package noaa.coastwatch.gui
Class SatellitePassTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
noaa.coastwatch.gui.SatellitePassTableModel
- All Implemented Interfaces:
Serializable
,TableModel
The satellite pass table model contains satellite pass data as
a Swing table model.
- Since:
- 3.1.3
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionCreates a new pass table model with empty data.SatellitePassTableModel
(String protocol, String host, String path) Creates a new pass table model based on data from the specified server. -
Method Summary
Modifier and TypeMethodDescriptionint
getColumnName
(int index) getPass
(int index) Gets the pass at the specified index.int
getPassIndex
(String passID) Gets the pass index from the specified pass identifier.int
getValueAt
(int row, int column) void
setSortColumn
(int column) Sets a new column for table sorting.void
Sets the model to read data from a new data source.void
update()
Updates the pass table by contacting the server for a pass list.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
SatellitePassTableModel
public SatellitePassTableModel()Creates a new pass table model with empty data. ThesetSource()
method should be called prior to performing any data updates. -
SatellitePassTableModel
Creates a new pass table model based on data from the specified server.- Parameters:
protocol
- the communication protocol.host
- the server host.path
- the query script path.- See Also:
-
-
Method Details
-
setSource
Sets the model to read data from a new data source. The current table model entries are cleared.- Parameters:
protocol
- the communication protocol.host
- the server host.path
- the query script path.
-
getRowCount
public int getRowCount() -
getColumnCount
public int getColumnCount() -
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
getPass
Gets the pass at the specified index. -
getPassIndex
Gets the pass index from the specified pass identifier.- Parameters:
passID
- the pass identifier.- Returns:
- the pass index, or -1 if not found.
-
getValueAt
-
update
public void update()Updates the pass table by contacting the server for a pass list. This method always returns immediately and the server query is performed asynchronously. If there is currently an update running, no operation is performed. -
setSortColumn
public void setSortColumn(int column) Sets a new column for table sorting.- Parameters:
column
- the new column to sort on.
-