|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.table.AbstractTableModel
nextapp.echo.table.DefaultTableModel
public class DefaultTableModel
The default TableModel implementation.
Field Summary |
---|
Fields inherited from class nextapp.echo.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultTableModel()
Creates a new table model of 0x0 size. |
|
DefaultTableModel(int columns,
int rows)
Creates a new table model of the specified dimension. |
|
DefaultTableModel(java.lang.Object[][] data,
java.lang.Object[] names)
Creates a new Table Model with the specified data and column names. |
Method Summary | |
---|---|
void |
deleteRow(int row)
Deletes the specified row. |
int |
getColumnCount()
Returns the number of columns in the table. |
java.lang.String |
getColumnName(int column)
Returns the name of the specified column number. |
java.lang.Object |
getCopiedValueAt(int column,
int row)
|
int |
getRowCount()
Returns the number of rows in the table. |
java.lang.Object |
getValueAt(int column,
int row)
Returns the contents of the table at the specified position. |
boolean |
hasCopiedValueAt(int column,
int row)
|
void |
insertRow(int row,
java.lang.Object[] rowData)
Inserts a row with the provided data. |
boolean |
isRowEditable(int row)
When a table model supports editing of data, this method will be called to query if a row is currently editable. |
void |
setColumnCount(int newValue)
Sets the number of columns in the table. |
void |
setRowCount(int newValue)
Sets the number of rows in the table. |
void |
setValueAt(java.lang.Object newValue,
int column,
int row)
Sets the contents of the table at the specified coordinate. |
Methods inherited from class nextapp.echo.table.AbstractTableModel |
---|
addTableModelListener, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTableModel()
public DefaultTableModel(int columns, int rows)
columns
- The number of columns in the table model.rows
- The number of rows in the table model.public DefaultTableModel(java.lang.Object[][] data, java.lang.Object[] names)
data
- A two dimensional array containing the table data.
The first index divides the array into rows.
The second index specifies columns.names
- An array of column names.Method Detail |
---|
public void deleteRow(int row)
row
- The row to delete.public int getColumnCount()
getColumnCount
in interface TableModel
public java.lang.String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
column
- The column number whose name is to be returned.
public int getRowCount()
getRowCount
in interface TableModel
public java.lang.Object getValueAt(int column, int row)
getValueAt
in interface TableModel
row
- The row index of the desired value.column
- The column index of the desired value.
public void insertRow(int row, java.lang.Object[] rowData)
row
- The index of the inserted row.rowData
- The data for the new.public void setColumnCount(int newValue)
newValue
- The new number of columns in the table.public void setRowCount(int newValue)
newValue
- The new number of rows in the table.public void setValueAt(java.lang.Object newValue, int column, int row)
newValue
- The new value for the given cell.column
- The column at which to place the value.row
- The row at which to place the value.public boolean isRowEditable(int row)
TableModel
When a table model supports editing of data, this method will be called to query if a row is currently editable.
isRowEditable
in interface TableModel
isRowEditable
in class AbstractTableModel
public java.lang.Object getCopiedValueAt(int column, int row)
public boolean hasCopiedValueAt(int column, int row)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |