Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.ui.table
Interface SimpleTableFormat<T>

Type Parameters:
T - The type of the object representing one row of the table

public interface SimpleTableFormat<T>

A class for use with SimpleTableModel to represent a list or array of elements in a table. The SimpleTableModel class maps the elements in the list or array to the rows of the table. A SimpleTableFormat class then maps aspects of each element to the columns in the table


Method Summary
 java.lang.Class<?> getColumnClass(int columnIndex)
          Returns the most specific superclass for all the cell values in the column.
 int getColumnCount()
          Returns the number of columns in the model.
 java.lang.String getColumnName(int columnIndex)
          Returns the name of the column at columnIndex.
 java.lang.Object getValueAt(T rowValue, int columnIndex)
          Returns the value for the cell at columnIndex and rowIndex.
 boolean isCellEditable(T rowValue, int columnIndex)
          Returns true if the cell at rowIndex and columnIndex is editable.
 void setValueAt(T rowValue, java.lang.Object value, int columnIndex)
          Sets the value in the cell at columnIndex and rowIndex to aValue.
 

Method Detail

getColumnCount

int getColumnCount()
Returns the number of columns in the model. A JTable uses this method to determine how many columns it should create and display by default.

Returns:
the number of columns in the model

getColumnClass

java.lang.Class<?> getColumnClass(int columnIndex)
Returns the most specific superclass for all the cell values in the column. This is used by the JTable to set up a default renderer and editor for the column.

Parameters:
columnIndex - the index of the column
Returns:
the common ancestor class of the object values in the model.

getColumnName

java.lang.String getColumnName(int columnIndex)
Returns the name of the column at columnIndex. This is used to initialize the table's column header name. Note: this name does not need to be unique; two columns in a table can have the same name.

Parameters:
columnIndex - the index of the column
Returns:
the name of the column

getValueAt

java.lang.Object getValueAt(T rowValue,
                            int columnIndex)
Returns the value for the cell at columnIndex and rowIndex.

Parameters:
rowValue - the object representing the row
columnIndex - the column whose value is to be queried
Returns:
the value Object at the specified cell

setValueAt

void setValueAt(T rowValue,
                java.lang.Object value,
                int columnIndex)
Sets the value in the cell at columnIndex and rowIndex to aValue.

Parameters:
rowValue - the object representing the row
value - the new value
columnIndex - the column whose value is to be changed

isCellEditable

boolean isCellEditable(T rowValue,
                       int columnIndex)
Returns true if the cell at rowIndex and columnIndex is editable. Otherwise, setValueAt on the cell will not change the value of that cell.

Parameters:
rowValue - the object representing the row
columnIndex - the column being queried
Returns:
false

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.