| java.lang.Object nextapp.echo2.app.table.AbstractTableModel nextapp.echo2.app.table.DefaultTableModel
DefaultTableModel | public class DefaultTableModel extends AbstractTableModel (Code) | | The default TableModel implementation.
|
Method Summary | |
public void | addRow(Object[] rowData) Adds a row containing the provided data to the end of the model. | public void | deleteRow(int row) Deletes the specified row. | public int | getColumnCount() | public String | getColumnName(int column) | public int | getRowCount() | public Object | getValueAt(int column, int row) | public void | insertRow(int row, Object[] rowData) Inserts a row containing the provided data. | public void | setColumnCount(int newValue) Sets the number of columns in the table.
Empty columns will be added at the end of the table if the new column
count exceeds the number of existing columns. | public void | setColumnName(int column, String columnName) Sets the name of the specified column. | public void | setRowCount(int newValue) Sets the number of rows in the table.
Empty rows will be added at the end of the table if the new row
count exceeds the number of existing rows. | public void | setValueAt(Object newValue, int column, int row) Sets the contents of the table cell at the specified coordinate. |
DefaultTableModel | public DefaultTableModel()(Code) | | Creates a new table model of 0x0 size.
|
DefaultTableModel | public DefaultTableModel(int columns, int rows)(Code) | | Creates a new table model with the specified dimensions.
Parameters: columns - the initial number of columns Parameters: rows - the initial number of rows |
DefaultTableModel | public DefaultTableModel(Object[][] data, Object[] names)(Code) | | Creates a new Table Model with the specified data and column names.
Parameters: data - a two dimensional array containing the table data(the first index of the array represents the column index,and the second index represents the row index) Parameters: names - the column names |
addRow | public void addRow(Object[] rowData)(Code) | | Adds a row containing the provided data to the end of the model.
Parameters: rowData - the row data |
deleteRow | public void deleteRow(int row)(Code) | | Deletes the specified row.
Parameters: row - the row to delete |
insertRow | public void insertRow(int row, Object[] rowData)(Code) | | Inserts a row containing the provided data.
Parameters: row - the insertion index Parameters: rowData - the row data |
setColumnCount | public void setColumnCount(int newValue)(Code) | | Sets the number of columns in the table.
Empty columns will be added at the end of the table if the new column
count exceeds the number of existing columns. Existing columns will be
hidden if the number of existing columns exceeds the new column count.
Parameters: newValue - the new column count |
setColumnName | public void setColumnName(int column, String columnName)(Code) | | Sets the name of the specified column.
Parameters: column - the column index Parameters: columnName - the new column name |
setRowCount | public void setRowCount(int newValue)(Code) | | Sets the number of rows in the table.
Empty rows will be added at the end of the table if the new row
count exceeds the number of existing rows. Existing rows will be
hidden if the number of existing rows exceeds the new row count.
Parameters: newValue - the new row count |
setValueAt | public void setValueAt(Object newValue, int column, int row)(Code) | | Sets the contents of the table cell at the specified coordinate.
Parameters: newValue - the new value Parameters: column - the column index Parameters: row - the row index throws: ArrayIndexOutOfBoundsException - if the column or row indexexceed the column or row count |
|
|