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

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

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Protected Member Functions

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

Detailed Description

Graphical statistics viewer. Quick and dirty implementation.

Author:
Mathieu Peltier

Emmanuel Cecchet

Version:
1.0

Definition at line 36 of file CacheStatsViewer.java.


Constructor & Destructor Documentation

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

Create a CacheStatsViewer

Parameters:
data Stats to display in the table

Definition at line 44 of file CacheStatsViewer.java.

00045   {
00046     super(data);
00047   }


Member Function Documentation

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

See also:
InfoViewer.getColumnNames()

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

Definition at line 73 of file CacheStatsViewer.java.

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

Object [][] org.objectweb.cjdbc.console.views.CacheStatsViewer.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 49 of file CacheStatsViewer.java.

00050   {
00051     int iSize = stats.length;
00052     Object[][] ret = new Object[iSize][];
00053     for (int i = 0; i < iSize; i++)
00054     {
00055       String[] aStat = (String[]) stats[i];
00056       int jSize = aStat.length;
00057       ret[i] = new Object[jSize];
00058       ret[i][0] = aStat[0];
00059       for (int j = 1; j < jSize; j++)
00060       {
00061         if (j == 10)
00062           ret[i][j] = new Float(aStat[j]);
00063         else
00064           ret[i][j] = new Integer(aStat[j]);
00065       }
00066     }
00067     return ret;
00068   }

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

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

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

Definition at line 112 of file CacheStatsViewer.java.

00113   {
00114     return new int[]{0, 1, 10,11};
00115   }

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

See also:
InfoViewer.setLabels()

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

Definition at line 94 of file CacheStatsViewer.java.

00095   {
00096     frameTitle = Translate.get("console.infoviewer.cachestats.frame.title");
00097     infoViewerMenuBarString = Translate
00098         .get("console.infoviewer.cachestats.menubar");
00099     actionToolTipText = Translate
00100         .get("console.infoviewer.cachestats.action.tooltiptext");
00101     actionErrorMessage = Translate
00102         .get("console.infoviewer.cachestats.action.error.message");
00103     actionSuccessMessage = Translate
00104         .get("console.infoviewer.cachestats.action.success.message");
00105     tableHeaderToolTipText = Translate
00106         .get("console.infoviewer.table.tooltip.text");
00107   }


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