Class HealthMonitorGui.TMIGate

java.lang.Object
javax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.HealthMonitorGui.TMIGate
All Implemented Interfaces:
Serializable, TableModel, HealthMonitorGui.MonitoredStationGettingModel, MonitoredStationListener
Enclosing class:
HealthMonitorGui

public static class HealthMonitorGui.TMIGate extends AbstractTableModel implements MonitoredStationListener, HealthMonitorGui.MonitoredStationGettingModel
TableModel reporting the most recent time an I-gate or digipeater has apparently performed its duty as an I-gate or digipeater.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Field Details

  • Constructor Details

    • TMIGate

      public TMIGate()
      Create an Igate/digipeater status table model.
  • Method Details

    • getColumnCount

      public int getColumnCount()
      Returns the number of columns in the model.
      Specified by:
      getColumnCount in interface TableModel
      Returns:
      the number of columns in the model
      See Also:
    • getColumnClass

      public Class<?> getColumnClass(int columnIndex)
      Returns the data Class for the specified column.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      columnIndex - the column being queried
      Returns:
      the Class object for the column's data
    • getColumnName

      public String getColumnName(int column)
      Returns the localized name for the column.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      column - the column being queried
      Returns:
      a string containing the name of column
    • getStation

      public MonitoredStation getStation(int rowIndex)
      Get the station associated with the specified row.
      Specified by:
      getStation in interface HealthMonitorGui.MonitoredStationGettingModel
      Parameters:
      rowIndex - the zero-based row index for the desired station
      Returns:
      MonitoredStation at the specified row
    • stationAdded

      public void stationAdded(int index, MonitoredStation station)
      Tell the listener that a new station has been added to the MonitoredStationList.
      Specified by:
      stationAdded in interface MonitoredStationListener
      Parameters:
      index - int zero-based position in the list where the station has been added
      station - MonitoredStation object to add
    • stationUpdated

      public void stationUpdated(int index, MonitoredStation station)
      Tell the listener that data about a MonitoredStation has changed.
      Specified by:
      stationUpdated in interface MonitoredStationListener
      Parameters:
      index - zero-based index of the station in the MonitoredStationList
      station - MonitoredStation whose data has been updated
    • stationRemoved

      public void stationRemoved(int index, MonitoredStation station)
      Tell the listener that a station is no longer being monitored.
      Specified by:
      stationRemoved in interface MonitoredStationListener
      Parameters:
      index - int zero-based position in the MonitoredStationList where the station used to be
      station - MonitoredStation being removed
    • getRowCount

      public int getRowCount()
      Get the number of rows in the table model (effectively, the number of monitored stations).
      Specified by:
      getRowCount in interface TableModel
      Returns:
      number of monitored stations
    • getValueAt

      public Object getValueAt(int rowIndex, int columnIndex)
      Get the display value for the specified table cell.
      Specified by:
      getValueAt in interface TableModel
      Parameters:
      rowIndex - zero-based row number
      columnIndex - zero-based column number
      Returns:
      value to display
    • close

      public void close()
      Shut down the asynchronous update listeners in this table model.