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.dso;
05:
06: import org.dijon.ContainerResource;
07: import org.dijon.Label;
08:
09: import com.tc.admin.AdminClient;
10: import com.tc.admin.AdminClientContext;
11: import com.tc.admin.ConnectionContext;
12: import com.tc.admin.ProductInfo;
13: import com.tc.admin.ServerNode;
14: import com.tc.admin.common.XContainer;
15:
16: public class DSOPanel extends XContainer {
17: private Label m_version;
18: private Label m_buildID;
19:
20: public DSOPanel(ConnectionContext cc) {
21: super ();
22:
23: AdminClientContext cntx = AdminClient.getContext();
24: load((ContainerResource) cntx.topRes.getComponent("DSOPanel"));
25:
26: ProductInfo info;
27: try {
28: info = ServerNode.getProductInfo(cc);
29: } catch (Exception e) {
30: info = new ProductInfo();
31: }
32: init(info);
33: }
34:
35: public void load(ContainerResource containerRes) {
36: super .load(containerRes);
37:
38: m_version = (Label) findComponent("Version");
39: m_buildID = (Label) findComponent("BuildID");
40: }
41:
42: public void init(ProductInfo productInfo) {
43: m_version.setText(productInfo.getVersion());
44: m_buildID.setText(productInfo.getBuildID());
45: }
46:
47: public void tearDown() {
48: super.tearDown();
49:
50: m_version = null;
51: m_buildID = null;
52: }
53: }
|