1 7 package org.ejtools.management.browser.ui.statistics; 8 9 import javax.management.j2ee.statistics.CountStatistic ; 10 import javax.management.j2ee.statistics.Statistic ; 11 import javax.swing.JLabel ; 12 13 17 public class CountStatisticCustomizer extends StatisticCustomizer 18 { 19 20 protected JLabel lblCount = null; 21 22 23 28 public CountStatisticCustomizer(Statistic statistic) 29 { 30 super(statistic); 31 32 this.lblCount = new JLabel (""); 33 this.addGraphItem( 34 resources.getString("customizer.tab.statistics.text.count"), 35 resources.getString("customizer.tab.statistics.tooltip.count"), 36 "Count", 37 this.lblCount); 38 } 39 40 41 42 public void refresh() 43 { 44 if (this.statistic != null) 45 { 46 long value; 47 CountStatistic cs = (CountStatistic ) this.statistic; 48 49 value = cs.getCount(); 50 this.lblCount.setText("" + value); 51 52 super.refresh(); 53 } 54 } 55 } 56 | Popular Tags |