com.jrefinery.ui.about
Class SystemPropertiesTableModel

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

public class SystemPropertiesTableModel
extends SortableTableModel

A sortable table model containing the system properties.

See Also:
Serialized Form

Field Summary
protected  java.lang.String nameColumnLabel
          Localised name column label.
protected  java.util.List properties
          Storage for the properties.
protected  java.lang.String valueColumnLabel
          Localised property column label.
 
Fields inherited from class com.jrefinery.ui.SortableTableModel
ascending, sortingColumn
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SystemPropertiesTableModel()
          Creates a new table model using the properties of the current Java Virtual Machine.
 
Method Summary
 int getColumnCount()
          Returns the number of columns in the table model.
 java.lang.String getColumnName(int columnIndex)
          Returns the name of the specified column.
 int getRowCount()
          Returns the number of rows in the table model (that is, the number of system properties).
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Returns the value at the specified row and column.
 boolean isSortable(int columnIndex)
          Returns true for the first column, and false otherwise - sorting is only allowed on the first column.
 void sortByColumn(int column, boolean ascending)
          Sorts on the specified column.
 
Methods inherited from class com.jrefinery.ui.SortableTableModel
getAscending, getSortingColumn, setAscending
 
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

properties

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


nameColumnLabel

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


valueColumnLabel

protected java.lang.String valueColumnLabel
Localised property column label.

Constructor Detail

SystemPropertiesTableModel

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

Method Detail

isSortable

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

Overrides:
isSortable in class SortableTableModel
Parameters:
columnIndex - The column (zero-based index).

getRowCount

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


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.


getColumnName

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

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the value at the specified row and column. This method supports the TableModel interface.


sortByColumn

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

Overrides:
sortByColumn in class SortableTableModel
Parameters:
column - The column to sort on (zero-based index).
ascending - A flag to indicate ascending order or descending order.


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.