1 7 package org.ejtools.management.browser.ui.statistics; 8 9 import java.util.ArrayList ; 10 11 import javax.management.j2ee.statistics.Statistic ; 12 13 17 public class CompositeStatisticCustomizer extends StatisticCustomizer 18 { 19 20 protected ArrayList children = null; 21 22 23 28 public CompositeStatisticCustomizer(Statistic statistic) 29 { 30 super(statistic); 31 this.children = new ArrayList (); 32 } 33 34 35 40 public void addCustomizer(StatisticCustomizer customizer) 41 { 42 this.add(customizer, this.gridbagconstraints); 43 this.children.add(customizer); 44 } 45 46 47 48 public void refresh() 49 { 50 for (int i = 0; i < children.size(); i++) 51 { 52 StatisticCustomizer sc = (StatisticCustomizer) children.get(i); 53 sc.refresh(); 54 } 55 56 super.refresh(); 57 } 58 59 60 64 public void setStatistic(Statistic statistic) 65 { 66 for (int i = 0; i < children.size(); i++) 67 { 68 StatisticCustomizer sc = (StatisticCustomizer) children.get(i); 69 sc.setStatistic(statistic); 70 } 71 } 72 } 73 | Popular Tags |