All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sgi.sysadm.ui.ItemTableModel

java.lang.Object
   |
   +----javax.swing.table.AbstractTableModel
           |
           +----com.sgi.sysadm.ui.ItemTableModel

public class ItemTableModel
extends AbstractTableModel
This class is used by a JTable to show an ItemTable.


Constructor Index

 o ItemTableModel()

Method Index

 o getColumnClass(int)
Gives the Table information on how to display a column.
 o getColumnCount()
Returns the current number of columns being displayed Returns 0 so that if we are using a no-resource ItemTable, there are no columns until an Item arrives.
 o getColumnName(int)
Returns the label to use for a particular column.
 o getRowCount()
Return the current number of rows that are being displayed
 o getValueAt(int, int)
Returns the Object at particular row and column
 o setData(Vector)

Constructors

 o ItemTableModel
 public ItemTableModel()

Methods

 o setData
 public void setData(Vector data)
 o getRowCount
 public int getRowCount()
Return the current number of rows that are being displayed

Returns:
Current number of rows that are being displayed
Overrides:
getRowCount in class AbstractTableModel
 o getColumnCount
 public int getColumnCount()
Returns the current number of columns being displayed Returns 0 so that if we are using a no-resource ItemTable, there are no columns until an Item arrives. If a resource file exists, or once an Item arrives, the ItemTable computes the number of columns necessary, and this method is not called.

Returns:
Current number of columns being displayed
Overrides:
getColumnCount in class AbstractTableModel
 o getValueAt
 public Object getValueAt(int row,
                          int column)
Returns the Object at particular row and column

Parameters:
row - The row
column - the column
Returns:
The Object at particular row and column
Overrides:
getValueAt in class AbstractTableModel
 o getColumnClass
 public Class getColumnClass(int column)
Gives the Table information on how to display a column. Currently not used

Parameters:
column - The column in question
Returns:
The class of the objects in the column
Overrides:
getColumnClass in class AbstractTableModel
 o getColumnName
 public String getColumnName(int column)
Returns the label to use for a particular column. Returns null so that if we are using a no-resource ItemTable, there are no columns names until an Item arrives. If a resource file exists, or once an Item arrives, the ItemTable computes the column names, and this method is not called.

Parameters:
column - The column in question
Returns:
The name of the column; used for displaying the header.
Overrides:
getColumnName in class AbstractTableModel

All Packages  Class Hierarchy  This Package  Previous  Next  Index