private static class MultiSpectralControl.ProbeTableModel extends AbstractTableModel implements ProbeListener
Modifier and Type | Field and Description |
---|---|
private static String[] |
COLUMNS |
private MultiSpectralControl |
control |
private Map<Integer,MultiSpectralControl.Spectrum> |
indexToSpectrum |
private Map<ReadoutProbe,Integer> |
probeToIndex |
listenerList
Constructor and Description |
---|
ProbeTableModel(MultiSpectralControl control,
List<MultiSpectralControl.Spectrum> probes) |
Modifier and Type | Method and Description |
---|---|
static double |
clamp180(double value) |
static double |
clamp360(double value) |
Class<?> |
getColumnClass(int column) |
int |
getColumnCount() |
String |
getColumnName(int column) |
int |
getRowCount() |
Object |
getValueAt(int row,
int column) |
boolean |
isCellEditable(int row,
int column) |
void |
moveRow(int origin,
int destination) |
void |
probeColorChanged(ProbeEvent<Color> e)
Invoked when a probe's color has changed.
|
void |
probeFormatPatternChanged(ProbeEvent<String> e)
Invoked when a probe's location format pattern has changed.
|
void |
probePositionChanged(ProbeEvent<RealTuple> e)
Invoked when a probe's position is changed.
|
void |
probeVisibilityChanged(ProbeEvent<Boolean> e)
Invoked when a probe's visibility has changed.
|
void |
setValueAt(Object value,
int row,
int column) |
void |
updateWith(List<MultiSpectralControl.Spectrum> updatedSpectra) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
private final Map<ReadoutProbe,Integer> probeToIndex
private final Map<Integer,MultiSpectralControl.Spectrum> indexToSpectrum
private final MultiSpectralControl control
public ProbeTableModel(MultiSpectralControl control, List<MultiSpectralControl.Spectrum> probes)
public void probeColorChanged(ProbeEvent<Color> e)
ProbeListener
probeColorChanged
in interface ProbeListener
e
- Describes the probe that changed, its old color, and its
new color.public void probeVisibilityChanged(ProbeEvent<Boolean> e)
ProbeListener
probeVisibilityChanged
in interface ProbeListener
e
- Describes the probe that changed, its old visibility, and
the new visibility. The previous and current values will always be the
opposites of each other.public void probePositionChanged(ProbeEvent<RealTuple> e)
ProbeListener
probePositionChanged
in interface ProbeListener
e
- Describes the probe that moved, its old position, and its
new position.public void probeFormatPatternChanged(ProbeEvent<String> e)
ProbeListener
probeFormatPatternChanged
in interface ProbeListener
e
- Describes the probe that changed, the old format pattern,
and the probe's new format pattern.public void updateWith(List<MultiSpectralControl.Spectrum> updatedSpectra)
public int getColumnCount()
getColumnCount
in interface TableModel
public int getRowCount()
getRowCount
in interface TableModel
public Object getValueAt(int row, int column)
getValueAt
in interface TableModel
public boolean isCellEditable(int row, int column)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public void setValueAt(Object value, int row, int column)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public void moveRow(int origin, int destination)
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public Class<?> getColumnClass(int column)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public static double clamp180(double value)
public static double clamp360(double value)