Package org.jfree.ui.about
Class LibraryTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.jfree.ui.about.LibraryTableModel
- All Implemented Interfaces:
Serializable
,TableModel
A table model containing a list of libraries used in a project.
Used in the LibraryPanel class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Localised info column label.private Library[]
Storage for the libraries.private String
Localised licence column label.private String
Localised name column label.private String
Localised version column label.Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of columns in the table model.getColumnName
(int column) Returns the name of a column in the table model.Library[]
Returns an array of the libraries in the table.int
Returns the number of rows in the table model.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
-
Field Details
-
libraries
Storage for the libraries. -
nameColumnLabel
Localised name column label. -
versionColumnLabel
Localised version column label. -
licenceColumnLabel
Localised licence column label. -
infoColumnLabel
Localised info column label.
-
-
Constructor Details
-
LibraryTableModel
Constructs a LibraryTableModel.- Parameters:
libraries
- the libraries.
-
-
Method Details
-
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
Returns the name of a column in the table model.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- the column index (zero-based).- Returns:
- the name of the specified column.
-
getValueAt
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
Returns an array of the libraries in the table.- Returns:
- An array of libraries.
-