|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.ka2ddo.yaac.gui.TMWeather
public class TMWeather
TableModel reporting the most recent weather information reported by configured weather stations.
| Field Summary | |
|---|---|
static javax.swing.RowFilter<TMWeather,java.lang.Integer> |
FILTER
|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Fields inherited from interface org.ka2ddo.yaac.gui.CommonCustomRendererConstants |
|---|
BRIGHTER_RED, BRIGHTER_TEXT_BACKGROUND, DARK_GREEN, DARKER_MAGENTA, DARKER_RED, MINUTES_30 |
| Constructor Summary | |
|---|---|
TMWeather()
Create a new instance of the weather station monitoring table model. |
|
| Method Summary | |
|---|---|
void |
close()
Shut down the asynchronous update listeners in this table model. |
org.ka2ddo.yaac.gui.TMWeather.StringCellRenderer |
createStringCellRenderer()
|
static java.lang.String |
generateWeatherValue(AX25Message msg,
int columnIndex,
boolean showRawValues)
Produce the displayable text of a weather attribute, |
java.lang.Class<?> |
getColumnClass(int columnIndex)
Get the data type of the values for the specified column, |
int |
getColumnCount()
Get the number of columns defined in this table model. |
java.lang.String |
getColumnName(int column)
Get the title to be displayed for the specified column. |
int |
getRowCount()
Get the number of rows in the table model (effectively, the number of monitored stations). |
MonitoredStation |
getStation(int rowIndex)
Get the station associated with the specified row. |
java.awt.Color[] |
getTableCellColoring(boolean isSelected,
int modelRow,
int column)
Get the foreground and background colors for rendering the values in the specified cell. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Get the display value for the specified table cell. |
AX25Message |
getWeatherMessageAt(int rowIndex,
int nthCopy)
Get the Nth historical weather message for the specified table cell. |
void |
setShowRawValues(boolean showRawValues)
Specify whether the weather values should be displayed as raw APRS or OpenTRAC values, or formatted into human-expected units. |
void |
stationAdded(int index,
MonitoredStation station)
Tell the listener that a new station has been added to the MonitoredStationList. |
void |
stationRemoved(int index,
MonitoredStation station)
Tell the listener that a station is no longer being monitored. |
void |
stationUpdated(int index,
MonitoredStation station)
Tell the listener that data about a MonitoredStation has changed. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final javax.swing.RowFilter<TMWeather,java.lang.Integer> FILTER
| Constructor Detail |
|---|
public TMWeather()
| Method Detail |
|---|
public static java.lang.String generateWeatherValue(AX25Message msg,
int columnIndex,
boolean showRawValues)
msg - AX25Message containing the weather datacolumnIndex - column index according to the layout in the TMWeather table modelshowRawValues - boolean true if the raw numeric values from the APRS or OpenTRAC message
should be displayed, false if the appropriately scaled value should be
displayed in the user-configured units
public int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - zero-based number of the column to query
public java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumn - zero-based number of the column
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelrowIndex - zero-based row numbercolumnIndex - zero-based column number
public AX25Message getWeatherMessageAt(int rowIndex,
int nthCopy)
rowIndex - zero-based row numbernthCopy - how many more-recent weather messages should be skipped to get to the desired record
public void stationAdded(int index,
MonitoredStation station)
stationAdded in interface MonitoredStationListenerindex - int zero-based position in the list where the station has been addedstation - MonitoredStation object to add
public void stationUpdated(int index,
MonitoredStation station)
stationUpdated in interface MonitoredStationListenerindex - zero-based index of the station in the MonitoredStationListstation - MonitoredStation whose data has been updated
public void stationRemoved(int index,
MonitoredStation station)
stationRemoved in interface MonitoredStationListenerindex - int zero-based position in the MonitoredStationList where the station used to bestation - MonitoredStation being removedpublic MonitoredStation getStation(int rowIndex)
getStation in interface HealthMonitorGui.MonitoredStationGettingModelrowIndex - the zero-based row index for the desired station
public void setShowRawValues(boolean showRawValues)
showRawValues - boolean true if weather values should be reported as-is in the protocol messagepublic void close()
public java.awt.Color[] getTableCellColoring(boolean isSelected,
int modelRow,
int column)
isSelected - boolean true if table cell is selectedmodelRow - zero-based row number in the table modelcolumn - zero-based column number in the table model
public org.ka2ddo.yaac.gui.TMWeather.StringCellRenderer createStringCellRenderer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||