Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel Class Reference

List of all members.

Public Member Functions

 InfoTableModel (Object[][] stats)
void setData (Object[][] data)
int getColumnCount ()
int getRowCount ()
String getColumnName (int col)
Object getValueAt (int row, int col)
Class getColumnClass (int c)
boolean isCellEditable (int row, int col)

Detailed Description

This class defines a InfoTableModel

Version:
1.0

Definition at line 377 of file InfoViewer.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.InfoTableModel Object  stats[][]  ) 
 

Creates a new InfoTableModel object

Parameters:
stats Object[][] instance with data

Definition at line 386 of file InfoViewer.java.

00387     {
00388       this.data = stats;
00389     }


Member Function Documentation

Class org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.getColumnClass int  c  ) 
 

JTable uses this method to determine the default renderer/ editor for each cell. If we didn't implement this method, then the last column would contain text ("true"/"false"), rather than a check box.

Definition at line 443 of file InfoViewer.java.

00444     {
00445       return getValueAt(0, c).getClass();
00446     }

int org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.getColumnCount  ) 
 

See also:
javax.swing.table.TableModel#getColumnCount()

Definition at line 406 of file InfoViewer.java.

00407     {
00408       return columnNames.length;
00409     }

String org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.getColumnName int  col  ) 
 

See also:
javax.swing.table.TableModel#getColumnName(int)

Definition at line 424 of file InfoViewer.java.

00425     {
00426       return columnNames[col];
00427     }

int org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.getRowCount  ) 
 

See also:
javax.swing.table.TableModel#getRowCount()

Definition at line 415 of file InfoViewer.java.

00416     {
00417       return data.length;
00418     }

Object org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.getValueAt int  row,
int  col
 

See also:
javax.swing.table.TableModel#getValueAt(int, int)

Definition at line 433 of file InfoViewer.java.

00434     {
00435       return data[row][col];
00436     }

boolean org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.isCellEditable int  row,
int  col
 

Don't need to implement this method unless your table's editable.

Definition at line 451 of file InfoViewer.java.

00452     {
00453       return false;
00454     }

void org.objectweb.cjdbc.console.views.InfoViewer.InfoTableModel.setData Object  data[][]  ) 
 

Set the data of this InfoTableModel

Parameters:
data Object[][] instance with data

Definition at line 397 of file InfoViewer.java.

Referenced by org.objectweb.cjdbc.console.views.InfoViewer.updateData().

00398     {
00399       this.data = data;
00400     }


The documentation for this class was generated from the following file:
Generated on Mon Apr 11 22:03:17 2005 for C-JDBC by  doxygen 1.3.9.1