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

org.objectweb.cjdbc.console.views.BackendViewer Class Reference

Inheritance diagram for org.objectweb.cjdbc.console.views.BackendViewer:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.cjdbc.console.views.BackendViewer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BackendViewer (Object[][] data)
String[] getColumnNames ()
int[] getTraceableColumns ()
void setLabels ()

Protected Member Functions

Object[][] getDataTypes (Object[][] stats)

Detailed Description

Backend data statistics viewer. Quick and dirty implementation.

Author:
Nicolas Modrzyk
Version:
1.0

Definition at line 35 of file BackendViewer.java.


Constructor & Destructor Documentation

org.objectweb.cjdbc.console.views.BackendViewer.BackendViewer Object  data[][]  ) 
 

Create a BackendViewer

Parameters:
data Stats to display in the table

Definition at line 43 of file BackendViewer.java.

00044   {
00045     super(data);
00046   }


Member Function Documentation

String [] org.objectweb.cjdbc.console.views.BackendViewer.getColumnNames  )  [virtual]
 

See also:
InfoViewer.getColumnNames()

Implements org.objectweb.cjdbc.console.views.InfoViewer.

Definition at line 74 of file BackendViewer.java.

00075   {
00076     String[] columnNames = new String[14];
00077     columnNames[0] = Translate.get("console.infoviewer.backend.column.0");
00078     columnNames[1] = Translate.get("console.infoviewer.backend.column.1");
00079     columnNames[2] = Translate.get("console.infoviewer.backend.column.2");
00080     columnNames[3] = Translate.get("console.infoviewer.backend.column.3");
00081     columnNames[4] = Translate.get("console.infoviewer.backend.column.4");
00082     columnNames[5] = Translate.get("console.infoviewer.backend.column.5");
00083     columnNames[6] = Translate.get("console.infoviewer.backend.column.6");
00084     columnNames[7] = Translate.get("console.infoviewer.backend.column.7");
00085     columnNames[8] = Translate.get("console.infoviewer.backend.column.8");
00086     columnNames[9] = Translate.get("console.infoviewer.backend.column.9");
00087     columnNames[10] = Translate.get("console.infoviewer.backend.column.10");
00088     columnNames[11] = Translate.get("console.infoviewer.backend.column.11");
00089     columnNames[12] = Translate.get("console.infoviewer.backend.column.12");
00090     columnNames[13] = Translate.get("console.infoviewer.backend.column.13");
00091     return columnNames;
00092   }

Object [][] org.objectweb.cjdbc.console.views.BackendViewer.getDataTypes Object  stats[][]  )  [protected, virtual]
 

Subclasses should overide this method to get coherent sorting

Parameters:
stats to display
Returns:
same sized objects array but with proper types default is strings only

Implements org.objectweb.cjdbc.console.views.InfoViewer.

Definition at line 48 of file BackendViewer.java.

00049   {
00050     int iSize = stats.length;
00051     Object[][] ret = new Object[iSize][];
00052     for (int i = 0; i < iSize; i++)
00053     {
00054       String[] aStat = (String[]) stats[i];
00055       int jSize = aStat.length;
00056       ret[i] = new Object[jSize];
00057       ret[i][0] = aStat[0];
00058       for (int j = 0; j < jSize; j++)
00059       {
00060         if (j == 0 || j == 1 || j == 2 || j == 7 || j==13)
00061           ret[i][j] = new String(aStat[j]);
00062         else if (j == 3 || j == 4 || j == 9 || j == 10 || j == 11 || j == 12)
00063           ret[i][j] = new Integer(aStat[j]);
00064         else if (j == 5 || j == 6 || j == 8)
00065           ret[i][j] = new Boolean(aStat[j]);
00066       }
00067     }
00068     return ret;
00069   }

int [] org.objectweb.cjdbc.console.views.BackendViewer.getTraceableColumns  ) 
 

See also:
org.objectweb.cjdbc.console.views.InfoViewer.getTraceableColumns()

Reimplemented from org.objectweb.cjdbc.console.views.InfoViewer.

Definition at line 97 of file BackendViewer.java.

00098   {
00099     return new int[]{3, 4, 10, 11, 12};
00100   }

void org.objectweb.cjdbc.console.views.BackendViewer.setLabels  )  [virtual]
 

See also:
InfoViewer.setLabels()

Implements org.objectweb.cjdbc.console.views.InfoViewer.

Definition at line 105 of file BackendViewer.java.

00106   {
00107     frameTitle = Translate.get("console.infoviewer.backend.frame.title");
00108     infoViewerMenuBarString = Translate
00109         .get("console.infoviewer.backend.menubar");
00110     actionToolTipText = Translate
00111         .get("console.infoviewer.backend.action.tooltiptext");
00112     actionErrorMessage = Translate
00113         .get("console.infoviewer.backend.action.error.message");
00114     actionSuccessMessage = Translate
00115         .get("console.infoviewer.backend.action.success.message");
00116     tableHeaderToolTipText = Translate
00117         .get("console.infoviewer.table.tooltip.text");
00118   }


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