Package org.jfree.ui.about
Class LibraryTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.jfree.ui.about.LibraryTableModel
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.table.TableModel
public class LibraryTableModel extends javax.swing.table.AbstractTableModelA table model containing a list of libraries used in a project.Used in the LibraryPanel class.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringinfoColumnLabelLocalised info column label.private Library[]librariesStorage for the libraries.private java.lang.StringlicenceColumnLabelLocalised licence column label.private java.lang.StringnameColumnLabelLocalised name column label.private java.lang.StringversionColumnLabelLocalised version column label.
-
Constructor Summary
Constructors Constructor Description LibraryTableModel(java.util.List libraries)Constructs a LibraryTableModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnCount()Returns the number of columns in the table model.java.lang.StringgetColumnName(int column)Returns the name of a column in the table model.Library[]getLibraries()Returns an array of the libraries in the table.intgetRowCount()Returns the number of rows in the table model.java.lang.ObjectgetValueAt(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
-
-
-
-
Field Detail
-
libraries
private Library[] libraries
Storage for the libraries.
-
nameColumnLabel
private java.lang.String nameColumnLabel
Localised name column label.
-
versionColumnLabel
private java.lang.String versionColumnLabel
Localised version column label.
-
licenceColumnLabel
private java.lang.String licenceColumnLabel
Localised licence column label.
-
infoColumnLabel
private java.lang.String infoColumnLabel
Localised info column label.
-
-
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:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein classjavax.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.
-
getLibraries
public Library[] getLibraries()
Returns an array of the libraries in the table.- Returns:
- An array of libraries.
-
-