org.jfree.ui.about

Class SystemPropertiesTableModel

public class SystemPropertiesTableModel extends SortableTableModel

A sortable table model containing the system properties.

Author: David Gilbert

Nested Class Summary
protected static classSystemPropertiesTableModel.SystemProperty
Useful class for holding the name and value of a system property.
protected static classSystemPropertiesTableModel.SystemPropertyComparator
A class for comparing SystemProperty objects.
Constructor Summary
SystemPropertiesTableModel()
Creates a new table model using the properties of the current Java Virtual Machine.
Method Summary
intgetColumnCount()
Returns the number of columns in the table model.
StringgetColumnName(int column)
Returns the name of the specified column.
intgetRowCount()
Returns the number of rows in the table model (that is, the number of system properties).
ObjectgetValueAt(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.

Constructor Detail

SystemPropertiesTableModel

public SystemPropertiesTableModel()
Creates a new table model using the properties of the current Java Virtual Machine.

Method Detail

getColumnCount

public int 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

public String getColumnName(int column)
Returns the name of the specified column.

Parameters: column the column index.

Returns: the column name.

getRowCount

public int getRowCount()
Returns the number of rows in the table model (that is, the number of system properties).

Returns: the row count.

getValueAt

public Object getValueAt(int row, int column)
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.

isSortable

public boolean isSortable(int column)
Returns true for the first column, and false otherwise - sorting is only allowed on the first column.

Parameters: column the column index.

Returns: true for column 0, and false for all other columns.

sortByColumn

public void sortByColumn(int column, boolean ascending)
Sorts on the specified column.

Parameters: column the column index. ascending a flag that controls the sort order.