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

SchedulerViewer.java

00001 /**
00002  * C-JDBC: Clustered JDBC.
00003  * Copyright (C) 2002-2004 French National Institute For Research In Computer
00004  * Science And Control (INRIA).
00005  * Contact: c-jdbc@objectweb.org
00006  * 
00007  * This library is free software; you can redistribute it and/or modify it
00008  * under the terms of the GNU Lesser General Public License as published by the
00009  * Free Software Foundation; either version 2.1 of the License, or any later
00010  * version.
00011  * 
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
00015  * for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this library; if not, write to the Free Software Foundation,
00019  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00020  *
00021  * Initial developer(s): Emmanuel Cecchet.
00022  * Contributor(s): Mathieu Peltier.
00023  */
00024 
00025 package org.objectweb.cjdbc.console.views;
00026 
00027 import org.objectweb.cjdbc.common.i18n.Translate;
00028 
00029 /**
00030  * Graphical statistics viewer. Quick and dirty implementation.
00031  * 
00032  * @author <a href="mailto:Mathieu.Peltier@inrialpes.fr">Mathieu Peltier</a>
00033  * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet</a>
00034  * @version 1.0
00035  */
00036 public class SchedulerViewer extends InfoViewer
00037 {
00038 
00039   /**
00040    * Create a CacheStatsViewer
00041    * 
00042    * @param data Stats to display in the table
00043    */
00044   public SchedulerViewer(Object[][] data)
00045   {
00046     super(data);
00047   }
00048 
00049   protected Object[][] getDataTypes(Object[][] stats)
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           ret[i][j] = new Integer(aStat[j]);
00062       }
00063     }
00064     return ret;
00065   }
00066 
00067   /**
00068    * @see InfoViewer#getColumnNames()
00069    */
00070   public String[] getColumnNames()
00071   {
00072     String[] columnNames = new String[7];
00073     columnNames[0] = Translate.get("console.infoviewer.scheduler.column.0");
00074     columnNames[1] = Translate.get("console.infoviewer.scheduler.column.1");
00075     columnNames[2] = Translate.get("console.infoviewer.scheduler.column.2");
00076     columnNames[3] = Translate.get("console.infoviewer.scheduler.column.3");
00077     columnNames[4] = Translate.get("console.infoviewer.scheduler.column.4");
00078     columnNames[5] = Translate.get("console.infoviewer.scheduler.column.5");
00079     columnNames[6] = Translate.get("console.infoviewer.scheduler.column.6");
00080     return columnNames;
00081   }
00082 
00083   /**
00084    * @see InfoViewer#setLabels()
00085    */
00086   public void setLabels()
00087   {
00088     frameTitle = Translate.get("console.infoviewer.scheduler.frame.title");
00089     infoViewerMenuBarString = Translate
00090         .get("console.infoviewer.scheduler.menubar");
00091     actionToolTipText = Translate
00092         .get("console.infoviewer.scheduler.action.tooltiptext");
00093     actionErrorMessage = Translate
00094         .get("console.infoviewer.scheduler.action.error.message");
00095     actionSuccessMessage = Translate
00096         .get("console.infoviewer.scheduler.action.success.message");
00097     tableHeaderToolTipText = Translate
00098         .get("console.infoviewer.table.tooltip.text");
00099   }
00100 
00101   /**
00102    * @see org.objectweb.cjdbc.console.views.InfoViewer#getTraceableColumns()
00103    */
00104   public int[] getTraceableColumns()
00105   {
00106     return new int[]{2,3,4};
00107   }
00108 
00109 }

Generated on Mon Apr 11 22:01:34 2005 for C-JDBC by  doxygen 1.3.9.1