1 23 24 package org.infoglue.cmsinstaller; 25 import javax.swing.*; 26 import java.awt.*; 27 28 31 32 public class DoneDialog extends JPanel 33 { 34 private InfoGlueInstaller infoGlueInstaller = null; 35 36 private final static String introductionHeader = "Installation of InfoGlue CMS completed"; 37 39 public DoneDialog(InfoGlueInstaller infoGlueInstaller) 40 { 41 this.infoGlueInstaller = infoGlueInstaller; 42 43 this.setSize(450, 350); 44 this.setLayout(null); 45 this.setBackground(Color.white); 46 47 JLabel introductionLabel = new JLabel(introductionHeader); 48 introductionLabel.setBounds(0, 0, 400, 30); 49 introductionLabel.setFont(new java.awt.Font ("Dialog", java.awt.Font.BOLD, 16)); 50 51 JTextArea textArea = new JTextArea("InfoGlue CMS was installed successfully. You can now start the tomcat server and launch your favourite browser with the location http://" + this.infoGlueInstaller.installerSkeleton.serverDialog.getHostName() + ":" + this.infoGlueInstaller.installerSkeleton.serverDialog.getPortNumber() + "/infoglueCMS" + this.infoGlueInstaller.installerSkeleton.serverDialog.getApplicationSuffix() + "/ViewCMSTool.action. \n\n."); 52 textArea.setEditable(false); 53 textArea.setBounds(0, 30, 380, 200); 55 textArea.setWrapStyleWord(true); 56 textArea.setLineWrap(true); 57 58 this.add(introductionLabel); 59 this.add(textArea); 60 61 infoGlueInstaller.installerSkeleton.backButton.show(); 62 infoGlueInstaller.installerSkeleton.nextButton.show(); 63 64 infoGlueInstaller.setNextButtonCommand("Exit"); 65 infoGlueInstaller.setNextButtonLabel("Close"); 66 } 67 68 public void paint(Graphics g) 69 { 70 Graphics2D g2 = (Graphics2D)g; 71 g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); 72 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 73 74 super.paint(g); 75 } 76 } | Popular Tags |