com.jrefinery.ui.about
Class LibraryTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jrefinery.ui.about.LibraryTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class LibraryTableModel
extends javax.swing.table.AbstractTableModel

A table model containing a list of libraries used in a project. Used in the LibraryReferencePanel class.

See Also:
Serialized Form

Field Summary
protected  java.lang.String infoColumnLabel
          Localised info column label.
protected  java.util.List libraries
          Storage for the libraries.
protected  java.lang.String licenceColumnLabel
          Localised licence column label.
protected  java.lang.String nameColumnLabel
          Localised name column label.
protected  java.lang.String versionColumnLabel
          Localised version column label.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
LibraryTableModel(java.util.List libraries)
          Constructs a LibraryTableModel.
 
Method Summary
 int getColumnCount()
          Returns the number of columns in the table model.
 java.lang.String getColumnName(int column)
          Returns the name of a column in the table model.
 int getRowCount()
          Returns the number of rows in the table model.
 java.lang.Object getValueAt(int row, int column)
          Returns the value for a cell in the table model.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

libraries

protected java.util.List libraries
Storage for the libraries.


nameColumnLabel

protected java.lang.String nameColumnLabel
Localised name column label.


versionColumnLabel

protected java.lang.String versionColumnLabel
Localised version column label.


licenceColumnLabel

protected java.lang.String licenceColumnLabel
Localised licence column label.


infoColumnLabel

protected java.lang.String infoColumnLabel
Localised info column label.

Constructor Detail

LibraryTableModel

public LibraryTableModel(java.util.List libraries)
Constructs a LibraryTableModel.

Parameters:
libraries - The libraries.
Method Detail

getRowCount

public int getRowCount()
Returns the number of rows in the table model.

Returns:
The number of rows.

getColumnCount

public int getColumnCount()
Returns the number of columns in the table model. In this case, there are always four columns (name, version, licence and other info).

Returns:
The number of columns in the table model.

getColumnName

public java.lang.String getColumnName(int column)
Returns the name of a column in the table model.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
column - The column index (zero-based).
Returns:
The name of the specified column.

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Returns the value for a cell in the table model.

Parameters:
row - The row index (zero-based).
column - The column index (zero-based).
Returns:
The value.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.