Class SystemPropertiesTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
org.jfree.ui.SortableTableModel
org.jfree.ui.about.SystemPropertiesTableModel
- All Implemented Interfaces:
Serializable, TableModel
A sortable table model containing the system properties.
- Author:
- David Gilbert
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classUseful class for holding the name and value of a system property.protected static classA class for comparing SystemProperty objects. -
Field Summary
Fields inherited from class AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new table model using the properties of the current Java Virtual Machine. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of columns in the table model.getColumnName(int column) Returns the name of the specified column.intReturns the number of rows in the table model (that is, the number of system properties).getValueAt(int row, int column) Returns the value at the specified row and column.booleanisSortable(int column) Returns true for the first column, and false otherwise - sorting is only allowed on the first column.voidsortByColumn(int column, boolean ascending) Sorts on the specified column.Methods inherited from class SortableTableModel
getSortingColumn, isAscending, setAscendingMethods inherited from class AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
SystemPropertiesTableModel
public SystemPropertiesTableModel()Creates a new table model using the properties of the current Java Virtual Machine.
-
-
Method Details
-
isSortable
Returns true for the first column, and false otherwise - sorting is only allowed on the first column.- Overrides:
isSortablein classSortableTableModel- Parameters:
column- the column index.- Returns:
- true for column 0, and false for all other columns.
-
getRowCount
Returns the number of rows in the table model (that is, the number of system properties).- Returns:
- the row count.
-
getColumnCount
Returns the number of columns in the table model. In this case, there are two columns: one for the property name, and one for the property value.- Returns:
- the column count (always 2 in this case).
-
getColumnName
Returns the name of the specified column.- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel- Parameters:
column- the column index.- Returns:
- the column name.
-
getValueAt
Returns the value at the specified row and column. This method supports the TableModel interface.- Parameters:
row- the row index.column- the column index.- Returns:
- the value.
-
sortByColumn
Sorts on the specified column.- Overrides:
sortByColumnin classSortableTableModel- Parameters:
column- the column index.ascending- a flag that controls the sort order.
-