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

RecoveryLogViewer.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): Nicolas Modrzyk.
00022  * Contributor(s): ______________________.
00023  */
00024 
00025 package org.objectweb.cjdbc.console.views;
00026 
00027 import org.objectweb.cjdbc.common.i18n.Translate;
00028 
00029 /**
00030  * This class defines a RecoveryLogViewer
00031  * 
00032  * @author <a href="mailto:Nicolas.Modrzyk@inrialpes.fr">Nicolas Modrzyk</a>
00033  * @version 1.0
00034  */
00035 public class RecoveryLogViewer extends InfoViewer
00036 {
00037 
00038   /**
00039    * Creates a new <code>RecoveryLogViewer</code> object
00040    * 
00041    * @param data the content of the recovery log
00042    */
00043   public RecoveryLogViewer(Object[][] data)
00044   {
00045     super(data);
00046   }
00047 
00048   /**
00049    * @see org.objectweb.cjdbc.console.views.InfoViewer#getDataTypes(java.lang.Object[][])
00050    */
00051   protected Object[][] getDataTypes(Object[][] stats)
00052   {
00053     int iSize = stats.length;
00054     Object[][] ret = new Object[iSize][];
00055     for (int i = 0; i < iSize; i++)
00056     {
00057       String[] aStat = (String[]) stats[i];
00058       int jSize = aStat.length;
00059       ret[i] = new Object[jSize];
00060       ret[i][0] = aStat[0];
00061       for (int j = 0; j < jSize; j++)
00062       {
00063         if (j == 2 || j == 3)
00064           ret[i][j] = new Long(aStat[j]);
00065         else
00066           ret[i][j] = new String(aStat[j]);
00067       }
00068     }
00069     return ret;
00070   }
00071 
00072   /**
00073    * @see org.objectweb.cjdbc.console.views.InfoViewer#getColumnNames()
00074    */
00075   public String[] getColumnNames()
00076   {
00077     String[] columnNames = new String[4];
00078     columnNames[0] = Translate.get("console.infoviewer.recoverylog.column.0");
00079     columnNames[1] = Translate.get("console.infoviewer.recoverylog.column.1");
00080     columnNames[2] = Translate.get("console.infoviewer.recoverylog.column.2");
00081     columnNames[3] = Translate.get("console.infoviewer.recoverylog.column.3");
00082     return columnNames;
00083   }
00084 
00085   /**
00086    * @see org.objectweb.cjdbc.console.views.InfoViewer#setLabels()
00087    */
00088   public void setLabels()
00089   {
00090     frameTitle = Translate.get("console.infoviewer.recoverylog.frame.title");
00091     infoViewerMenuBarString = Translate
00092         .get("console.infoviewer.recoverylog.menubar");
00093     actionToolTipText = Translate
00094         .get("console.infoviewer.recoverylog.action.tooltiptext");
00095     actionErrorMessage = Translate
00096         .get("console.infoviewer.recoverylog.action.error.message");
00097     actionSuccessMessage = Translate
00098         .get("console.infoviewer.recoverylog.action.success.message");
00099     tableHeaderToolTipText = Translate
00100         .get("console.infoviewer.table.tooltip.text");
00101   }
00102 
00103 }

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