Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.ui.table
Interface EditableTableModel


public interface EditableTableModel

EditableTableModel supports addding, removing and duplicating row and columns. If your table model doesn't support any of these functions, just have an empty implementation for the corresponding methods.


Method Summary
 void addColumn(java.lang.Object columnName, java.lang.Object[] columnData)
          Adds a column to the model.
 void addRow(java.lang.Object[] rowData)
          Adds a row to the end of the model.
 int duplicateColumn(int column, int nCopy)
          Duplicate the specified column and insert the column at a proper location.
 int duplicateRow(int row, int nCopy)
          Duplicate the specified row and insert the row data at a proper location.
 void insertColumn(int column, java.lang.Object columnName, java.lang.Object[] columnData)
          Inserts a column at column in the model.
 void insertRow(int row, java.lang.Object[] rowData)
          Inserts a row at row in the model.
 void removeColumn(int column)
          Removes the column at column from the model.
 void removeRow(int row)
          Removes the row at row from the model.
 

Method Detail

addRow

void addRow(java.lang.Object[] rowData)
Adds a row to the end of the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated.

Parameters:
rowData - optional data of the row being added

addColumn

void addColumn(java.lang.Object columnName,
               java.lang.Object[] columnData)
Adds a column to the model. The new column will have the identifier columnName. columnData is the optional array of data for the column. If it is null the column is filled with null values. Otherwise, the new data will be added to model starting with the first element going to row 0, etc. This method will send a tableChanged notification message to all the listeners.


insertRow

void insertRow(int row,
               java.lang.Object[] rowData)
Inserts a row at row in the model. The new row will contain null values unless rowData is specified. Notification of the row being added will be generated.

Parameters:
row - the row index of the row to be inserted
rowData - optional data of the row being added
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the row was invalid

insertColumn

void insertColumn(int column,
                  java.lang.Object columnName,
                  java.lang.Object[] columnData)
Inserts a column at column in the model. The new column will have the identifier columnName. columnData is the optional array of data for the column. If it is null the column is filled with null values. Otherwise, the new data will be added to model starting with the first element going to row 0, etc. This method will send a tableChanged notification message to all the listeners.

Parameters:
column - the row index of the column to be inserted
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the column was invalid

removeRow

void removeRow(int row)
Removes the row at row from the model. Notification of the row being removed will be sent to all the listeners.

Parameters:
row - the row index of the row to be removed
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the row was invalid

removeColumn

void removeColumn(int column)
Removes the column at column from the model. Notification of the column being removed will be sent to all the listeners.

Parameters:
column - the column index of the row to be removed
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the column was invalid

duplicateRow

int duplicateRow(int row,
                 int nCopy)
Duplicate the specified row and insert the row data at a proper location. Fires necessary tableChanged event.

Parameters:
row, - the row to be duplicated
nCopy, - nth copy of this row.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the row was invalid

duplicateColumn

int duplicateColumn(int column,
                    int nCopy)
Duplicate the specified column and insert the column at a proper location. Fires necessary tableChanged event. This method is reserved for future use.

Parameters:
column, - the column to be duplicated
nCopy, - nth copy of this column.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the column was invalid

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

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