anl.aida.palette
Class ColorMapTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by anl.aida.palette.ColorMapTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class ColorMapTableModel
extends javax.swing.table.AbstractTableModel

Version:
$Revision$ $Date$
See Also:
Serialized Form

Field Summary
private static java.lang.Class<?>[] CLASSES
           
private  boolean edit
           
private  ColorMap map
           
private static java.lang.String[] NAMES
           
private static long serialVersionUID
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ColorMapTableModel()
           
 
Method Summary
 ColorMap getColorMap()
           
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
          Returns a default name for the column using spreadsheet conventions: A, B, C, ...
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns false.
 void resetColorMap(ColorMap map)
           
 void resetPalette(Palette palette)
           
 void resetPaletteType(ColorMap.PaletteType paletteType)
           
 void setIntervalEditEnabled(boolean val)
           
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
          This empty implementation is provided so users don't have to implement this method if their data model is not editable.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

map

private ColorMap map

CLASSES

private static final java.lang.Class<?>[] CLASSES

NAMES

private static final java.lang.String[] NAMES

edit

private boolean edit
Constructor Detail

ColorMapTableModel

public ColorMapTableModel()
Method Detail

resetColorMap

public void resetColorMap(ColorMap map)

resetPaletteType

public void resetPaletteType(ColorMap.PaletteType paletteType)

resetPalette

public void resetPalette(Palette palette)

getColorMap

public ColorMap getColorMap()

getColumnName

public java.lang.String getColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. If column cannot be found, returns an empty string.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - the column being queried
Returns:
a string containing the default name of column

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Returns false. This is the default implementation for all cells.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel
Parameters:
rowIndex - the row being queried
columnIndex - the column being queried
Returns:
false

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
This empty implementation is provided so users don't have to implement this method if their data model is not editable.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
Parameters:
aValue - value to assign to cell
rowIndex - row of cell
columnIndex - column of cell

setIntervalEditEnabled

public void setIntervalEditEnabled(boolean val)