1 24 25 package org.objectweb.cjdbc.console.views; 26 27 import org.objectweb.cjdbc.common.i18n.Translate; 28 29 35 public class BackendViewer extends InfoViewer 36 { 37 38 43 public BackendViewer(Object [][] data) 44 { 45 super(data); 46 } 47 48 protected Object [][] getDataTypes(Object [][] stats) 49 { 50 int iSize = stats.length; 51 Object [][] ret = new Object [iSize][]; 52 for (int i = 0; i < iSize; i++) 53 { 54 String [] aStat = (String []) stats[i]; 55 int jSize = aStat.length; 56 ret[i] = new Object [jSize]; 57 ret[i][0] = aStat[0]; 58 for (int j = 0; j < jSize; j++) 59 { 60 if (j == 0 || j == 1 || j == 2 || j == 7 || j==13) 61 ret[i][j] = new String (aStat[j]); 62 else if (j == 3 || j == 4 || j == 9 || j == 10 || j == 11 || j == 12) 63 ret[i][j] = new Integer (aStat[j]); 64 else if (j == 5 || j == 6 || j == 8) 65 ret[i][j] = new Boolean (aStat[j]); 66 } 67 } 68 return ret; 69 } 70 71 74 public String [] getColumnNames() 75 { 76 String [] columnNames = new String [14]; 77 columnNames[0] = Translate.get("console.infoviewer.backend.column.0"); 78 columnNames[1] = Translate.get("console.infoviewer.backend.column.1"); 79 columnNames[2] = Translate.get("console.infoviewer.backend.column.2"); 80 columnNames[3] = Translate.get("console.infoviewer.backend.column.3"); 81 columnNames[4] = Translate.get("console.infoviewer.backend.column.4"); 82 columnNames[5] = Translate.get("console.infoviewer.backend.column.5"); 83 columnNames[6] = Translate.get("console.infoviewer.backend.column.6"); 84 columnNames[7] = Translate.get("console.infoviewer.backend.column.7"); 85 columnNames[8] = Translate.get("console.infoviewer.backend.column.8"); 86 columnNames[9] = Translate.get("console.infoviewer.backend.column.9"); 87 columnNames[10] = Translate.get("console.infoviewer.backend.column.10"); 88 columnNames[11] = Translate.get("console.infoviewer.backend.column.11"); 89 columnNames[12] = Translate.get("console.infoviewer.backend.column.12"); 90 columnNames[13] = Translate.get("console.infoviewer.backend.column.13"); 91 return columnNames; 92 } 93 94 97 public int[] getTraceableColumns() 98 { 99 return new int[]{3, 4, 10, 11, 12}; 100 } 101 102 105 public void setLabels() 106 { 107 frameTitle = Translate.get("console.infoviewer.backend.frame.title"); 108 infoViewerMenuBarString = Translate 109 .get("console.infoviewer.backend.menubar"); 110 actionToolTipText = Translate 111 .get("console.infoviewer.backend.action.tooltiptext"); 112 actionErrorMessage = Translate 113 .get("console.infoviewer.backend.action.error.message"); 114 actionSuccessMessage = Translate 115 .get("console.infoviewer.backend.action.success.message"); 116 tableHeaderToolTipText = Translate 117 .get("console.infoviewer.table.tooltip.text"); 118 } 119 120 121 122 } 123 | Popular Tags |