01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.admin.common;
05:
06: import org.dijon.Component;
07:
08: public class ComponentNode extends XTreeNode {
09: 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: }
|