MetaDone
|
Public Member Functions | |
String | getColumnName (int column) |
boolean | isEditable () |
void | setEditable (boolean b) |
int | getColumnCount () |
void | setColumns (List< String > cols) |
int | getRowCount () |
TableRow | getRow (int rowIndex) |
Object | getValueAt (int rowIndex, int columnIndex) |
void | rowInsert (int index, TableRow row) |
void | rowUpdate (int index, TableRow row) |
TableRow | rowDelete (int index) |
void | rowClear () |
boolean | isCellEditable (int rowIndex, int columnIndex) |
Private Attributes | |
List< String > | columns = new ArrayList<String>() |
List< TableRow > | data = new ArrayList<TableRow>() |
boolean | editable = true |
Static Private Attributes | |
static final long | serialVersionUID = 1L |
The model of the table.
The width is the number of defined column names. Each row is dynamically completed with null
elements or stripped to fit the width.
int metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.getColumnCount | ( | ) |
String metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.getColumnName | ( | int | column | ) |
TableRow metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.getRow | ( | int | rowIndex | ) |
Gets a row from the model
rowIndex | The index |
IndexOutOfBoundsException | if the row is out of bounds |
References metadone.client.grasyla2.swing.TableRow.get().
int metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.getRowCount | ( | ) |
Object metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.getValueAt | ( | int | rowIndex, |
int | columnIndex | ||
) |
boolean metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.isCellEditable | ( | int | rowIndex, |
int | columnIndex | ||
) |
Checks if a cell is editable.
To be editable, the editable property must be true
, the value must exist and the row must be editable (TableRow#isEditable().
boolean metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.isEditable | ( | ) |
Gets the editable property of the model.
If the table is not editable, isCellEditable(int, int) always returns false
.
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.rowClear | ( | ) |
Clears the table data.
TableRow metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.rowDelete | ( | int | index | ) |
Deletes a row at the given index.
index | The index |
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.rowInsert | ( | int | index, |
TableRow | row | ||
) |
Inserts a row in this table.
index | The index |
row | The row |
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.rowUpdate | ( | int | index, |
TableRow | row | ||
) |
Updates a row at the given index.
index | The index |
row | The row |
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.setColumns | ( | List< String > | cols | ) |
Sets the column names.
cols | The columns. |
Referenced by metadone.client.grasyla2.swing.JTableEngine.JTableEngine().
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.setEditable | ( | boolean | b | ) |
Sets the editable property of the model.
b | The new value |
List<String> metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.columns = new ArrayList<String>() [private] |
List<TableRow> metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.data = new ArrayList<TableRow>() [private] |
boolean metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.editable = true [private] |
final long metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.serialVersionUID = 1L [static, private] |