public class SsrStateTableModel
extends javax.swing.table.AbstractTableModel
enumeration
of its columns.
Values for raw
and framed
partition allocations are used for
reporting the percent raw and percent framed values in the table.
Modifier and Type | Class and Description |
---|---|
static class |
SsrStateTableModel.Column
An enumeration of the table model's columns.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
Constructor and Description |
---|
SsrStateTableModel()
Creates a new SSR state table model with an empty list of SSR states and
default values for the raw and framed partition allocations.
|
SsrStateTableModel(java.util.List<SsrState> records,
double rawPartitionMegabits,
double framedPartitionMegabits)
Creates a new SSR state table model from a list of SSR states and raw and
framed partition allocations.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getColumnClass(int col)
Gets the class of the indicated column.
|
int |
getColumnCount()
Gets the total number of columns in this table model.
|
java.lang.String |
getColumnName(int col)
Gets the name of the indicated column.
|
double |
getFramedPartitionMegabits()
Gets the current value of this table model's framed partition allocation in
base-2 megabits.
|
double |
getRawPartitionMegabits()
Gets the current value of this table model's raw partition allocation in
base-2 megabits.
|
SsrState |
getRecord(int row)
Gets the data record for the indicated model row.
|
java.util.List<SsrState> |
getRecords()
Gets a copy of this table model's SSR state records.
|
int |
getRowCount()
Gets the total number of rows in this table model.
|
java.lang.Object |
getValueAt(int row,
int col)
Gets the value for the cell at the indicated row and column.
|
void |
setFramedPartitionMegabits(double framedPartitionMegabits)
Sets the value of this table model's framed partition allocation in base-2
megabits.
|
void |
setRawPartitionMegabits(double rawPartitionMegabits)
Sets the value of this table model's raw partition allocation in base-2
megabits.
|
void |
setRecords(java.util.List<SsrState> records)
Replaces this table model's current list of records with a new list.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public static final java.lang.String ID
public SsrStateTableModel(java.util.List<SsrState> records, double rawPartitionMegabits, double framedPartitionMegabits)
percent
raw
and percent framed
).
The list of records may be null, in which case the model is empty.
records
- the list of SSR state records for the new table model; may
be null.rawPartitionMegabits
- the number of base-2 megabits allocated to
the raw partition for this model's SSR states.framedPartitionMegabits
- the number of base-2 megabits allocated to
the framed partition for this model's SSR states.public SsrStateTableModel()
public void setRecords(java.util.List<SsrState> records)
This method invokes the model's fireTableDataChanged()
method.
records
- the new list of SSR states; may be null.public java.util.List<SsrState> getRecords()
public double getRawPartitionMegabits()
public void setRawPartitionMegabits(double rawPartitionMegabits)
This method invokes the model's fireTableDataChanged()
method.
rawPartitionMegabits
- the new value for the raw partition
allocation.public double getFramedPartitionMegabits()
public void setFramedPartitionMegabits(double framedPartitionMegabits)
This method invokes the model's fireTableDataChanged()
method.
framedPartitionMegabits
- the new value for the framed partition
allocation.public int getRowCount()
public int getColumnCount()
SsrStateTableModel.Column
enumeration.public java.lang.Object getValueAt(int row, int col)
getColumnClass(int)
method.row
- the table model row index.col
- the table model column index.public java.lang.Class getColumnClass(int col)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
col
- the table model column index.public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- the table model column index.public SsrState getRecord(int row)
row
- the model row.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona