MetaDone
metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel Class Reference
Inheritance diagram for metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel:
Collaboration diagram for metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel:

List of all members.

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< TableRowdata = new ArrayList<TableRow>()
boolean editable = true

Static Private Attributes

static final long serialVersionUID = 1L

Detailed Description

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.

See also:
TableRow

Member Function Documentation

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

Parameters:
rowIndexThe index
Returns:
The row
Exceptions:
IndexOutOfBoundsExceptionif 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.

Returns:
The editable property
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.

Parameters:
indexThe index
Returns:
The deleted row
See also:
List.remove(int)
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.rowInsert ( int  index,
TableRow  row 
)

Inserts a row in this table.

Parameters:
indexThe index
rowThe row
See also:
List.add(int, Object)
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.rowUpdate ( int  index,
TableRow  row 
)

Updates a row at the given index.

Parameters:
indexThe index
rowThe row
See also:
List.set(int, Object)
void metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.setColumns ( List< String >  cols)

Sets the column names.

Parameters:
colsThe 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.

Parameters:
bThe new value

Member Data Documentation

List<String> metadone.client.grasyla2.swing.JTableEngine.GrasylaTableModel.columns = new ArrayList<String>() [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations