Class SatellitePassTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
noaa.coastwatch.gui.SatellitePassTableModel
All Implemented Interfaces:
Serializable, TableModel

public class SatellitePassTableModel extends AbstractTableModel
The satellite pass table model contains satellite pass data as a Swing table model.
Since:
3.1.3
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • SatellitePassTableModel

      public SatellitePassTableModel()
      Creates a new pass table model with empty data. The setSource() method should be called prior to performing any data updates.
    • SatellitePassTableModel

      public SatellitePassTableModel(String protocol, String host, String path)
      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

      public void setSource(String protocol, String host, String path)
      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

      public String getColumnName(int index)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getPass

      public SatellitePassInfo getPass(int index)
      Gets the pass at the specified index.
    • getPassIndex

      public int getPassIndex(String passID)
      Gets the pass index from the specified pass identifier.
      Parameters:
      passID - the pass identifier.
      Returns:
      the pass index, or -1 if not found.
    • getValueAt

      public Object getValueAt(int row, int column)
    • 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.