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;
05:
06: import org.dijon.ContainerResource;
07: import org.dijon.Label;
08:
09: import com.tc.admin.ProductInfo;
10: import com.tc.admin.common.XContainer;
11: import com.tc.admin.common.XTextArea;
12:
13: /**
14: * This is shown in the AboutDialog.
15: */
16:
17: public class ConfiguratorInfoPanel extends XContainer {
18: private XTextArea m_systemInformationTextArea;
19: private Label m_copyrightLabel;
20:
21: public void load(ContainerResource containerRes) {
22: super .load(containerRes);
23:
24: m_systemInformationTextArea = (XTextArea) findComponent("SystemInformationTextArea");
25: m_copyrightLabel = (Label) findComponent("CopyrightLabel");
26: }
27:
28: public void init(String title, ProductInfo productInfo) {
29: String version = productInfo.getVersion();
30: String newLine = System.getProperty("line.separator");
31: String osInfo = System.getProperty("os.name") + " ("
32: + System.getProperty("os.version") + "/"
33: + System.getProperty("os.arch") + ")";
34: String javaVersion = "Java "
35: + System.getProperty("java.version") + ", "
36: + System.getProperty("java.vendor");
37: String javaHomeDir = System.getProperty("java.home");
38: String javaVMInfo = System.getProperty("java.vm.name") + ", "
39: + System.getProperty("java.vm.version") + " ["
40: + Runtime.getRuntime().maxMemory() / (1024 * 1024)
41: + " MB]";
42:
43: m_systemInformationTextArea.setText(title + " " + version
44: + newLine + osInfo + newLine + javaVersion + newLine
45: + javaHomeDir + newLine + javaVMInfo);
46:
47: m_copyrightLabel.setText(productInfo.getCopyright());
48: }
49: }
|