1 4 package com.tc.admin.dso; 5 6 import com.tc.admin.AdminClient; 7 import com.tc.admin.common.XObjectTable; 8 import com.tc.admin.common.XObjectTableModel; 9 10 import com.tc.stats.DSOClassInfo; 11 12 public class ClassesTable extends XObjectTable { 13 public ClassesTable() { 14 super(new ClassTableModel()); 15 16 setSortColumn(1 ); 17 setSortDirection(UP); 18 } 19 20 public void setClassInfo(DSOClassInfo classInfo[]) { 21 ((ClassTableModel)getModel()).setClassInfo(classInfo); 22 sort(); 23 } 24 } 25 26 class ClassTableModel extends XObjectTableModel { 27 private static final String [] FIELDS = { 28 "ClassName", 29 "InstanceCount" 30 }; 31 32 private static final String [] HEADERS = 33 AdminClient.getContext().getMessages( 34 new String [] { 35 "dso.classes.className", 36 "dso.classes.instanceCount" 37 }); 38 39 public ClassTableModel() { 40 super(DSOClassInfo.class, FIELDS, HEADERS); 41 } 42 43 public void setClassInfo(DSOClassInfo classInfo[]) { 44 set(classInfo); 45 } 46 } 47 | Popular Tags |