1 4 package com.tc.admin.common; 5 6 import org.dijon.ContainerResource; 7 import org.dijon.Label; 8 9 import com.tc.admin.AdminClient; 10 import com.tc.admin.AdminClientContext; 11 12 import java.awt.Color ; 13 14 import javax.swing.border.LineBorder ; 15 16 public class StatusView extends XContainer { 17 protected Label m_label; 18 protected Label m_indicator; 19 20 public StatusView() { 21 super(); 22 23 AdminClientContext cntx = AdminClient.getContext(); 24 load((ContainerResource)cntx.topRes.getComponent("StatusRenderer")); 25 } 26 27 public void load(ContainerResource containerRes) { 28 super.load(containerRes); 29 30 m_label = (Label)findComponent("StatusLabel"); 31 m_indicator = (Label)findComponent("StatusIndicator"); 32 33 m_indicator.setOpaque(true); 34 m_indicator.setBorder(LineBorder.createBlackLineBorder()); 35 } 36 37 public void setLabel(String label) { 38 m_label.setText(label); 39 } 40 41 public void setIndicator(Color color) { 42 m_indicator.setBackground(color); 43 } 44 45 public void tearDown() { 46 super.tearDown(); 47 48 m_label = null; 49 m_indicator = null; 50 } 51 } 52 | Popular Tags |