1 4 package com.tc; 5 6 import org.dijon.ContainerResource; 7 import org.dijon.Label; 8 9 import com.tc.admin.ProductInfo; 10 import com.tc.admin.common.XContainer; 11 import com.tc.admin.common.XTextArea; 12 13 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 " + System.getProperty("java.version") + ", " + 35 System.getProperty("java.vendor"); 36 String javaHomeDir = System.getProperty("java.home"); 37 String javaVMInfo = System.getProperty("java.vm.name") + ", " + 38 System.getProperty("java.vm.version") + " [" + 39 Runtime.getRuntime().maxMemory()/(1024*1024) + " MB]"; 40 41 m_systemInformationTextArea.setText( 42 title + " " + version + newLine + 43 osInfo + newLine + 44 javaVersion + newLine + 45 javaHomeDir + newLine + 46 javaVMInfo); 47 48 m_copyrightLabel.setText(productInfo.getCopyright()); 49 } 50 } 51 | Popular Tags |