edu.wisc.ssec.mcidasv.control
Class MultiSpectralControl.ProbeTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.wisc.ssec.mcidasv.control.MultiSpectralControl.ProbeTableModel
All Implemented Interfaces:
ProbeListener, Serializable, EventListener, TableModel
Enclosing class:
MultiSpectralControl

private static class MultiSpectralControl.ProbeTableModel
extends AbstractTableModel
implements ProbeListener


Field Summary
private static String[] COLUMNS
           
private  MultiSpectralControl control
           
private  Map<Integer,MultiSpectralControl.Spectrum> indexToSpectrum
           
private  Map<ReadoutProbe,Integer> probeToIndex
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
MultiSpectralControl.ProbeTableModel(MultiSpectralControl control, List<MultiSpectralControl.Spectrum> probes)
           
 
Method Summary
private static String formatPosition(double position)
           
 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 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)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMNS

private static final String[] COLUMNS

probeToIndex

private final Map<ReadoutProbe,Integer> probeToIndex

indexToSpectrum

private final Map<Integer,MultiSpectralControl.Spectrum> indexToSpectrum

control

private final MultiSpectralControl control
Constructor Detail

MultiSpectralControl.ProbeTableModel

public MultiSpectralControl.ProbeTableModel(MultiSpectralControl control,
                                            List<MultiSpectralControl.Spectrum> probes)
Method Detail

probeColorChanged

public void probeColorChanged(ProbeEvent<Color> e)
Description copied from interface: ProbeListener
Invoked when a probe's color has changed.

Specified by:
probeColorChanged in interface ProbeListener
Parameters:
e - Describes the probe that changed, its old color, and its new color.

probeVisibilityChanged

public void probeVisibilityChanged(ProbeEvent<Boolean> e)
Description copied from interface: ProbeListener
Invoked when a probe's visibility has changed.

Specified by:
probeVisibilityChanged in interface ProbeListener
Parameters:
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.

probePositionChanged

public void probePositionChanged(ProbeEvent<RealTuple> e)
Description copied from interface: ProbeListener
Invoked when a probe's position is changed.

Specified by:
probePositionChanged in interface ProbeListener
Parameters:
e - Describes the probe that moved, its old position, and its new position.

updateWith

public void updateWith(List<MultiSpectralControl.Spectrum> updatedSpectra)

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getValueAt

public Object getValueAt(int row,
                         int column)
Specified by:
getValueAt in interface TableModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

moveRow

public void moveRow(int origin,
                    int destination)

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class<?> getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

formatPosition

private static String formatPosition(double position)