Inherits javax::swing::table::AbstractTableModel.
Public Member Functions | |
MyTableModel () | |
Object | getValueAt (int row, int column) |
int | getRowCount () |
int | getColumnCount () |
void | append (String name, String cUrl) |
Class | getColumnClass (int c) |
boolean | exist (String name) |
void | deleteEntry (String url) |
void | sort () |
void | setValueAt (Object obj, int row, int col) |
String | getColumnName (int col) |
boolean | isCellEditable (int row, int col) |
String | getURL (String name) |
Package Attributes | |
final String | colNames [] |
Object | tableData [][] |
This is a concrete class definition to represent the data in the table of the activated dynamic components
alma.demo.dyncomp.MyTableModel.MyTableModel | ( | ) |
The construtor
References alma.demo.dyncomp.MyTableModel.tableData.
void alma.demo.dyncomp.MyTableModel.append | ( | String | name, | |
String | cUrl | |||
) |
Append a new activated component with the given name
In this very very very first version the component are added at the end without any care
name | The name of the newly activated component | |
cUrl | The CORBA url of the activated component |
References alma.demo.dyncomp.MyTableModel.setValueAt(), and alma.demo.dyncomp.MyTableModel.tableData.
void alma.demo.dyncomp.MyTableModel.deleteEntry | ( | String | url | ) |
Delete the component with the given name
url The name of the component
References alma.demo.dyncomp.MyTableModel.setValueAt(), and alma.demo.dyncomp.MyTableModel.tableData.
Referenced by alma.demo.dyncomp.JDynAct.releaseComponent().
boolean alma.demo.dyncomp.MyTableModel.exist | ( | String | name | ) |
Check if an element with the given name already exists in the table
name | the name of the item to search |
References alma.demo.dyncomp.MyTableModel.tableData.
Class alma.demo.dyncomp.MyTableModel.getColumnClass | ( | int | c | ) |
Return the class of the elements stored in a column
c | The number of the column |
int alma.demo.dyncomp.MyTableModel.getColumnCount | ( | ) |
Return the number of columns of the table
String alma.demo.dyncomp.MyTableModel.getColumnName | ( | int | col | ) |
Return the name of the column
col | The number of the column |
References alma.demo.dyncomp.MyTableModel.colNames.
int alma.demo.dyncomp.MyTableModel.getRowCount | ( | ) |
Return the number of rows of the table
String alma.demo.dyncomp.MyTableModel.getURL | ( | String | name | ) |
Return the URL of a component given its name
name | The name of the component |
References alma.demo.dyncomp.MyTableModel.tableData.
Referenced by alma.demo.dyncomp.JDynAct.actionPerformed().
Object alma.demo.dyncomp.MyTableModel.getValueAt | ( | int | row, | |
int | column | |||
) |
Return the value of the cell
row | The row of the cell | |
colum | The column of the cell |
References alma.demo.dyncomp.MyTableModel.tableData.
boolean alma.demo.dyncomp.MyTableModel.isCellEditable | ( | int | row, | |
int | col | |||
) |
Check if a cell is editable. In this case all the cells are not editable
References alma.demo.dyncomp.MyTableModel.tableData.
void alma.demo.dyncomp.MyTableModel.setValueAt | ( | Object | obj, | |
int | row, | |||
int | col | |||
) |
Add a component to the table
name | The name of the component | |
row | The row is ignored because each new element is appended at the end | |
col | The col parameter is ignored because the name always is inserted in the first column |
References alma.demo.dyncomp.MyTableModel.tableData.
Referenced by alma.demo.dyncomp.MyTableModel.append(), alma.demo.dyncomp.MyTableModel.deleteEntry(), and alma.demo.dyncomp.MyTableModel.sort().
void alma.demo.dyncomp.MyTableModel.sort | ( | ) |
Sort the items of the table
References alma.demo.dyncomp.MyTableModel.setValueAt(), and alma.demo.dyncomp.MyTableModel.tableData.
final String alma.demo.dyncomp.MyTableModel.colNames[] [package] |
{ "Dynamic component", "cUrl", "" }
The name of the columns
Referenced by alma.demo.dyncomp.MyTableModel.getColumnName().
Object alma.demo.dyncomp.MyTableModel.tableData[][] [package] |
The data of each cell
The third column always contains the Release button
Referenced by alma.demo.dyncomp.MyTableModel.append(), alma.demo.dyncomp.MyTableModel.deleteEntry(), alma.demo.dyncomp.MyTableModel.exist(), alma.demo.dyncomp.MyTableModel.getURL(), alma.demo.dyncomp.MyTableModel.getValueAt(), alma.demo.dyncomp.MyTableModel.isCellEditable(), alma.demo.dyncomp.MyTableModel.MyTableModel(), alma.demo.dyncomp.MyTableModel.setValueAt(), and alma.demo.dyncomp.MyTableModel.sort().