lima.visualisation
Class DistributionServer.MapTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--lima.visualisation.DistributionServer.MapTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Enclosing class:
DistributionServer

public class DistributionServer.MapTableModel
extends javax.swing.table.AbstractTableModel

A map-based table model.

See Also:
Serialized Form

Nested Class Summary
 class DistributionServer.MapTableModel.KeyNotFoundException
          An exception indicating that no row exists with the specified key.
 class DistributionServer.MapTableModel.TableIndexOutOfBoundsException
          An exception indicating that a specified table index is not within the table bounds.
 
Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
DistributionServer.MapTableModel(java.lang.String[] columnNames, java.lang.Class[] columnTypes)
          Construct a new map-based table model.
 
Method Summary
 boolean containsRow(java.lang.Comparable rowKey)
          Determine if a row exists that corresponds to the specified key.
 int getColumnCount()
          Obtain a count of the columns.
 java.lang.String getColumnName(int columnIndex)
          Obtain a column name.
 java.lang.Object[] getRow(java.lang.Comparable rowKey)
          Get a row specified by its key.
 int getRowCount()
          Obtain a count of the rows.
 java.lang.Object getValue(java.lang.Comparable rowKey, int columnIndex)
          Get the value of a cell specified by its row key and column index.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Get the value of a cell specified by its row index and column index.
 boolean isCellEditable(int rowIndex, int columnIndex)
          Indicate that cells within this table model are not editable.
 void setRow(java.lang.Comparable rowKey, java.lang.Object[] row)
          Set a row specified by its key.
 void setValue(java.lang.Comparable rowKey, int columnIndex, java.lang.Object value)
          Set the value of a cell specified by its row key and column index.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributionServer.MapTableModel

public DistributionServer.MapTableModel(java.lang.String[] columnNames,
                                        java.lang.Class[] columnTypes)
Construct a new map-based table model.

Method Detail

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Indicate that cells within this table model are not editable.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()
Obtain a count of the columns.


getRowCount

public int getRowCount()
Obtain a count of the rows.


getColumnName

public java.lang.String getColumnName(int columnIndex)
Obtain a column name.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Get the value of a cell specified by its row index and column index.


getValue

public java.lang.Object getValue(java.lang.Comparable rowKey,
                                 int columnIndex)
Get the value of a cell specified by its row key and column index.


setValue

public void setValue(java.lang.Comparable rowKey,
                     int columnIndex,
                     java.lang.Object value)
Set the value of a cell specified by its row key and column index.


containsRow

public boolean containsRow(java.lang.Comparable rowKey)
Determine if a row exists that corresponds to the specified key.


getRow

public java.lang.Object[] getRow(java.lang.Comparable rowKey)
Get a row specified by its key.


setRow

public void setRow(java.lang.Comparable rowKey,
                   java.lang.Object[] row)
Set a row specified by its key.