public abstract class MonitorTable extends AbstractTableModel implements Updatable
| Modifier and Type | Class and Description |
|---|---|
static class |
MonitorTable.Event |
static interface |
MonitorTable.Listener |
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<ArrayList<MonitorCell>> |
cells |
protected MonitorTable.Event |
CELLS_EVENT |
static List<MonitorField> |
DEFAULT_COMPACT_FIELDS
Default list of fields to be displayed by monitoring tables in compact mode.
|
static List<MonitorField> |
DEFAULT_FIELDS
Default list of fields to be displayed by monitoring tables in full mode.
|
static MonitorFormat |
DEFAULT_FORMAT
Stateless default
MonitorFormat instance. |
protected MonitorFormat |
format |
protected MonitorTable.Listener |
listener |
protected int |
nColumns |
protected int |
nRows |
protected MonitorTable.Event |
TABLE_EVENT |
listenerList| Modifier | Constructor and Description |
|---|---|
protected |
MonitorTable()
Empty default constructor.
|
protected |
MonitorTable(MonitorCell[][] cells)
Constructs the table with the specified content.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Called when the table is discarded.
|
protected void |
fireChangeEvent(MonitorTable.Event.Reason reason) |
protected void |
fireChangeEvent(MonitorTable.Event event) |
protected List<int[]> |
getCells(ChannelHandle item,
MonitorField field)
Returns indices of all cells whose content is affected by the specified item and field.
|
int |
getColumnCount() |
int |
getRowCount() |
JTable |
getTable() |
FormattedValue |
getValueAt(int row,
int column) |
boolean |
isCellEditable(int row,
int column) |
protected JTable |
makeTable() |
void |
restore(Serializable storageBean)
Restores this table to the state described by the provided object, to the extent possible.
|
Serializable |
save()
Returns JavaBean that contains data required to restore this table to its current state.
|
void |
setFormat(MonitorFormat format)
Sets the formatter to be used by this table.
|
void |
setListener(MonitorTable.Listener listener) |
void |
setValueAt(Object aValue,
int row,
int column) |
boolean |
showHeader() |
protected void |
tableMouseClicked(MouseEvent evt) |
static List<MonitorField> |
trimAbsentFields(List<MonitorField> fields,
Collection<ChannelHandle> channels,
Collection<MonitorField> exclude) |
void |
update(ChannelHandle channelHandle)
Updates this component.
|
void |
update(ChannelHandle item,
List<MonitorField> fields)
Updates this component.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAffectedFieldspublic static final MonitorFormat DEFAULT_FORMAT
MonitorFormat instance.public static final List<MonitorField> DEFAULT_FIELDS
public static final List<MonitorField> DEFAULT_COMPACT_FIELDS
protected int nRows
protected int nColumns
protected ArrayList<ArrayList<MonitorCell>> cells
protected MonitorFormat format
protected MonitorTable.Listener listener
protected final MonitorTable.Event CELLS_EVENT
protected final MonitorTable.Event TABLE_EVENT
protected MonitorTable()
protected MonitorTable(MonitorCell[][] cells)
public void destroy()
public void setFormat(MonitorFormat format)
format - Formatter.public int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic FormattedValue getValueAt(int row, int column)
getValueAt in interface TableModelpublic boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic void setValueAt(Object aValue, int row, int column)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic void update(ChannelHandle item, List<MonitorField> fields)
UpdatableUpdatable.update(ChannelHandle).public void update(ChannelHandle channelHandle)
Updatableprotected List<int[]> getCells(ChannelHandle item, MonitorField field)
item - ChannelHandle.field - Field. If null, all cells affected by the specified item are included.public void setListener(MonitorTable.Listener listener)
protected void fireChangeEvent(MonitorTable.Event.Reason reason)
protected void fireChangeEvent(MonitorTable.Event event)
public JTable getTable()
protected JTable makeTable()
protected void tableMouseClicked(MouseEvent evt)
public boolean showHeader()
public static List<MonitorField> trimAbsentFields(List<MonitorField> fields, Collection<ChannelHandle> channels, Collection<MonitorField> exclude)
public Serializable save()
null, subclasses should override
if they need to support saving/restoring their state.public void restore(Serializable storageBean)
storageBean - JavaBean that contains data describing the state of this table.Copyright © 2018 LSST. All rights reserved.