1 4 package com.tc.admin.common; 5 6 import org.dijon.Component; 7 8 public class ComponentNode extends XTreeNode { 9 private String m_label; 10 private Component m_component; 11 12 public ComponentNode() { 13 super(); 14 } 15 16 public ComponentNode(String label) { 17 this(label, null); 18 } 19 20 public ComponentNode(String label, Component component) { 21 this(); 22 23 setLabel(label); 24 setComponent(component); 25 } 26 27 public void setLabel(String label) { 28 setUserObject(m_label = label); 29 } 30 31 public String getLabel() { 32 return m_label; 33 } 34 35 public void setComponent(Component comp) { 36 m_component = comp; 37 } 38 39 public Component getComponent() { 40 return m_component; 41 } 42 43 public void tearDown() { 44 super.tearDown(); 45 46 setLabel(null); 47 48 if(m_component instanceof XContainer) { 49 ((XContainer)m_component).tearDown(); 50 } 51 setComponent(null); 52 } 53 } 54 55 | Popular Tags |